-
1. Re: Dynamically changing ConnectionURL
davidjencks Mar 13, 2003 10:18 PM (in response to amayingenta)I don't understand your requirements yet. At any one time are all connections to a single database?
There is better support for this in 3.0.7 (currently cvs only I believe). There's an operation something like setManagedConnectionFactoryProperty you can use to reset the ConnectionURL and the pool has a flush method to get rid of all the old and presumably useless connections to the old db. I think the same capabilities are in 3.2 and 4: in 4 the mcf is exposed directly as an (x)mbean so you can set the property directly.
I dont think you need to call stop and start... this will probably mess up any DataSources you might have been caching. -
2. Re: Dynamically changing ConnectionURL
amayingenta Mar 14, 2003 3:58 AM (in response to amayingenta)Thanks, it sound like being able to change the connection URL and then flush the pool in 3.0.7 or 3.2 will do the trick - I'm not brave enough to go with 4 as we've got to go into production with this fairly soon.
We don't cache the DataSource - in our current live implementation (under WebLogic 5.1 which we're migrating from) we remove the DataSource as an indication that the datasource is not available.
Here's a bit of background on our setup if you're interested:
With BASIS there's a database kernel on which there might be a number of different individual databases (which are a bit like schemas in Oracle) - in the connection url you have to specify which databases on the kernel that you're going to query.
In this case the different databases are individual years of bibliographic content, and we typically do a search over a range of year therefore accessing a number of databases, but with the same connection (specifying the database in the qry).
Because BASIS doesn't like to be queried at the same time as it's updated we have a shutdown for an hour or so every week when the loading is performed.
During the week if there's any problems or other changes need to be made, individual databases are made unavailable or replaced with copies, and this is when we need to be able to dynamically change the connection url.
-Andrew