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

kenevel do-not-reply at jboss.com
Tue Sep 9 08:42:12 EDT 2008

Hi there, 

I'm working on a project in which one of the requirements is for the JBoss middle tier code to be able to support a cold outage of the database (which it its applications are upgraded). I've been looking through the JCA documentation, but haven't found any particular point in the code where a simple, elegant change could produce the effect we're after - for example throwing a custom RuntimeException along the lines of a DataSourceTemporarilyUnavailableException. This could travel up the stack to the front-end and result in appropriate messages being generated for the system's users. 

I was wondering about the effect of simply invoking the stop() method on the ManagedConnectionPool or TxConnectionManager. I seem to recall that the latter throws an exception if a Connection is requested while it is in the stopped state - but then the question becomes one of the effect of simply invoking the start() method once the DB is available again: will JBoss simply replenish its pool with new DB connections and serve these as if it had not been stopped? Are there any knock-on effects of simply stopping that data-source or its managing components? 

Best wishes, 


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

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

More information about the jboss-user mailing list