views:

627

answers:

1

I would like to override the portion of JBoss that loads JDBC connection information from the XML config file. I would like to continue using the rest of JBoss's connection pooling/caching features. I just want to load the connection data from another source.

Which MBean should I be implementing and how do I configure the override in JBoss?

+1  A: 

The JBoss -ds.xml descriptors actually cover a multitude of sins. If you look on the JBoss JVM console, you'll find 4 or 5 MBeans there for each data source. You could potentially do this programmatically, but I wouldn't give good odds on your chances.

My suggestion would be to use a 3rd-party connection pooling library (e.g. Commons DBCP). Define the pool using that, and then bind the resulting DataSource to JNDI. CLient application using the pool shouldn't know any difference.

skaffman
I was hoping to keep JBoss's existing pooling and just load the connection metadata from a service. Looks like I'll need to override a lot more to have this ability. Thanks for the response.
Chris Nava