[jboss-user] [Management, JMX/JBoss] - Programatically restarting datasource under certain conditio
do-not-reply at jboss.com
Tue Nov 28 13:43:08 EST 2006
So, we ran into a situation (somehow) where all of a sudden the connection pool stops giving us good connections. We try to do stuff, but all we get is "connection closed" errors. All we know, right now, is that restarting fixes it.
We haven't been able to reproduce this yet, but I'd like to plumb something in to do the restart automatically. We have a datasource in an XML file, and a .war that uses the datasource (but strictly speaking, does not depend on the datasource, i.e. we have not linked them to be dependent).
I am trying to figure out what the best way to do this is:
-Grab just our datasource from an MBeanServerConnection and somehow restart it, or
-Grab the CachedConnectionManager from an MBeanServerConnection and restart it?
I can't remember exactly whether one does those things directly (by getting a reference to the CCM and then invoking CCM.stop() and CCM.start()) or if you have to go through the JMX bus somehow. Since stop and start are protected I am assuming that there is a different way I need to do this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989440#3989440
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989440
More information about the jboss-user