ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Agilan Palani" <agi...@bntasia.com>
Subject Multiple Databases - Multiple Context
Date Wed, 05 Oct 2005 12:46:58 GMT


            I need Ibatis to provide access to two different databases.

            After going through the forums I found that it can be achieved

            1. Configuring two <context> tags in the dao.xml, 

2. While getting the DAO objects, use the following method

            getDaoManager().getDao(UserDAO.class, contextId ) to retrieve
the objects,

            they would access the correct database defined for that context.


            Question here is how do I define/declare a contextId to the
<context> ?

            I checked the http://www.ibatis.com/dtd/dao-2.dtd and there is
no way that 

I can specify an ID to the context tag.


Is there any other way to do this?



Thanks in advance


View raw message