Look for something like this: Try { statement.execUupdate("some statement"); } catch (SQLException se){ }
Make sure that the catch has: conn.rollback(); In JDBC, a failed update leaves the underlying record locked until it is rolled back. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 > -----Original Message----- > From: Larry Johnson [mailto:[EMAIL PROTECTED] > Sent: Monday, March 14, 2005 2:39 PM > To: tomcat-user@jakarta.apache.org > Subject: tomcat freezes when accessing db after several queries > > Hi all, > > I've encountered a rather strange error that I need some help > getting to the bottom of. Recently I lost the hard drive on > one of my tomcat > application servers. I've since reinstalled and set everything on the > effected machine to mirror the configuration of my other app > servers (which > are working fine). However, now when I access the webapp on > this server > tomcat seems to freeze (like it's waiting for something) after several > queries to the database are executed. After this happens I am > unable to > shutdown tomcat without finding the process number and > terminating it using > kill -9 as shutdown.sh fails to halt execution. This seems > pretty strange to > me since one, the problem occurs without any errors appearing in > catalina.out or the localhost_log files and two the webapp is > able to access > the DB with several queries before it encounters any > problems. Does anyone > have any ideas what may be causing this to happen? > > Thanks in advance, > > Larry > > Here's some info about my runtime environment: > > OS: Redhat 9 > Tomcat: 5.0.28 > JVM: 1.5.02 > DB: Oracle 9i > > Here's the JDBC connection pool XML I'm using: > > <?xml version='1.0' encoding='utf-8'?> > <Context docBase="/opt/tomcat/webapps/jupiter" path="" cookies="false" > workDir="work/Catalina/localhost/jupiter"> > <Resource auth="Container" description="Oracle datasource pool. See > server.xml file." name="jdbc/EnvictusDB" > type="javax.sql.DataSource"/> > <ResourceParams name="jdbc/EnvictusDB"> > <parameter> > <name>factory</name> > <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> > </parameter> > <parameter> > <name>password</name> > <value>3nv1ctus</value> > </parameter> > <parameter> > <name>url</name> > <value>jdbc:oracle:thin:@11.10.10.1:1521:dbname</value> > </parameter> > <parameter> > <name>driverClassName</name> > <value>oracle.jdbc.driver.OracleDriver</value> > </parameter> > <parameter> > <name>maxActive</name> > <value>0</value> > </parameter> > <parameter> > <name>maxIdle</name> > <value>40</value> > </parameter> > <parameter> > <name>maxWait</name> > <value>15000</value> > </parameter> > <parameter> > <name>username</name> > <value>envictus</value> > </parameter> > <parameter> > <name>removeAbandoned</name> > <value>true</value> > </parameter> > <parameter> > <name>removedAbandonedTimeout</name> > <value>60</value> > </parameter> > </ResourceParams> > </Context> > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]