Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 24134 invoked from network); 2 Jun 2007 01:42:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jun 2007 01:42:43 -0000 Received: (qmail 57372 invoked by uid 500); 2 Jun 2007 01:42:43 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 57316 invoked by uid 500); 2 Jun 2007 01:42:43 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 57305 invoked by uid 500); 2 Jun 2007 01:42:43 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 57302 invoked by uid 99); 2 Jun 2007 01:42:43 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2007 18:42:43 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2007 18:42:38 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 83C941A981D; Fri, 1 Jun 2007 18:42:18 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r543693 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/realm/JNDIRealm.java webapps/docs/changelog.xml Date: Sat, 02 Jun 2007 01:42:18 -0000 To: tomcat-dev@jakarta.apache.org From: markt@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070602014218.83C941A981D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: markt Date: Fri Jun 1 18:42:17 2007 New Revision: 543693 URL: http://svn.apache.org/viewvc?view=rev&rev=543693 Log: Port fix for 33774. Retry on ServiceUnavailableException Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java?view=diff&rev=543693&r1=543692&r2=543693 ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java Fri Jun 1 18:42:17 2007 @@ -35,6 +35,7 @@ import javax.naming.NameParser; import javax.naming.Name; import javax.naming.AuthenticationException; +import javax.naming.ServiceUnavailableException; import javax.naming.directory.Attribute; import javax.naming.directory.Attributes; import javax.naming.directory.DirContext; @@ -826,6 +827,21 @@ principal = authenticate(context, username, credentials); } catch (CommunicationException e) { + + // log the exception so we know it's there. + containerLog.warn(sm.getString("jndiRealm.exception"), e); + + // close the connection so we know it will be reopened. + if (context != null) + close(context); + + // open a new directory context. + context = open(); + + // Try the authentication again. + principal = authenticate(context, username, credentials); + + } catch (ServiceUnavailableException e) { // log the exception so we know it's there. containerLog.warn(sm.getString("jndiRealm.exception"), e); Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diff&rev=543693&r1=543692&r2=543693 ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Fri Jun 1 18:42:17 2007 @@ -18,6 +18,11 @@ + 33774 Retry JNDI authentiction on ServiceUnavailableException + as at least one provider throws this after an idle connection has been + closed. (markt) + + 39875: Fix BPE in RealmBase.init(). Port of yoavs's fix from Tomcat 5. (markt) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org