I may be overstepping my overall iBatis knowledge but here is my understanding: 1) The workhorse of iBatis is the SqlMapClient object which is configured through an iBatis XML file (and you may be using Spring configuration as well, sounds like it). 2) The XML file defines one, and only one, datasource (i.e. database connection or connection pool to one specific database). 3) Therefore, it sounds like your only option is to configure/use a second SqlMapClient object and refactor your methods to use the proper one. 4) Caution: If you have transaction management assumptions in your current architecture with a single SqlMapClient, then your new architecture will HAVE to use an external transaction manager to coordinate transactions across more than one database. [Admittedly, I am relatively in experienced in the transaction management area so would look to others to verify, refute, or augment this statement.]
-----Original Message----- From: gunacesun_ibatis [mailto:[email protected]] Thanks for taking time to respond. I can see how some of the terminologies I used could have led you to your assumptions. What I have is one application. But with the move to RAC, some some of the functions have to use one Oracle Service and others a different service and hence different Connect strings also. But from your reply it appears it is not possible to do that. Thanks again. Ganesh Rick.Wellman wrote: > > (from the way you wrote your question) Assumption #1: You have N > web-applications that each have their own Spring > 'applicationContext.xml' file. > Assumption #2: Until now, each configLocation property of the > sqlMapClient bean has been identical. > > If Assumptions #1 and #2 are correct, then you have answered your own > question without knowing it. > Configure each application's .xml file according to the service that > you identified in your original question. > (No, I do not believe a single application can be configured to use > more than one connection string.) > > -----Original Message----- > From: gunacesun_ibatis [mailto:[email protected]] > Sent: Wednesday, October 14, 2009 5:29 PM > To: [email protected] > Subject: Re: How to configure SqlMapClient for multiple Oracle RAC > services? > > > Does the question make sense? Is it too trivial? Why no response?:-( > > gunacesun_ibatis wrote: >> >> I've been using Spring 2.5 and iBatis 2.3 to connect to Oracle 10g. >> >> I'm testing our move to Oracle 11g RAC. In the RAC setup, some of my > apps >> use one service and others use a different service. So I need to use >> 2 different connection strings to connect to the DB. >> >> For example, currently the connection string I use is something like >> jdbc: oracle:thin:@host: port:SID >> >> With RAC, I have to use 2 different connection strings like >> jdbc: oracle:thin:@host: port/service1 >> jdbc: oracle:thin:@host: port/service2 >> >> I'm not sure how to set 2 different values for the configLocation > property >> of the sqlMapClient bean in the applicationContext.xml file. >> >> Is this the right approach or is there a diiferent way to do this? >> >> I posted this question on the Spring Data Access forum and I haven't > had a >> response in 2 days. If you have seen it on that forum I apologize. >> >> Thanks in Advance. >> Ganesh >> > > -- > View this message in context: > http://www.nabble.com/How-to-configure-SqlMapClient-for-multiple-Oracl > e- RAC-services--tp25849614p25900036.html > Sent from the iBATIS - User - Java mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > Quoted from: http://www.nabble.com/How-to-configure-SqlMapClient-for-multiple-Oracle- RAC-services--tp25849614p25900361.html --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
