Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C2035D58E for ; Sun, 7 Oct 2012 13:41:56 +0000 (UTC) Received: (qmail 99189 invoked by uid 500); 7 Oct 2012 13:41:53 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 99047 invoked by uid 500); 7 Oct 2012 13:41:53 -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 99036 invoked by uid 99); 7 Oct 2012 13:41:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Oct 2012 13:41:53 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aladin.dajani@gmail.com designates 74.125.82.173 as permitted sender) Received: from [74.125.82.173] (HELO mail-we0-f173.google.com) (74.125.82.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Oct 2012 13:41:48 +0000 Received: by mail-we0-f173.google.com with SMTP id t11so2377788wey.18 for ; Sun, 07 Oct 2012 06:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=5rP6O/jA6YdsvK+TLwwljq2Gwa6Z69KnUNMC6DB0tSo=; b=xHOqW52CjDeglnRrjJMkay0E52KWbGDwr/TnIvpYuiCwlC6h9bsJKzHoqf7R7GTwtK 4TsJbgOAfzgQTRMeUxKITZh6/p58Yx/oQ8paaG/YRUTVmsNknjXUCayQDCr+1lmEqxqM jmTSpkQBzQb/dnJpzycn6gtQIke+frTkEp0pisgEUAoNNJlQROSa0wbSwbeJLvMlLvrX QkAtK+F+S9DY3vMtsPHfNtBgFrmBh4bhY0YfNkh5SLDkMGgp3pv4S+eEIIxuc6eIA740 +Y07w6B+6ceA5bqSBX8vHaJ/vos75BWHLtAgw/B1Q16np1lOMeT+I63HMLLm7zEJi+EP GBVA== MIME-Version: 1.0 Received: by 10.180.8.41 with SMTP id o9mr14901743wia.3.1349617286910; Sun, 07 Oct 2012 06:41:26 -0700 (PDT) Received: by 10.216.143.40 with HTTP; Sun, 7 Oct 2012 06:41:26 -0700 (PDT) In-Reply-To: References: Date: Sun, 7 Oct 2012 09:41:26 -0400 Message-ID: Subject: Re: JDBCRealm conection timeout failure on getPassword From: Aladin Dajani To: Tomcat Users List Content-Type: multipart/alternative; boundary=f46d04428f34f8124304cb7842d3 X-Virus-Checked: Checked by ClamAV on apache.org --f46d04428f34f8124304cb7842d3 Content-Type: text/plain; charset=ISO-8859-1 Thanks Felix, This does look like what I need. On Sun, Oct 7, 2012 at 9:36 AM, Felix Schumacher < felix.schumacher@internetallee.de> wrote: > > > Aladin Dajani schrieb: > > >Hello List, > > > >My application is configured for JDBCRealm authentication uses a MySQL > >database. > >For my own use inside the application, I have setup a connection pool > >to > >access the database, However, the configuration of JDBCRealm in > >server.xml > >uses astand-alone connection. Since MySQL times-out connections after > >8 > >hours, I get the following error in tomcat logs as I try to log-in > >after > >the connection times out: > > > >Oct 7, 2012 8:36:51 AM org.apache.catalina.realm.JDBCRealm getPassword > >SEVERE: Exception performing authentication > >com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: > >No > >operations allowed after connection closed.Connection was implicitly > >closed > >by the driver. > > > >Users do not notice this error (I presume tomcat's JDBCRealm will > >create a > >new connection), but it US disconcerting to have all these exceptions > >in > >tomcat logs, especially that when the server goes into production mode, > >I > >fear this will have adverse effects. > > > >Is it possible to have JDBDRealm use the same connection pool which my > >application uses (which is setup in tomcat's context.xml so it should > >be accessible to all applications in tomcat). > > Have a look at DatasourceRealm. > > Regards > Felix > > > >Thanks. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --f46d04428f34f8124304cb7842d3--