Author: jlmonteiro
Date: Mon Jan 10 08:01:54 2011
New Revision: 1057107

URL: http://svn.apache.org/viewvc?rev=1057107&view=rev
Log:
Change the module name by the module id in the map to avoid NPE when not 
running in Tomcat.

Modified:
    
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java

Modified: 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java
URL: 
http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java?rev=1057107&r1=1057106&r2=1057107&view=diff
==============================================================================
--- 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java
 (original)
+++ 
openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java
 Mon Jan 10 08:01:54 2011
@@ -611,6 +611,7 @@ public class DeploymentLoader implements
         ClassLoader webClassLoader = webModule.getClassLoader();
 
         // get include/exclude properties from context-param
+        // using a Set instead of a list would be easier ...
         Options contextParams = new 
Options(getContextParams(webModule.getWebApp().getContextParam()));
         String include = contextParams.get(CLASSPATH_INCLUDE, "");
         String exclude = contextParams.get(CLASSPATH_EXCLUDE, ".*");
@@ -618,8 +619,8 @@ public class DeploymentLoader implements
         boolean filterDescriptors = 
contextParams.get(CLASSPATH_FILTER_DESCRIPTORS, false);
         boolean filterSystemApps = 
contextParams.get(CLASSPATH_FILTER_SYSTEMAPPS, true);
 
-        contextParams.getProperties().put(moduleName, warPath);
-        FileUtils base = new FileUtils(moduleName, moduleName, 
contextParams.getProperties());
+        contextParams.getProperties().put(webModule.getModuleId(), warPath);
+        FileUtils base = new FileUtils(webModule.getModuleId(), 
webModule.getModuleId(), contextParams.getProperties());
         DeploymentsResolver.loadFromClasspath(base, urls, webClassLoader, 
include, exclude, requireDescriptors, filterDescriptors, filterSystemApps);
 
         // we need to exclude previously deployed modules


Reply via email to