Tomcat-jdbc pooling not detecting dead connections

We recently migrated to using the apache tomcat jdbc connection pooling.

We are using v1.1.0.1 of the connection pooling mechanism with tomcat 6.0.33 on Oracle 10g

Our connection pools are configured as follows:

<Resource name="jdbc/testPool" auth="Container"
              type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
              username="user" password="xxx" initialSize="2" maxActive="5" minIdle="1" maxIdle="2"
              maxWait="1" removeAbandoned="true" removeAbandonedTimeout="15"  logAbandoned="true"    abandonWhenPercentageFull="100"  jdbcInterceptors="ResetAbandonedTimer"/>

The application works fine in normal situations but we noticed the following problems:-

a) When the ResetAbandonedTimer kicks in the connection itself does not get discarded and the app when it requests a new connection gets handed the connection that was already killed by the ResetAbandonedTimer mechanism .

b) We were also able to easily reproduce the above issue by running the application and then killing the idle connection from the oracle end. I would expect that if a connection gets killed from the oracle end the connection pool should detect it and log and discard the connection. However the apache-tomcat-jdbc pooling mechanism as configured in my setup does not seem to detect this condition at all. It waits silently till the app requests another connection and returns the dead connection to the app which of course fails as soon as the app tries to use the connection.

asked by san9jay




validationQuery="select 1 from dual"

in order to validate your connections


answered by fhanik on May 10, 2012 08:39 AM

Filip Hanik is a Senior Software Engineer for the SpringSource Division of VMware, Inc. (NYSE: VMW) and a key participant in the company's Apache Tomcat initiatives. Filip brings 15 years of extensive experience in architecture, design and development of distributed application frameworks and containers and is recognized for his top-quality system development skills and continuous participation of Open Source development projects. Filip is an Apache Software Foundation member and a committer to the Apache Tomcat project where he is a leading authority on Tomcat clustering and a key contributor to the core of the platform. Filip has made contributions to software initiatives for, Sony Music, France Telecom and has held a variety of senior software engineering positions with technology companies in both the United States and Sweden. He received his education at Chalmers University of Technology in Gothenburg, Sweden where he majored in Computer Science and Computer Engineering.


In the appearance there is

In the appearance there is annihilation Replica Handbags added important than cutting a artist brand, and if it comes to labels Gucci is a apple acclaimed characterization that stands for superior and appearance and class. Gucci handbags are acceptable superior handbags because they are fabricated from the best raw abstracts in this case they are louis vuitton replica fabricated from 18-carat Italian leather, the covering articles were aboriginal launched in 1921 in the Italian city-limits of Florence, Gucci did not alpha off big but in actuality had apprehensive ancestry and with time abound into the appearance Mulberry Replica Handbags behemothic that it is today. There are abounding altered Gucci designs of Gucci handbags that you can boutique about for, for archetype there is Gucci Boston, Gucci Abbey, Gucci Tote, Gucci Hobo, and Gucci classic, and Gucci Cruise, you don’t accept to biking to Italy to get Gucci handbags at because they are readily attainable on the internet with online retailers such as.


SSL/JDBC connection between Tomcat and Oracle

We are using tomcat 8 & oracle 11g and we would like to configure SSL encryption between app & DB.

Our DBA Team configured the CERT on database and provide us with the .pem file, Can some let me know the steps which needs to be configured on tomcat for this to happen without any issues.

FYI: We are not using oracle wallet



Re: Apache Tomcat

Your work is very good and I appreciate you for the info you have provided here. Thanks for taking the time to discuss this, I feel strongly that love and read more on this topic. Keep up the good Work.
directv family package


I read this article because it is not including worthless information passguide 1z0-436
. The author clearly describes the information. Thank you for sharing this types article. This will be very beneficiary for the readers passguide 300-460

Unless you know something

Unless you know something about scripts, it's quite hard to detect and solve any type of problem your software might have at some point. Once you understand how your apps work, you can try out the quickbooks accounting software vashon wa, especially if you own a business. Technology can really make things easier.

This is very academic content

This is very academic content and published well for something different click to investigate. It's awesome to see that some people still understand creating a quality post!


buy retweets These things are very important, good think so - I think so too... buy twitter followers

Could you please explain what

Could you please explain what you mean under the dead connection being detected out of the box? I looked through this and similar posts but to tell the truth I didn't understand entirely everything. I am sorry for my incompetence.
You just pay and we are writing an essays instead of you.




I am no computer geek but this website has helped me to understand more on the different concepts of operating systems and fixing many issues in the OS and servers. I hope that you guys will be able to come up with a solution for this issue also. order cheese curds online

SSL/JDBC issue betweeb Tomcat and Oracle


I'm trying to use SSL for encryption and server authentication between Oracle 11.2 with Tomcat 7.0.67 with Java 1.8 installed on Redhat 6.7 server. Currently, I'm using this document as a guide:

So I have this configuration in context.xml file:

name="jdbc/DB" auth="Container"
jdbcurl ="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=servername)(PORT=2484))(CONNECT_DATA=(SERVICE_NAME=servicename)))");

In the file I have:


In the java security file I added this to the end of the line:

Here are the errors I receive when trying to connect to the db:

Caused by: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.connect(
at oracle.jdbc.driver.T4CConnection.logon(
... 13 more
Caused by: Unable to initialize ssl context.
... 18 more
Caused by: Unable to initialize the trust store.
... 21 more
Caused by: SSO not found
... 22 more
Caused by: SSO KeyStore not available

Any help would be appreciated. Thanks.


adding the following to the connection pool config is a workaround but I would think a dead connection should be detected out of the box. the

testOnBorrow="true" validationQuery="SELECT 1 from dual" validationInterval="30000"



Post new comment

This question is for testing whether you are a human visitor and to prevent automated spam submissions.