tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1414311 - /openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatJndiBuilder.java
Date Tue, 27 Nov 2012 18:46:20 GMT
Author: rmannibucau
Date: Tue Nov 27 18:46:19 2012
New Revision: 1414311

URL: http://svn.apache.org/viewvc?rev=1414311&view=rev
Log:
TOMEE-610 a bit longer but more sure way to find the webcontext from standardcontext

Modified:
    openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatJndiBuilder.java

Modified: openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatJndiBuilder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatJndiBuilder.java?rev=1414311&r1=1414310&r2=1414311&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatJndiBuilder.java
(original)
+++ openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatJndiBuilder.java
Tue Nov 27 18:46:19 2012
@@ -207,6 +207,16 @@ public class TomcatJndiBuilder {
         TomcatWebAppBuilder.ContextInfo contextInfo = null;
         if (builder != null) {
             contextInfo = builder.getContextInfo(standardContext);
+            if (webContext == null && contextInfo.appInfo != null) { // can happen
if deployed from apps/
+                for (WebAppInfo webAppInfo : contextInfo.appInfo.webApps) {
+                    if (webAppInfo.path != null && webAppInfo.path.equals(standardContext.getDocBase()))
{
+                        webContext = cs.getWebContext(webAppInfo.moduleId);
+                        if (webContext != null) {
+                            break;
+                        }
+                    }
+                }
+            }
         }
         Collection<String> ignoreNames = null;
         if (contextInfo != null) {



Mime
View raw message