> As DAO's is Core J2EE design pattern ,
>
> if i have 2 databases then where i configure the
> info which database i have to use.
>
> based on config ingo i have to connect to
> corresponding database at run-time
As with one database, you'd use JNDI for lookup of the datasources (each database = a datasource).
At the DAO level, you could use two subclasses of a generic DAO interface/abstract class for each datasource, e.g. OracleDAO or MySqlDAO...