[ajug-members] Web Application running on Tomcat hangs whileconnecting to DB

Joe Sam Shirah joe_sam at bellsouth.net
Mon Jun 18 01:59:17 EDT 2007


    You may also want to look at setQueryTimeout() in java.sql.Statement.


                                                         Joe Sam

Joe Sam Shirah -        http://www.conceptgo.com
conceptGO       -        Consulting/Development/Outsourcing
Java Filter Forum:       http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International?    http://www.jguru.com/faq/I18N
Que Java400?            http://www.jguru.com/faq/Java400


----- Original Message ----- 
From: "Mike Millson" <mgm at meritonlinesystems.com>
To: "General AJUG membership forum (100-200 messages/month)"
<ajug-members at ajug.org>
Sent: Sunday, June 17, 2007 3:01 PM
Subject: Re: [ajug-members] Web Application running on Tomcat hangs
whileconnecting to DB


> hsaid at checkfree.com wrote:
> > Members,
> > Here is the scenario:
> > - The web application running on Tomcat makes a connection to the
datbase
> > and waits for the response
> > - The processes on the Database max out so the Database node hangs
> > - The application goes into the hang mode waiting for the response from
> > the application.
> >
> > My question is : Is there a setting in Tomcat that would timeout the
> > application if the response packet from the application does come back
> > within a specified range? I know there is something one can do at the os
> > level for example for windows by change the TCP_Wait time by changing
the
> > registry, similarly for Solaris. Is this the only solution that is at
the
> > OS level that can be applied, or Tomcat has some setting that can
timeout
> > the connection if the response is taking too much time?
> The functionality you are looking for is available if you use a
> connection pool. Tomcat has commons-dbcp included. Please see the
following:
> http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html
>
> Mike
>
> _______________________________________________
> ajug-members mailing list
> ajug-members at ajug.org
> http://www.ajug.org/mailman/listinfo/ajug-members




More information about the ajug-members mailing list