commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wes Clark" <>
Subject RE: Need to turn off connection pooling in Tomcat
Date Fri, 16 Jan 2009 21:18:14 GMT
First off, do you mean each user has his or her own database user id?

If not, you should be able to configure Tomcat with a DataSource without
configuring a DBCP connection pool around it.  You'd get the DataSource
using JNDI, and then call getConnection() on the DataSource, which would
give you a new connection each time. 

-----Original Message-----
From: Keith Thomas [] 
Sent: Friday, January 16, 2009 12:23 PM
Subject: Need to turn off connection pooling in Tomcat

The security for the data within the legacy database I am using is
entirely baked into the restriction that every user has their own
database connection. As far as I can tell it is not possible to use
connection pooling a retain secure access to the data without an awful
lot of re-work. 

At the moment I am using a new DB connection for every DB access my app
makes. Later I may implement my own database polling but either way it
will be my code initiating connection requests not Tomcat's. 

Tomcat comes configured with DBCP which in turn seems to want to manage
my database connections. At the bottom of this posting is a stacktrace
fragment indicating connection requests being made related to connection

Ideally, I'd just like to be able to turn off connection pooling.
Setting maxactive to zero does not seem to do this. Setting maxactive to
1 seems to indicate I want a connection pool of size 1 , which is no use
either. If DBCP cannot be configured just to "stay out of it" is it
possible to reconfigure Tomcat to provide JNDI database connectivity
without using DBCP?

        ... 16 more 

View this message in context:
Sent from the Commons - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message