There's nothing available at the moment. It seems like it wouldn't be
very hard to add it to PoolSetup.
I'll dig into that - though am also very open for any ideas you might
have as to how you'd like to see it implemented.
> Tomcat 5.5 lets you set these in your context.xml when you create a
> <Resource> of type DataSource and under the hood it is also using
> DBCP.
>
> On a side note, what other options are there for out-of-container
> JNDI? I am using Tomcat 5.5 and would like to run out of container
> Junit tests for classes which need DataSources which are currently
> provided by the container via JNDI. I've spent a few hours getting my
> test to work out-of-container with simple-jndi but I'm curious about
> any other options. Ideally, I guess I'd like to be able to use the
> Tomcat 5.5 JNDI out-of-container since it would allow me to test using/
> against the same code that will be deployed but I'd read that's not
> possible
A while back, Phil Steitz and I took the Tomcat 5.5 JNDI code out as
Apache Directory Naming (okay, mostly Phil); but it never reached a
release point and is lost somewhere in the SVN. Commons DBCP refers to
it as it used it for out-of-container testing.
I believe there was a Spice JNDI library somewhere, but never used it.
Hen
Additionally, I think the Tomcat 6 JNDI code is now available as a
separate jar.
And I came across this project the other day: http://www.mockejb.org/
JNDI and JMS mock libraries. A few years dead though by the looks of
it (admittedly, much the same could be said of simple-jndi and the
unreleased simple-jms).
Hen
Just committed this. First time I looked at it it seemed painful, but
a second attempt seemed a lot clearer.
I haven't seen a way to do it generically, so currently all it
supports is: dbcpValidationQuery, dbcpDefaultReadOnly and
dbcpDefaultAutoCommit.
I'll dig into how to do the MaxActive bits next.
Recorded in SJN-81.
Hen
Does MaxActive and the other Pool 1.3 parameters now.
Hen