On Nov 7, 2013, at 11:58 PM, Anu Prab <[email protected]> wrote:
>>> I am using Tomcat 7.0.42 and Tomcat jdbc pool.
>
>> Just to be perfectly clear, how are you using this? With a <Resource/>
> tag in your Tomcat >configuration or are you creating the pool in your
> code? Either way, include the necessary >config or code which shows how
> you've defined the pool.
>
>> The pool configuration is in context.xml. A sample of the config looks
like
> this:
>
>> <Resource name="jdbc/name"
>> auth="Container"
>> type="javax.sql.DataSource"
>> fairQueue="true"
>> factory="<customized-factory>"
>What factory are you using? It's important to share. Without it we don't
know which pool you're using.
A customized factory which extends org.apache.tomcat.jdbc.pool.
DataSourceFactory
Few minutes, not sure of the exact timing. Yes, all are 0.
> Also, what happens when you try to get a connection after the pool count
has dropped to 0? >Does it get a new connection? Does it hang waiting?
Does it generate any error messages?
>Is there any reason why you might be getting disconnected from the
database side or from a >firewall in between your application and the
database?
I can still get newer connections even after the count drops to 0.
Hi,
Also, when I enabled logAbandoned as you suggested, I see this exception
after about 17-18 minutes.
org.apache.tomcat.jdbc.pool.ConnectionPool abandon
WARNING: Connection has been abandoned
PooledConnection[oracle.jdbc.driver.T4CConnection@2726965a
]:java.lang.Exception
at
org.apache.tomcat.jdbc.pool.ConnectionPool.getThreadDump(ConnectionPool.java:1065)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:707)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:634)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
-Anu