[jboss-user] [JCA/JBoss] - Re: How to mark DataSource as temporarily unavailable

PeterJ do-not-reply at jboss.com
Tue Sep 9 12:48:52 EDT 2008

I have never tried this so my thoughts here are entirely speculation. Based on discussions I have seen in other posts, I suspect that doing a stop on the connection pool might remove the *-ds.xml file from the deploy directory. (I am not sure about that at all - there are up to a half-dozen MBeans generated for a *-ds.xml file and am am not sure what effect stopping one of them would have.) I suspect that once the datasource is stopped that your apps will get various errors. I do not know what will happen with threads that already have connections - most likely they will continue to use the connections successfully but then might get exceptions when closing the connection. You would probably have to do some recoding to gracefully handle these exceptions.

Now as I mentioned, this is all speculation. I could try this with one of my apps and report on what happens. But then, you could do that just as easily.

One other thought I had was to write your own datasource (or perhaps a service) as a layer over the actual datasource, and place into your datasource the ability to "temporarily shut down" the database. Then you could define the exact behavior for what happens during a shutdown and your apps will be depended on behavior that could change (which is a very likely possibility as you move to apps to newer versions of JBossAS.)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175369#4175369

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175369

More information about the jboss-user mailing list