geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r385623 - in /geronimo/branches/1.1/modules: client-builder/src/java/org/apache/geronimo/client/builder/ connector-builder/src/java/org/apache/geronimo/connector/deployment/ connector-builder/src/test/org/apache/geronimo/connector/deploymen...
Date Mon, 13 Mar 2006 19:19:12 GMT
Author: djencks
Date: Mon Mar 13 11:19:10 2006
New Revision: 385623

URL: http://svn.apache.org/viewcvs?rev=385623&view=rev
Log:
slight cleanup of ear context

Modified:
    geronimo/branches/1.1/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
    geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
    geronimo/branches/1.1/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
    geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
    geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
    geronimo/branches/1.1/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
    geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
    geronimo/branches/1.1/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
    geronimo/branches/1.1/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
    geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java

Modified: geronimo/branches/1.1/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java?rev=385623&r1=385622&r2=385623&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
(original)
+++ geronimo/branches/1.1/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
Mon Mar 13 11:19:10 2006
@@ -292,6 +292,7 @@
                     clientEnvironment,
                     ConfigurationModuleType.CAR,
                     kernel,
+                    null, //no server name needed on client
                     clientBaseName,
                     transactionContextManagerObjectName,
                     connectionTrackerObjectName,
@@ -300,9 +301,9 @@
                     corbaGBeanObjectName,
                     RefContext.derivedClientRefContext(earContext.getRefContext(), ejbReferenceBuilder,
resourceReferenceBuilder, serviceReferenceBuilder));
             appClientModule.setEarContext(appClientDeploymentContext);
-        } catch (Exception e) {
+        } catch (DeploymentException e) {
             DeploymentUtil.recursiveDelete(appClientDir);
-            throw new DeploymentException("Could not create a deployment context for the
app client", e);
+            throw e;
         }
 
     }
@@ -345,9 +346,9 @@
         Map componentContext;
         GBeanData appClientModuleGBeanData = new GBeanData(appClientModuleName, J2EEAppClientModuleImpl.GBEAN_INFO);
         try {
-            appClientModuleGBeanData.setReferencePatterns("J2EEServer", Collections.singleton(earContext.getServerObjectName()));
-            if (!earContext.getJ2EEApplicationName().equals("null")) {
-                appClientModuleGBeanData.setReferencePatterns("J2EEApplication", Collections.singleton(earContext.getApplicationName()));
+            appClientModuleGBeanData.setReferencePatterns("J2EEServer", Collections.singleton(earContext.getServerName()));
+            if (!module.isStandAlone()) {
+                appClientModuleGBeanData.setReferencePatterns("J2EEApplication", Collections.singleton(earContext.getModuleName()));
             }
             appClientModuleGBeanData.setAttribute("deploymentDescriptor", appClientModule.getOriginalSpecDD());
 

Modified: geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?rev=385623&r1=385622&r2=385623&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
(original)
+++ geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Mon Mar 13 11:19:10 2006
@@ -280,7 +280,7 @@
         GBeanData resourceAdapterModuleData = new GBeanData(resourceAdapterModuleName, ResourceAdapterModuleImplGBean.GBEAN_INFO);
 
         // initalize the GBean
-        resourceAdapterModuleData.setReferencePattern(NameFactory.J2EE_SERVER, earContext.getServerObjectName());
+        resourceAdapterModuleData.setReferencePattern(NameFactory.J2EE_SERVER, earContext.getServerName());
         if (!earContext.getModuleName().equals(resourceAdapterModuleName)) {
             resourceAdapterModuleData.setReferencePattern(NameFactory.J2EE_APPLICATION, earContext.getModuleName());
         }
@@ -381,7 +381,7 @@
         if (resourceModule.isStandAlone()) {
             resourceAdapterModuleName = earContext.getModuleName();
         } else {
-            AbstractName applicationName = earContext.getApplicationName();
+            AbstractName applicationName = earContext.getModuleName();
             resourceAdapterModuleName = NameFactory.getChildName(applicationName, NameFactory.RESOURCE_ADAPTER_MODULE,
module.getName(), null);
         }
         AbstractName resourceAdapterjsr77Name = NameFactory.getChildName(resourceAdapterModuleName,
NameFactory.RESOURCE_ADAPTER, module.getName(), null);
@@ -801,7 +801,7 @@
         // ConnectionFactory
         AbstractName connectionFactoryAbstractName = NameFactory.getChildName(jcaResourceName,
NameFactory.JCA_CONNECTION_FACTORY, connectiondefinitionInstance.getName().trim(), null);
         GBeanData connectionFactoryGBeanData = new GBeanData(connectionFactoryAbstractName,
JCAConnectionFactoryImplGBean.GBEAN_INFO);
-        connectionFactoryGBeanData.setReferencePattern("J2EEServer", earContext.getServerObjectName());
+        connectionFactoryGBeanData.setReferencePattern("J2EEServer", earContext.getServerName());
         connectionFactoryGBeanData.setAttribute("managedConnectionFactory", managedConnectionFactoryAbstractName.getObjectName().getCanonicalName());
 
         try {

Modified: geronimo/branches/1.1/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java?rev=385623&r1=385622&r2=385623&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
(original)
+++ geronimo/branches/1.1/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
Mon Mar 13 11:19:10 2006
@@ -358,7 +358,7 @@
                         module.getEnvironment(),
                         module.getType(),
                         kernel,
-                        j2eeContext.getJ2eeApplicationName(),
+                        serverName, j2eeContext.getJ2eeApplicationName(),
                         null,
                         connectionTrackerName,
                         null,

Modified: geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java?rev=385623&r1=385622&r2=385623&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
(original)
+++ geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
Mon Mar 13 11:19:10 2006
@@ -91,6 +91,8 @@
     private final ServiceReferenceBuilder serviceReferenceBuilder;
 
     private final Environment defaultEnvironment;
+    //TODO configid FIXME
+    private final AbstractNameQuery serverName = null;
     private final AbstractNameQuery transactionContextManagerObjectName;
     private final AbstractNameQuery connectionTrackerObjectName;
     private final AbstractNameQuery transactionalTimerObjectName;
@@ -182,8 +184,7 @@
         GerApplicationType gerApplication = null;
         try {
             // load the geronimo-application.xml from either the supplied plan or from the
earFile
-            GerApplicationDocument gerApplicationDoc = null;
-            XmlObject rawPlan = null;
+            XmlObject rawPlan;
             try {
                 if (planFile != null) {
                     rawPlan = XmlBeansUtil.parse(planFile.toURL());
@@ -211,7 +212,7 @@
         EnvironmentType environmentType = gerApplication.getEnvironment();
         Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
 
-        AbstractName earName = null;
+        AbstractName earName;
         try {
             earName = NameFactory.buildApplicationName(environment.getProperties(), environment.getConfigId());
         } catch (MalformedObjectNameException e) {
@@ -290,31 +291,28 @@
         ApplicationInfo applicationInfo = (ApplicationInfo) plan;
         try {
             // Create the output ear context
-            EARContext earContext = null;
+            EARContext earContext;
             ConfigurationModuleType applicationType = applicationInfo.getType();
             Environment environment = applicationInfo.getEnvironment();
             Artifact configId = environment.getConfigId();
-            File configurationDir = null;
+            File configurationDir;
             try {
                 configurationDir = configurationStore.createNewConfigurationDir(configId);
             } catch (ConfigurationAlreadyExistsException e) {
                 throw new DeploymentException(e);
             }
-            try {
-                earContext = new EARContext(configurationDir,
-                        applicationInfo.getEnvironment(),
-                        applicationType,
-                        kernel,
-                        applicationInfo.getBaseName(),
-                        transactionContextManagerObjectName,
-                        connectionTrackerObjectName,
-                        transactionalTimerObjectName,
-                        nonTransactionalTimerObjectName,
-                        corbaGBeanObjectName,
-                        new RefContext(ejbReferenceBuilder, resourceReferenceBuilder, serviceReferenceBuilder,
kernel));
-            } catch (MalformedObjectNameException e) {
-                throw new DeploymentException(e);
-            }
+            earContext = new EARContext(configurationDir,
+                    applicationInfo.getEnvironment(),
+                    applicationType,
+                    kernel,
+                    serverName,
+                    applicationInfo.getBaseName(),
+                    transactionContextManagerObjectName,
+                    connectionTrackerObjectName,
+                    transactionalTimerObjectName,
+                    nonTransactionalTimerObjectName,
+                    corbaGBeanObjectName,
+                    new RefContext(ejbReferenceBuilder, resourceReferenceBuilder, serviceReferenceBuilder,
kernel));
 
             // Copy over all files that are _NOT_ modules
             Set moduleLocations = applicationInfo.getModuleLocations();
@@ -351,7 +349,7 @@
 
             // Create the J2EEApplication managed object
             if (ConfigurationModuleType.EAR == applicationType) {
-                GBeanData gbeanData = new GBeanData(earContext.getApplicationName(), J2EEApplicationImpl.GBEAN_INFO);
+                GBeanData gbeanData = new GBeanData(earContext.getModuleName(), J2EEApplicationImpl.GBEAN_INFO);
                 try {
                     String originalSpecDD = applicationInfo.getOriginalSpecDD();
                     if (originalSpecDD == null) {
@@ -361,7 +359,7 @@
                 } catch (Exception e) {
                     throw new DeploymentException("Error initializing J2EEApplication managed
object");
                 }
-                gbeanData.setReferencePattern("j2eeServer", earContext.getServerObjectName());
+                gbeanData.setReferencePattern("j2eeServer", earContext.getServerName());
                 earContext.addGBean(gbeanData);
             }
 
@@ -380,7 +378,7 @@
             //add the JACC gbean if there is a principal-role mapping
             //TODO configid verify that the jaccManagerName is not needed before this.  cf.
how this is handled in 1.2 branch.
             if (earContext.getSecurityConfiguration() != null) {
-                GBeanData jaccBeanData = null;
+                GBeanData jaccBeanData;
                 try {
                     jaccBeanData = SecurityBuilder.configureApplicationPolicyManager(earContext.getModuleName(),
earContext.getContextIDToPermissionsMap(), earContext.getSecurityConfiguration());
                 } catch (MalformedObjectNameException e) {
@@ -536,7 +534,7 @@
             GerExtModuleType gerExtModuleTypes[] = gerApplication.getExtModuleArray();
             for (int i = 0; i < gerExtModuleTypes.length; i++) {
                 GerExtModuleType gerExtModule = gerExtModuleTypes[i];
-                String moduleName = null;
+                String moduleName;
                 ModuleBuilder builder;
                 Object moduleContextInfo = null;
                 String moduleTypeName;
@@ -581,7 +579,7 @@
                 }
                 Object vendorDD = anys[0];
 
-                JarFile moduleFile = null;
+                JarFile moduleFile;
                 if (gerExtModule.isSetInternalPath()) {
                     String modulePath = gerExtModule.getInternalPath().trim();
                     moduleLocations.add(modulePath);

Modified: geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java?rev=385623&r1=385622&r2=385623&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
(original)
+++ geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
Mon Mar 13 11:19:10 2006
@@ -16,29 +16,23 @@
  */
 package org.apache.geronimo.j2ee.deployment;
 
-import java.io.File;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import javax.management.MalformedObjectNameException;
-
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.DeploymentContext;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.security.deployment.SecurityConfiguration;
 
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
 /**
  * @version $Rev$ $Date$
  */
 public class EARContext extends DeploymentContext implements NamingContext {
-    private final AbstractName domainObjectName;
-    private final AbstractName serverObjectName;
-    private final AbstractName applicationName;
 
     private final AbstractNameQuery transactionContextManagerObjectName;
     private final AbstractNameQuery connectionTrackerObjectName;
@@ -50,18 +44,16 @@
 
     private final RefContext refContext;
     private final AbstractName moduleName;
+    private final AbstractNameQuery serverName;
 
     private final Map contextIDToPermissionsMap = new HashMap();
     private AbstractName jaccManagerName;
     private SecurityConfiguration securityConfiguration;
 
-    public EARContext(File baseDir, Environment environment, ConfigurationModuleType moduleType,
Kernel kernel, AbstractName baseName, AbstractNameQuery transactionContextManagerObjectName,
AbstractNameQuery connectionTrackerObjectName, AbstractNameQuery transactedTimerName, AbstractNameQuery
nonTransactedTimerName, AbstractNameQuery corbaGBeanObjectName, RefContext refContext) throws
MalformedObjectNameException, DeploymentException {
+    public EARContext(File baseDir, Environment environment, ConfigurationModuleType moduleType,
Kernel kernel, AbstractNameQuery serverName, AbstractName baseName, AbstractNameQuery transactionContextManagerObjectName,
AbstractNameQuery connectionTrackerObjectName, AbstractNameQuery transactedTimerName, AbstractNameQuery
nonTransactedTimerName, AbstractNameQuery corbaGBeanObjectName, RefContext refContext) throws
DeploymentException {
         super(baseDir, environment, moduleType, kernel);
-            moduleName = baseName;
-            applicationName = moduleName;
-        //TODO configId FIXME
-        domainObjectName = null;//NameFactory.getDomainName(null, moduleName);
-        serverObjectName = null;//NameFactory.getServerName(null, null, moduleName);
+        moduleName = baseName;
+        this.serverName = serverName;
 
         this.transactionContextManagerObjectName = transactionContextManagerObjectName;
         this.connectionTrackerObjectName = connectionTrackerObjectName;
@@ -71,28 +63,8 @@
         this.refContext = refContext;
     }
 
-    public String getJ2EEDomainName() {
-        return moduleName.getObjectName().getKeyProperty(NameFactory.J2EE_DOMAIN);
-    }
-
-    public String getJ2EEServerName() {
-        return moduleName.getObjectName().getKeyProperty(NameFactory.J2EE_SERVER);
-    }
-
-    public String getJ2EEApplicationName() {
-        return moduleName.getObjectName().getKeyProperty(NameFactory.J2EE_APPLICATION);
-    }
-
-    public AbstractName getDomainObjectName() {
-        return domainObjectName;
-    }
-
-    public AbstractName getServerObjectName() {
-        return serverObjectName;
-    }
-
-    public AbstractName getApplicationName() {
-        return applicationName;
+    public AbstractNameQuery getServerName() {
+        return serverName;
     }
 
     public AbstractNameQuery getTransactionContextManagerObjectName() {

Modified: geronimo/branches/1.1/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?rev=385623&r1=385622&r2=385623&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/branches/1.1/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Mon Mar 13 11:19:10 2006
@@ -339,9 +339,9 @@
 
         GBeanData webModuleData = new GBeanData(moduleName, JettyWebAppContext.GBEAN_INFO);
         try {
-            webModuleData.setReferencePattern("J2EEServer", moduleContext.getServerObjectName());
-            if (!moduleContext.getJ2EEApplicationName().equals("null")) {
-                webModuleData.setReferencePattern("J2EEApplication", moduleContext.getApplicationName());
+            webModuleData.setReferencePattern("J2EEServer", moduleContext.getServerName());
+            if (!module.isStandAlone()) {
+                webModuleData.setReferencePattern("J2EEApplication", moduleContext.getModuleName());
             }
 
             webModuleData.setAttribute("deploymentDescriptor", module.getOriginalSpecDD());

Modified: geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java?rev=385623&r1=385622&r2=385623&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
(original)
+++ geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
Mon Mar 13 11:19:10 2006
@@ -125,7 +125,7 @@
         Module module = builder.createModule(null, jarFile);
         EARContext earContext = createEARContext(outputPath, defaultEnvironment);
         module.setEarContext(earContext);
-        ObjectName serverName = earContext.getServerObjectName();
+        ObjectName serverName = earContext.getServerName();
         GBeanData server = new GBeanData(serverName, J2EEServerImpl.GBEAN_INFO);
         start(server);
         builder.initContext(earContext, module, cl);
@@ -162,7 +162,7 @@
                 environment,
                 ConfigurationModuleType.WAR,
                 kernel,
-                moduleContext.getJ2eeApplicationName(),
+                serverName, moduleContext.getJ2eeApplicationName(),
                 tcmName,
                 ctcName,
                 null,

Modified: geronimo/branches/1.1/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=385623&r1=385622&r2=385623&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/branches/1.1/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Mon Mar 13 11:19:10 2006
@@ -291,9 +291,9 @@
 
         GBeanData webModuleData = new GBeanData(moduleName, TomcatWebAppContext.GBEAN_INFO);
         try {
-            webModuleData.setReferencePattern("J2EEServer", moduleContext.getServerObjectName());
-            if (!moduleContext.getJ2EEApplicationName().equals("null")) {
-                webModuleData.setReferencePattern("J2EEApplication", moduleContext.getApplicationName());
+            webModuleData.setReferencePattern("J2EEServer", moduleContext.getServerName());
+            if (!module.isStandAlone()) {
+                webModuleData.setReferencePattern("J2EEApplication", moduleContext.getModuleName());
             }
 
             webModuleData.setAttribute("deploymentDescriptor", module.getOriginalSpecDD());

Modified: geronimo/branches/1.1/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java?rev=385623&r1=385622&r2=385623&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
(original)
+++ geronimo/branches/1.1/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
Mon Mar 13 11:19:10 2006
@@ -189,7 +189,7 @@
         EARContext earContext = createEARContext(outputPath, defaultEnvironment);
         earContext.setJaccManagerName(jaccBeanName);
         module.setEarContext(earContext);
-        ObjectName serverName = earContext.getServerObjectName();
+        ObjectName serverName = earContext.getServerName();
         GBeanData server = new GBeanData(serverName, J2EEServerImpl.GBEAN_INFO);
         start(server);
         builder.installModule(jarFile, earContext, module, new MockConfigStore(), null);
@@ -230,7 +230,7 @@
                 environment,
                 ConfigurationModuleType.WAR,
                 kernel,
-                moduleContext.getJ2eeApplicationName(),
+                serverName, moduleContext.getJ2eeApplicationName(),
                 tcmName,
                 ctcName,
                 null,

Modified: geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java?rev=385623&r1=385622&r2=385623&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
(original)
+++ geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
Mon Mar 13 11:19:10 2006
@@ -186,6 +186,7 @@
                         environment,
                         ConfigurationModuleType.WAR,
                         kernel,
+                        earContext.getServerName(),
                         module.getModuleName(),
                         earContext.getTransactionContextManagerObjectName(),
                         earContext.getConnectionTrackerObjectName(),
@@ -193,9 +194,9 @@
                         earContext.getNonTransactedTimerName(),
                         earContext.getCORBAGBeanObjectName(),
                         earContext.getRefContext());
-            } catch (Exception e) {
+            } catch (DeploymentException e) {
                 DeploymentUtil.recursiveDelete(configurationDir);
-                throw new DeploymentException("Could not create a deployment context for
the web app", e);
+                throw e;
             }
             //TODO this is extremely fishy
             //Add the ear parent here since it can't be loaded by any config store.



Mime
View raw message