You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by soussou97 <db...@yahoo.fr> on 2006/12/13 17:28:46 UTC

multipe contextes for multiple-database

Hi Larry;

You have proposed another solution to access two or sevral databases with
multiples contextes :

"Another approach to this is to pass properties into the  DaoManagerBuilder
at runtime, that is the easiest way to have the exact same set of dao
classes with just different database connections"

Please could you give me a example (implementation) for that.

regards;
-- 
View this message in context: http://www.nabble.com/multipe-contextes-for-multiple-database-tf2815027.html#a7856058
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: multipe contextes for multiple-database

Posted by Larry Meadors <lm...@apache.org>.
Sure:

Reader reader = getYourReaderSomehow();
Properties properties = new Properties();
// set some properties, or load them from a file
DaoManager daoManager = DaoManagerBuilder.buildDaoManager(reader, properties);

Larry


On 12/13/06, soussou97 <db...@yahoo.fr> wrote:
>
> Hi Larry;
>
> You have proposed another solution to access two or sevral databases with
> multiples contextes :
>
> "Another approach to this is to pass properties into the  DaoManagerBuilder
> at runtime, that is the easiest way to have the exact same set of dao
> classes with just different database connections"
>
> Please could you give me a example (implementation) for that.
>
> regards;
> --
> View this message in context: http://www.nabble.com/multipe-contextes-for-multiple-database-tf2815027.html#a7856058
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>