commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Thomas <keith.tho...@gmail.com>
Subject Need to turn off connection pooling in Tomcat
Date Fri, 16 Jan 2009 20:22:35 GMT

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 pooling.

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?

at
org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)

        at
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)

        at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974)

        at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96) 
        at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 
        ... 16 more 

-- 
View this message in context: http://www.nabble.com/Need-to-turn-off-connection-pooling-in-Tomcat-tp21507734p21507734.html
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message