geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1051765 - /geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
Date Wed, 22 Dec 2010 06:11:23 GMT
Author: xuhaihong
Date: Wed Dec 22 06:11:22 2010
New Revision: 1051765

URL: http://svn.apache.org/viewvc?rev=1051765&view=rev
Log:
Use new DeploymentLoader to avoid unnecessary loading actions

Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java?rev=1051765&r1=1051764&r2=1051765&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
Wed Dec 22 06:11:22 2010
@@ -23,6 +23,7 @@ import java.net.URL;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.LinkedList;
@@ -104,6 +105,7 @@ import org.apache.openejb.config.ClearEm
 import org.apache.openejb.config.CmpJpaConversion;
 import org.apache.openejb.config.ConfigurationFactory;
 import org.apache.openejb.config.DeploymentLoader;
+import org.apache.openejb.config.DeploymentModule;
 import org.apache.openejb.config.DynamicDeployer;
 import org.apache.openejb.config.FinderFactory;
 import org.apache.openejb.config.GeneratedClientModules;
@@ -299,8 +301,11 @@ public class EjbModuleBuilder implements
         if (targetPath == null) throw new NullPointerException("targetPath is null");
         if (targetPath.endsWith("/")) throw new IllegalArgumentException("targetPath must
not end with a '/'");
 
-        // Load the module file
-        DeploymentLoader loader = new DeploymentLoader(ddDir);
+        // Load the module file, except for ejb module, ejb web service seems also used the
parsed data by DeploymentLoader
+        Set<Class<? extends DeploymentModule>> loadingRequiredModuleTypes = new
HashSet<Class<? extends DeploymentModule>>();
+        loadingRequiredModuleTypes.add(org.apache.openejb.config.EjbModule.class);
+        loadingRequiredModuleTypes.add(org.apache.openejb.config.WsModule.class);
+        DeploymentLoader loader = new DeploymentLoader(ddDir, loadingRequiredModuleTypes);
         AppModule appModule;
         try {
             appModule = loader.load(new File(moduleFile.getName()));



Mime
View raw message