Unfortunately, I've deleted the message, so I can't just
respond to it, but Remy noted that Catalina doesn't rebind
resolved objects in the JNDI implementation.

After I thought about this some, I don't really know how I
feel about that....

I KNOW that MVC is probably the better way to go, so using a
single controller servlet is the best idea to handle this,
but for people who aren't ready to migrate to that, putting
something like:

DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/Foo");

in the init() of every servlet returns a different
DataSource from every other servlet.  So a connection pool
is only valid for that particular servlet.

Again, I know that the right thing to do is to use a
controller servlet anyhow, but for those who don't do it,
they're creating new pools on every page - even when they're
careful to do otherwise.

Incidentally, I'm STILL getting new connections on every
request to getConnection().  Somebody else had posted to try
to use PooledConnectionDataSource, but even that creates new
connections.  Does the specific JDBC driver need to
implement something special to work correctly?  i.e., has
anybody gotten pooling to work properly with mm.mysql, or
FreeTds?

Thanks,
Will Stranathan

Reply via email to