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 [mailto:[email protected]] Sent: Friday, January 16, 2009 12:23 PM To: [email protected] 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 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(Dri verConnectionFactory.java:38) at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(Poolabl eConnectionFactory.java:294) at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericO bjectPool.java:974) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataS ource.java:96) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourc e.java:880) ... 16 more -- View this message in context: http://www.nabble.com/Need-to-turn-off-connection-pooling-in-Tomcat-tp21 507734p21507734.html Sent from the Commons - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
