geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r980389 - /geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Date Thu, 29 Jul 2010 10:17:29 GMT
Author: xuhaihong
Date: Thu Jul 29 10:17:29 2010
New Revision: 980389

URL: http://svn.apache.org/viewvc?rev=980389&view=rev
Log:
Remove jndi related items from deployment plan to prevent Tomcat handles them.

Modified:
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=980389&r1=980388&r2=980389&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Thu Jul 29 10:17:29 2010
@@ -264,7 +264,7 @@ public class TomcatModuleBuilder extends
             }
             //else ignore as jee5 allows optional spec dd for .war's
         }
-        
+
         if (webApp == null) {
             webApp = new WebApp();
         }
@@ -591,14 +591,29 @@ public class TomcatModuleBuilder extends
                 webModuleData.setReferencePattern("applicationPolicyConfigurationManager",
EARContext.JACC_MANAGER_NAME_KEY.get(earContext.getGeneralData()));
             }
             //not truly metadata complete until MBEs have run
-            if (!webApp.isMetadataComplete()) {
-                webApp.setMetadataComplete(true);
-                if (INITIAL_WEB_XML_SCHEMA_VERSION.get(earContext.getGeneralData()) >=
2.5f) {
-                    String specDeploymentPlan = getSpecDDAsString(webModule);
-                    module.setOriginalSpecDD(specDeploymentPlan);
-                    earContext.addFile(new URI("./WEB-INF/web.xml"), specDeploymentPlan);
-                }
-            }
+            //Those elements have been processed by Geronimo, Tomatt no need to do it now.
+            //Also, currently, it seems that Tomcat could not handle those jndi elements
correctly
+            webApp.getEjbLocalRef().clear();
+            webApp.getEjbRef().clear();
+            webApp.getEnvEntry().clear();
+            webApp.getMessageDestination().clear();
+            webApp.getMessageDestinationRef().clear();
+            webApp.getPersistenceContextRef().clear();
+            webApp.getPersistenceUnitRef().clear();
+            webApp.getPostConstruct().clear();
+            webApp.getPreDestroy().clear();
+            webApp.getResourceEnvRef().clear();
+            webApp.getResourceRef().clear();
+            webApp.getServiceRef().clear();
+            webApp.getDataSource().clear();
+            //if (!webApp.isMetadataComplete()) {
+            webApp.setMetadataComplete(true);
+            //if (INITIAL_WEB_XML_SCHEMA_VERSION.get(earContext.getGeneralData()) >= 2.5f)
{
+            String specDeploymentPlan = getSpecDDAsString(webModule);
+            module.setOriginalSpecDD(specDeploymentPlan);
+            earContext.addFile(new URI("./WEB-INF/web.xml"), specDeploymentPlan);
+            //}
+            //}
             webModuleData.setAttribute("deploymentDescriptor", module.getOriginalSpecDD());
             module.addAsChildConfiguration();
         } catch (DeploymentException de) {



Mime
View raw message