Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 32727 invoked from network); 12 Jun 2002 19:50:35 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 12 Jun 2002 19:50:35 -0000 Received: (qmail 26306 invoked by uid 97); 12 Jun 2002 19:50:13 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 26271 invoked by uid 97); 12 Jun 2002 19:50:12 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 26259 invoked by uid 98); 12 Jun 2002 19:50:12 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Date: Wed, 12 Jun 2002 15:49:53 -0400 From: Kevin Andryc Subject: RE: Database locked by Tomcat In-reply-to: <34385CBC5E8E664EB0007814636AB36A1F658A@exchange1.dimensions.com> To: Tomcat Users List Message-id: MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Content-type: text/plain; charset=Windows-1252 Content-transfer-encoding: 7BIT Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Unfortunately I am not using Oracle. I am connecting to a Dbase database (.DBF). Kevin Andryc Web Systems Engineer MISER http://www.umass.edu/miser/ Phone: (413)-545-3460 kandryc@miser.umass.edu -----Original Message----- From: Scott Purcell [mailto:spurcell@vertisinc.com] Sent: Wednesday, June 12, 2002 03:46 PM To: Tomcat Users List Subject: RE: Database locked by Tomcat Toad is a terrific database tool, for Oracle: http://www.toadsoft.com/ It is a 5 star product. -----Original Message----- From: Kevin Andryc [mailto:kandryc@miser.umass.edu] Sent: Wednesday, June 12, 2002 2:41 PM To: Tomcat Users List Subject: RE: Database locked by Tomcat What is Toad? Kevin Andryc Web Systems Engineer MISER http://www.umass.edu/miser/ Phone: (413)-545-3460 kandryc@miser.umass.edu -----Original Message----- From: Scott Purcell [mailto:spurcell@vertisinc.com] Sent: Wednesday, June 12, 2002 03:36 PM To: Tomcat Users List Subject: RE: Database locked by Tomcat Have you updated any record using Toad? I updated some records in toad and forgot to hit commit, and it screwed me up for hours. My code that worked earlier stopped working and I was getting all kinds of wierd problems. I went back to toad, hit commit, and all problems disappeared. -----Original Message----- From: Kevin Andryc [mailto:kandryc@miser.umass.edu] Sent: Wednesday, June 12, 2002 1:07 PM To: Tomcat Users List Subject: RE: Database locked by Tomcat Hi Jeff, Thanks for the suggestion and code. I have tried this and Tomcat still holds the database. I know this because I have a program from Sysinternals that lists the files held by a process and the database is one of them. But here is the weird part. After some amount of time, the database does get released. I am lost at this point. Any more suggestions? Thanks, Kevin Kevin Andryc Web Systems Engineer MISER http://www.umass.edu/miser/ Phone: (413)-545-3460 kandryc@miser.umass.edu -----Original Message----- From: jeff.guttadauro@abbott.com [mailto:jeff.guttadauro@abbott.com] Sent: Tuesday, June 11, 2002 01:54 PM To: Tomcat Users List Subject: Re: Database locked by Tomcat Hi, Kevin. Correction: Database locked by YOU! :) You've closed the statement but not the connection. You need a conn.close() after the commit. This shouldn't lock the database by itself, although if you keep leaving connections open, then you will eventually hit a connection max limit, which could be what's hanging it. I would also recommend that you put all that stuff in a try block and finally close the connection, something like this: Statement stmt = null; Connection conn = DriverManager.getConnection(dbfUrl, "", ""); try { // do some stuff conn.commit(); } catch(Exception e) { conn.rollback(); } finally { if ( stmt != null ) { try { stmt.close(); } catch(SQLException e) { // handle or ignore } } conn.close(); } HTH, Jeff Kevin Andryc umass.edu> cc: Subject: Database locked by Tomcat 06/11/02 12:44 PM Please respond to "Tomcat Users List" I am Running Tomcat 4.0 on Windows 2000. I have a servlet, which calls a program that connects to a DBF database natively (not using JDBC-ODBC) and updates records in the database. The problem I am having is that Tomcat does not release the database until I restart the Tomcat service. I close the connection and even do a "commit()". Has anyone else had a problem and if so, is there a solution? Below is some sample code: Class.forName(dbfDriverName).newInstance(); Connection conn = DriverManager.getConnection(dbfUrl, "", ""); Statement stmt = conn.createStatement(); // do some stuff statement.close(); connection.commit(); Thanks, Kevin -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: