Solved

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

Posted on 2004-03-25
3
595 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
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now