TomcatExpert

JDBC Connection Pool Timeout Errors

posted by SpringSource on February 9, 2010 12:44 PM

If the database server times out a connection, the connection pool on Tomcat side would not be aware of its disconnection.

If the database server times out a connection, the connection pool on Tomcat side would not be aware of its disconnection, and could throw the following exception in Tomcat:

Caused by: com.ibm.db2.jcc.c.DisconnectException: A communication error has been detected.
Communication protocol being used: Reply.fill().
Communication API being used: InputStream.read().
Location where the error was detected: Read timed out.
Communication function detecting the error: *. Protocol specific error codes(s) TCP/IP SOCKETS DB2ConnectionCorrelator: CCD3560A.K404.080507130918
at com.ibm.db2.jcc.b.a.a(a.java:373)
at com.ibm.db2.jcc.b.gb.b(gb.java:191)
at com.ibm.db2.jcc.b.gb.c(gb.java:238)
at com.ibm.db2.jcc.b.gb.c(gb.java:353)
at com.ibm.db2.jcc.b.gb.v(gb.java:1362)

In order to prevent the exception, the connection pool can validate the connection.

In doing so, two attributes can be added to the JDBC resource, testOnBorrow and validationQuery respectively:

name="jdbc/dsSos"
auth="Container"
type="javax.sql.DataSource"
username="******"
password="*******"
driverClassName="com.ibm.db2.jcc.DB2Driver"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
maxIdle="2"
maxWait="10000"
url="jdbc:db2://mydbURL:50000/MYDB"
maxActive="15"
removeAbandoned="true"
removeAbandonedTimeout="300"
testOnBorrow="true"
validationQuery="some sql..."
logAbandoned="true"
"some sql..."

In the above example should be a valid SQL query that the connection pool will execute to ensure a live connection is returned to the application. The embedded query should be simple and efficient. For example:

For Oracle:

validationQuery="select 1 from dual"

 

For MySQL:

validationQuery="select 1"
For more than 10 years, SpringSource employees have been supporting Apache technologies, with unparalleled experience and commitment to the Apache Software Foundation. More than 400 of the Fortune 500 count on SpringSource to support their mission-critical business applications. Leaders of the Apache Software Foundation, including Board Members, work at SpringSource and dedicate a significant amount of time further developing the Apache Tomcat open source project. Over the last 2 years, 95% of the issues fixed in the Apache Tomcat project were fixed by SpringSource engineers. For more information on how SpringSource can help your enterprise, see the SpringSource website, or call 800/444-1935.

Comments

Impact of two parameters

The addition of these two parameters very onerous database?

JAva

twitter followers I really

twitter followers I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work. Definitely a great post. Hats off to you! The information that you have provided is very helpful. buy youtube views

nice

This is something that most of you would not have even care to see through in the first place. It will surely be good if they do make some significant changes that will make things much more easier than now. jewish temple los angeles

castle clash hack no survey

castle clash hack no survey no password I recommend only good and reliable information, so see it: clash of clans juwelen hack android

My spouse and i study the

My spouse and i study the many web sites to have the most up-to-date on the can be found in producing solutions. Obtaining a writesmyessay is just not a new onetime issue. It is just a course of action that particular has got to regularly move through in order to keep way up in doing what can be purchased.

--

cara install windows 7 What youre saying is completely true. I know that everybody must say the same thing, but I just think that you put it in a way that everyone can understand. I also love the images you put in here. They fit so well with what youre trying to say. Im sure youll reach so many people with what youve got to say.jenis processor intel,cara melihat spesifikasi komputer,perangkat keras komputer dan fungsinya,cara install ulang windows 7,sejarah perkembangan dan generasi komputer

David

twitter followers I simply want to tell you that I am new to weblog and definitely liked this blog site. Very likely I’m going to bookmark your blog . You absolutely have wonderful stories. Cheers for sharing with us your blog. favorites

That's bad for you because

That's bad for you because those are the things that make your items stand out, improve your response amount, and drive item sales Channel Management.

wow man

This site is very helpful to know the details of errors occurring during JDBC connection. Connection timed out problems will be there while doing many jobs. But we don’t know the reason behind it. These sites will be helpful to know the reasons for it. medical billing services los angeles

You bear through a awesome

You bear through a awesome vacancy. I sanity definitely quarry it moreover personally suggest to my buddys. I am self-possessed they determination be benefited from this scene. ppc manager

I understand this column. I

I understand this column. I realize You put a many of struggle to found this story. I admire your process. Language of Desires

I wrote about a similar

I wrote about a similar issue, I give you the link to my site. Real Estate Agent

On that website page, you'll

On that website page, you'll see your description, why not read through this. WinningFT

I am interested in such

I am interested in such topics so I will address page where it is cool described. dieta del medio dia descargar gratis pdf

On this page you can read

On this page you can read my interests, write something special. how to get more views on youtube

I encourage you to read this

I encourage you to read this text it is fun described ... restaurant design Chelsea new york

I invite you to the page

I invite you to the page where you can read with interesting information on similar topics. buy youtube comments

Find the best essays on

Find the best essays on is my friend's profile page. buy stumbleupon votes

So lot to occur over your

So lot to occur over your amazing blog. Your blog procures me a fantastic transaction of enjoyable.. Salubrious lot beside the scene. buy mixcloud plays

I exploit solely premium

I exploit solely premium quality products -- you will observe these individuals on: ​here

Such sites are important

Such sites are important because they provide a large dose of useful information ... satta matka

I would recommend my profile

I would recommend my profile is important to me, I invite you to discuss this topic. http://doggydantraining.eubookshop.com

This is very significant, and

This is very significant, and yet necessary towards just click this unique backlink: diabetes destroyer

Good Topic

From this post, I understood that If the database server times out a connection, the connection pool on Tomcat side may not be aware of its disconnection. Then some errors will occur. This piece of information is very helpful to know about it and to avoid these errors. top wedding planner

DSASDASD

jimmy choo112NB
the north face outlet
red valentino
michael kors
louis vuitton sacs
cheap jordan shoes
rolex replica watches
michael kors handbags outlet
ed hardy
jordan shoes
cheap jordans
nike blazer
ralph lauren pas cher
adidas nmd
gucci borse
fitflops shoes
nike outlet store
michael kors handbags online
nike free 5
nike roshe
converse trainers
true religion jeans sale
adidas nmd
omega watches for sale
michael kors handbags wholesale
michael kors handbags
cheap basketball shoes
longchamps
michael kors outlet
michael kors handbags wholesale
cheap nfl jerseys wholesale
instyler max 2
nike huarache trainers
ed hardy outlet
pandora charms
michael kors handbags sale
tiffany and co outlet
lebron shoes
longchamp le pliage
skechers outlet
lebron james shoes
abercrombie and fitch
michael kors handbags
michael kors handbags
michael kors handbags
nike store uk
asics shoes
pandora jewelry
michael kors handbags
nike huarache
cheap mlb jerseys
cheap ray ban sunglasses
cheap nhl jerseys
jimmy choo shoes
nike store
michael kors outlet store
nike tn
michael kors outlet
michael kors outlet
toms shoes
cheap nike shoes
michael kors handbags
michael kors outlet
yeezy boost 350 black
michael kors handbags
michael kors handbags
polo ralph lauren
toms outlet
sac longchamp
fitflops sale clearance
michael kors uk
mlb jerseys
kobe 9
michael kors uk
nike air max 90
christian louboutin outlet
cheap michael kors handbags
nike blazer pas cher
cheap michael kors handbags
saics running shoes
ecco shoes outlet
ralph lauren outlet online
michael kors handbags
nike outlet
nike trainers uk
ghd hair straighteners
new balance outlet
hugo boss outlet
supra shoes
nba jerseys
nike air huarache
ralph lauren outlet
polo ralph lauren outlet
nike blazer low
michael kors outlet store
nike trainers uk
hugo boss sale
armani exchange
fitflops
air jordan uk
cheap jordans
michael kors handbags
tiffany and co
supra shoes sale
michael kors handbags
dolce and gabbana
cheap nike shoes sale
new balance shoes
nike air force 1
michael kors handbags wholesale
omega watches
nike trainers
gucci sito ufficiale
michael kors outlet online
salomon boots
armani exchange outlet
michael kors handbags
yeezy boost 350
christian louboutin shoes
nike huarache
instyler max
nike tn pas cher
valentino shoes
nike trainers
ed hardy clothing
under armour outlet
michael kors handbags
fitflops sale clearance
nike free
michael kors handbags
michael kors handbags
cheap oakley sunglasses
oakley sunglasses
salomon shoes
cheap oakley sunglasses
oakley sunglasses
ghd flat iron
michael kors handbags
the north face
chaussure louboutin
cheap oakley sunglasses
michael kors handbags
pandora outlet
michael kors handbags
salvatore ferragamo
moncler outlet
converse shoes
nike blazer pas cher
true religion jeans
adidas nmd r1
louis vuitton pas cher
ray ban sunglasses
jordan shoes
mont blanc pens
michael kors handbags wholesale
replica watches
ecco shoes
ralph lauren
ray ban sunglasses
michael kors handbags outlet
abercrombie and fitch kids
michael kors handbags clearance
cheap ray bans
longchamp bags
oakley sunglasses
versace
ed hardy uk
pandora jewelry
mont blanc pens outlet
cheap nfl jerseys
michael kors outlet
dolce and gabbana shoes
basketball shoes
nike huarache
michael kors outlet
nike air huarache
michael kors outlet
versace shoes
air force 1 shoes
cheap michael kors handbags
michael kors handbags outlet
michael kors outlet
cheap nba jerseys
under armour shoes
ferragamo shoes
adidas nmd runner
michael kors handbags
nike blazer
reebok shoes
michael kors handbags wholesale
skechers shoes
chaussure louboutin pas cher
dolce and gabbana outlet
michael kors handbags
michael kors outlet online
cheap michael kors handbags
birkenstock sandals
air max 90
michael kors outlet clearance
birkenstocks
nike roshe run
yeezy boost 350 white
reebok outlet
moncler jackets
michael kors handbags sale
kobe 9 elite
nhl jerseys
michael kors handbags
michael kors outlet

Post new comment

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