Are you using a servlet instance variable to hold a ref to the connection object? This sounds to me like it is the case. Remember, there is only one instance of the servlet and all concurrent request threads use that same instance. I generally tell our programmers to treat servlet instance variable as if they were declared "static".
-----Original Message----- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED] Behalf Of Jonathan Felmey Sent: Tuesday, July 13, 2004 9:36 AM To: [EMAIL PROTECTED] Subject: Sporadic Connection closed in Servlet Sessons We are using a Servlet/JSP/Struts/Tomcat package for our web application. We have a number of servlets that start off by getting a connection to a MSSQL 7.0 Database via Tomcat connection pooling in the execute method of the Action Servlet.. Our database driver of choise is the Free TDS driver. The connection is passed to several Data Access Bean methods which perform all of our interaction with the DB. In our finally block, the connection is closed and set to null. When we have concurrent users it seems that when one instance of the servlet closes its connection, the other instance's connection is also closed or so it appears. At some point in the servlets life cycle we get a connection closed error. It does not happen every time. We can go 10 times without seeing it before it pops up and it doesn't pop up in the same place. I've searched the list but haven't found any matches to this particular problem. Can anyone point us in the right direction. Thanks, Jon ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html The information contained in this e-mail may be confidential and is intended solely for the use of the named addressee. Access, copying or re-use of the e-mail or any information contained therein by any other person is not authorized. If you are not the intended recipient please notify us immediately by returning the e-mail to the originator.(A) ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html