ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sanders <tendan...@gmail.com>
Subject How can I change datasource connect info on the fly w/iBATIS and Spring?
Date Fri, 13 Apr 2007 18:19:55 GMT

One of the characteristics of my application is that the datasource
connection information can be supplied by the user, and I wonder if anyone
has any advice on how to handle that?

Currently I define a datasource in my applicationcontext with default
information (my test db) and specify my BanPolicyDAO object, letting Spring
inject the datasource. All works well with my new BanPolicy configuration
(that you've all seen over and over this week!).

I searched the archives for dealing with multiple datasources but all the
responses seemed to be in the case when you knew the connection info in
advance. In my case I need to create a new datasource on the fly, or be able
to change the settings of the existing one. So far my efforts haven't worked
- the DAO only ever uses the original connection info.

Anyone tried this, or have have any thoughts on the best way to do it?

Cheers

Paul
-- 
View this message in context: http://www.nabble.com/How-can-I-change-datasource-connect-info-on-the-fly-w-iBATIS-and-Spring--tf3573169.html#a9983995
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message