Solved

We are getting a 'Connection is already closed' exception from WebSphere 5 and jConnect 5.5

Posted on 2004-03-25
3
610 Views
Last Modified: 2013-12-10
We have an web application that uses a Sybase/JDBC Datasource.  We are utilziing the standard connection pooling provided by WebSphere 5 and the jConnect JDBC provider.  We are experiencing intermittent SqlExceptions "JZ0C0: Connection is already closed." when attempting to use connections returned from the Datasource.  We're fairly confident we are dutifully closing all of our statements, result sets and connections when we are done using them.  It is our understanding that when we close a connection, it is returned to the connection pool and is available for further use.

This appears to work properly most of the time.  We have not been able to reproduce it reliably.

-jon
0
Comment
Question by:jonprettyman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Accepted Solution

by:
mmuruganandam earned 250 total points
ID: 10877123
Make sure that all your connections are closed in the finally block of all your code.  There are chances that your connection might be closed based on one data condition and try to use the same connection in the same block for some other reason.

It is purely a code bug.


Regards,
Muruga
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question