Hi,

 

It is definitely there:

 

<!ELEMENT context (transactionManager, dao*)+>

<!ATTLIST context

  id CDATA #IMPLIED

> 

 

Niels

 

BTW You should use the DTD located at apache, http://ibatis.apache.org/dtd/dao-2.dtd

 


From: Agilan Palani [mailto:agilan@bntasia.com]
Sent: woensdag 5 oktober 2005 14:47
To: user-java@ibatis.apache.org
Subject: Multiple Databases - Multiple Context

 

Hi

 

            I need Ibatis to provide access to two different databases.

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

            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

Agilan