geronimo-scm mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=980431&view=rev
Log:
I am too aggressive in the last commit, we should only update the deployment descriptor if
the version is after 2.5

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=980431&r1=980430&r2=980431&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 13:05:32 2010
@@ -591,28 +591,28 @@ public class TomcatModuleBuilder extends
                 webModuleData.setReferencePattern("applicationPolicyConfigurationManager",
EARContext.JACC_MANAGER_NAME_KEY.get(earContext.getGeneralData()));
             }
             //not truly metadata complete until MBEs have run
-            //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);
-            //}
+            if (INITIAL_WEB_XML_SCHEMA_VERSION.get(earContext.getGeneralData()) >= 2.5f)
{
+                //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.setMetadataComplete(true);
+                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();
+                String specDeploymentPlan = getSpecDDAsString(webModule);
+                module.setOriginalSpecDD(specDeploymentPlan);
+                earContext.addFile(new URI("./WEB-INF/web.xml"), specDeploymentPlan);
+            }
             //}
             webModuleData.setAttribute("deploymentDescriptor", module.getOriginalSpecDD());
             module.addAsChildConfiguration();



Mime
View raw message