tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amit shah <>
Subject Using Tomcat7 JDBC Connection Pool
Date Wed, 08 Feb 2012 11:41:54 GMT
I am trying to use the tomcat 7 jdbc connection pool in our application by
using the tomcat-jdbc.jar and tomcat-juli.jar files. The basic connection
pool works fine. I have few questions/clarifications

1. Executing multiple statements on connection initialization

            - The pool provides a flexibility to execute a single sql query
when the physical connection is established (initSQL property). I couldn't
find a way to execute multiple sql queries on connection initialization.
The JDBC Interceptor mechanism also doesn't seem to help out. Any

2. alternateUserNameAllowed property

- If a connection is requested with the credentials user1/password1 and the
connection was previously connected using user2/password2, the connection
will be closed, and reopened with the requested credentials. This property
was added as an enhancement to bug
I didn’t understand the reason behind closing the previous connection. Can
the pool not still maintain the previous connection and open a new
connection if the user/password combination do not match?. This way the
same pool can be used for multiple schemas.

3. JMX & Statistics

            - How can one enable jmx when tomcat 7 jdbc connection pool is
used independently? I tried specifying the jmx vm options
but they don’t seem to help out? Neither did I found a way to print or
access the pool statistics programmatically. Any suggestions?

Thank you,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message