Support JNDI subcontexts in C3P0PooledDataSource
Status: Beta
Brought to you by:
swaldman
Currently,
com.mchange.v2.c3p0.mbean.C3P0PooledDataSource will
only bind to the top-level JNDI context. It would be
nice to be able to bind to JNDI subcontexts such as
"java:jdbc/PooledDS" instead of just "java:PooledDS".
The attached patch implements this feature. I have
tested a locally-built copy of c3p0-0.9.0.2 with this
change and have confirmed that it works.
Fix JNDI binding to allow subcontexts
Logged In: YES
user_id=175530
Hi. To be a bit clearer, the patch automatically builds subcontext paths to
allow the c3p0 mbean to bind a DataSource to subcontexts that have not yet
been created. (DataSources could already be bound to subcontexts; they
simply had to have been created independently.)
Anyway, I think this is a good idea, and see little downside. I'll think about it a
bit more, but I think I'll add this behavior.
Thanks!