[Proxool-developer] Changing Databases (URLs) while Proxool is running
UNMAINTAINED!
Brought to you by:
billhorsman
From: Bill H. <bi...@lo...> - 2003-02-21 15:01:34
|
Hi all, At the moment, if you change the URL that Proxool uses to connect to the database (say if you want to switch databases) then that new URL is only used for new connections. The existing ones continue to use the old database. You have to call ProxoolFacade.killAllConnections to get it to work fast. The idea behind that was that killing all connections is a bad thing to do because if you are busy you are likely to refuse some people while you build new ones. But I'm changing my mind. I think the user would rightly expect the new database to start serving all the connections pretty quickly, as default behaviour. Note: if you are changing databases because the old one is down and you have correctly configured fatal-sql-exception then the old connections will get killed off anyway (see my previous post "When connections fail"). So, the question is: should changing the URL trigger killAllConnections? Another note: killAllConnections' default behaviour is to be "merciful" and only destroy the connections once they become available (so no active connections are interrupted). Regards, -- Bill Horsman Proxool http://proxool.sourceforge.net ICQ: 119577180 |