Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet with connection to database

 
Thomas Sutton
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been load testing our code which takes a request from the website performs some checking then updates a db2 database table. We are using a jdbc connection pool and everything is fine until I increased the number of requests to around 3 per second. Then we start to see some strange behaviour. Connections to the db seem to be closed by themselves, connection.close() is not called on the connections that have closed prematurely I'm sure of that. I have checked through the code several times and can't find a reason for this. Does this point to a problem with the jdbc connection pool or the database itself?

Thanks
 
Scott Selikoff
author
Saloon Keeper
Posts: 4014
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you closing the connections yourself? Just because it's in a pool, doesn't mean you shouldn't close every connection in a finally block.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic