File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Problem with database connection pooling resin+mysqlw Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Problem with database connection pooling resin+mysqlw" Watch "Problem with database connection pooling resin+mysqlw" New topic

Problem with database connection pooling resin+mysqlw

Alagapan Thiagarajan

Joined: May 31, 2001
Posts: 9

Urgent.. We are facing a problem with database connection pooling in our production setup.

Our current setup is:

JSP application running on Resin 3.0.12 web server with MySQL 4.0.23 database
We have configured database connection pooling as per resin documentation.

extracted from resin.conf:

<driver type="com.mysql.jdbc.Driver">

Problem description:

Randomly the application throws an SQLException with message as'Opearation not allowed after Resultset is closed' or 'Connection reset by peer'.

The datasource(ds) is looked up in the init method and the connection is opened once using ds.getConnection at the top of the

jsp page within a try block and is closed in the corresponding finally block at the very end of the jsp page. The connection

or the result set is not closed anywhere else except in the finally block.
( MySQL is configured with MaxConnections 100 )

Any kind of help is appreciated, Thank you !
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

Please don't post duplicate queries in multiple forums. I deleted the copy you left in JSP.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: Problem with database connection pooling resin+mysqlw
It's not a secret anymore!