Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 95576 invoked from network); 6 Oct 2006 12:08:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Oct 2006 12:08:24 -0000 Received: (qmail 62930 invoked by uid 500); 6 Oct 2006 12:08:12 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 62913 invoked by uid 500); 6 Oct 2006 12:08:12 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 62902 invoked by uid 99); 6 Oct 2006 12:08:12 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Oct 2006 05:08:12 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from [128.253.83.141] ([128.253.83.141:64445] helo=authusersmtp.mail.cornell.edu) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 2A/F7-18133-72746254 for ; Fri, 06 Oct 2006 05:08:08 -0700 Received: from [128.253.38.244] (defiant.ento.cornell.edu [128.253.38.244]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.13.1/8.12.10) with ESMTP id k96C843c010891 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 6 Oct 2006 08:08:04 -0400 (EDT) Message-ID: <45264724.8080509@cornell.edu> Date: Fri, 06 Oct 2006 08:08:04 -0400 From: David Smith User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tomcat Users List Subject: Re: error while running a webapp References: <3A55348B50FD2A40AAA40ABA16C6B6D609029A26@EXNJMB23.nam.nsroot.net> <000001c6e8d5$6743ea20$7127830a@objectivepartner.de> <4eedb92a0610051656ud6f7a2ev20972a97e6da5ccb@mail.gmail.com> In-Reply-To: <4eedb92a0610051656ud6f7a2ev20972a97e6da5ccb@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N A word of caution -- autoReconnect=true is more a hack than a solution. Recent experience of users in another list I'm on suggest it's really hit or miss whether it actually recovers a stale connection or not. It's best in a design pattern to implement a connection pool and be sure to close connections as soon as possible -- from connection open to close within a single method call if possible. If you're worried about the overhead of building and closing connections, calling close() on a pooled connection really just returns it to the pool. As far as the OP's problem is concerned, some additional information like relevant log and code excerpts would be most helpful. We really don't know that it's a db connection problem or something else. --David Hassan Schroeder wrote: > On 10/5/06, Oliver Wagner wrote: > >> >> I think the DB close the connection while the tomcat is running and I >> don't know (at my Connection-Pool) how to know when that happened. > > > set > autoReconnect=true > in your driver config, or catch the exception when the timeout occurs > and retry connecting to see if it's a simple timeout/transient failure or > something more persistent. > > HTH! --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org