-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Len,
Len Popp wrote: > On Fri, Jan 16, 2009 at 16:45, Christopher Schultz > <ch...@christopherschultz.net> wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Keith, >> >> Keith Thomas wrote: >>> As part of the >>> deployment I just need a way of defining the datasource in a manner that is >>> external to my code and configurable by administrators. >> Use of a DataSource implies the use of a connection pool, which seems >> contrary to your requirements. >> >> You will need to manage your own database connections. > > Why is that? From the Java docs, it seems that DataSource is required > for connections that are managed by JNDI. Isn't the use of JNDI > without pooling a valid use case? Your (and Chuck's, off-list) comments have made me realize that my statement was pretty stupid. :) Of course the OP can still use JNDI-based DataSource storage, probably even managed by Tomcat. Instead of calling DataSource.getConnection(), he should use DataSource.getConnection(username, password). I don't know how this use of the DataSource jives with Tomcat's pooled connections, and how the settings like maxActive, etc. affect the behavior, but that can be easily observed through trial and error. I would hope that DataSource.getConnection(username, password) would actually give you a new, unpooled connection. In that case, setting maxActive="0" might actually work. The OP didn't say how he was actually obtaining connections, so it's not clear if it does or does not. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAklyBhwACgkQ9CaO5/Lv0PCcAACeOAmGl60tqT3ZaLLFmNfEAdQJ 2vAAn17oiiRHLO8C0OxTJeIOjCCdSM0K =iP4x -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org