User development,
A new message was posted in the thread "How best to handle DB failover?":
http://community.jboss.org/message/529175#529175
Author : Vicky Kak
Profile :
http://community.jboss.org/people/vickyk
Message:
--------------------------------------------------------------
mcevikce wrote:
But even with <check-valid-connection-sql> defined, my old connections are still
there. I would expect all of the old connections to be recycled but thats not the case.
Is there a way to clear all the connections in my datasource and recreate them with new
URL?
Actually you are not using ha datasource, it seems the URL gets changed on the fly.
The DB connections available in the pool are alive, the check-valid-connection when called
will basically take longer time since the DB is locked, it is not closed/shutdown. If it
would have been closed/shutdown I would have recommended you to try <use-fast-fail>
as mentioned here
http://community.jboss.org/wiki/ConfigJCACommon
In your case I would suggest you to write a custom MBean which will flush the pool by
invoking flush() operation on one of the JCA infrastructure MBeans, check jboss.jca:*
Mbeans ( ManagedConnectionPool::flush()).
--------------------------------------------------------------
To reply to this message visit the message page:
http://community.jboss.org/message/529175#529175