Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D3720951E for ; Fri, 1 Jun 2012 21:33:41 +0000 (UTC) Received: (qmail 12480 invoked by uid 500); 1 Jun 2012 21:33:41 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 12427 invoked by uid 500); 1 Jun 2012 21:33:41 -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 12416 invoked by uid 99); 1 Jun 2012 21:33:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2012 21:33:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2012 21:33:40 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CE19F238890B for ; Fri, 1 Jun 2012 21:33:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1345357 - /tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java Date: Fri, 01 Jun 2012 21:33:19 -0000 To: dev@tomcat.apache.org From: kkolinko@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120601213319.CE19F238890B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kkolinko Date: Fri Jun 1 21:33:19 2012 New Revision: 1345357 URL: http://svn.apache.org/viewvc?rev=1345357&view=rev Log: For https://issues.apache.org/bugzilla/show_bug.cgi?id=53257 Review of r1344902: Restore passing DirContextURLStreamHandler instance into the new URL. Note that we use "new DirContextURLStreamHandler(DirContext)" and thus the handler will not need to call DirContextURLStreamHandler#get() to retrieve the context. Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=1345357&r1=1345356&r2=1345357&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java Fri Jun 1 21:33:19 2012 @@ -67,6 +67,7 @@ import org.apache.catalina.connector.Con import org.apache.catalina.deploy.FilterDef; import org.apache.catalina.util.ResourceSet; import org.apache.catalina.util.ServerInfo; +import org.apache.naming.resources.DirContextURLStreamHandler; import org.apache.naming.resources.Resource; import org.apache.tomcat.util.ExceptionUtils; import org.apache.tomcat.util.buf.CharChunk; @@ -517,8 +518,9 @@ public class ApplicationContext String hostName = context.getParent().getName(); try { resources.lookup(normPath); - return new URI("jndi", - getJNDIUri(hostName, fullPath), null).toURL(); + URI uri = new URI("jndi", getJNDIUri(hostName, fullPath), null); + return new URL(null, uri.toString(), + new DirContextURLStreamHandler(resources)); } catch (NamingException e) { // Ignore } catch (Exception e) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org