geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r385692 - in /geronimo/branches/1.1/modules: j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/ j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/
Date Mon, 13 Mar 2006 23:07:19 GMT
Author: dain
Date: Mon Mar 13 15:07:17 2006
New Revision: 385692

URL: http://svn.apache.org/viewcvs?rev=385692&view=rev
Log:
Fix j2ee-deployment tests

Modified:
    geronimo/branches/1.1/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
    geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
    geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EJBRefContextTest.java
    geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java
    geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java
    geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java
    geronimo/branches/1.1/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java

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=385692&r1=385691&r2=385692&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 15:07:17 2006
@@ -36,6 +36,7 @@
 import org.apache.geronimo.j2ee.management.impl.J2EEApplicationImpl;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
+import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
@@ -56,7 +57,6 @@
 import org.apache.xmlbeans.XmlObject;
 
 import javax.xml.namespace.QName;
-import javax.management.MalformedObjectNameException;
 import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -101,7 +101,21 @@
     private static final String DEFAULT_GROUPID = "defaultGroupId";
 
 
-    public EARConfigBuilder(Environment defaultEnvironment, AbstractNameQuery transactionContextManagerAbstractName, AbstractNameQuery connectionTrackerAbstractName, AbstractNameQuery transactionalTimerAbstractName, AbstractNameQuery nonTransactionalTimerAbstractName, AbstractNameQuery corbaGBeanAbstractName, Repository repository, ModuleBuilder ejbConfigBuilder, EJBReferenceBuilder ejbReferenceBuilder, ModuleBuilder webConfigBuilder, ModuleBuilder connectorConfigBuilder, ResourceReferenceBuilder resourceReferenceBuilder, ModuleBuilder appClientConfigBuilder, ServiceReferenceBuilder serviceReferenceBuilder, Kernel kernel) {
+    public EARConfigBuilder(Environment defaultEnvironment,
+            AbstractNameQuery transactionContextManagerAbstractName,
+            AbstractNameQuery connectionTrackerAbstractName,
+            AbstractNameQuery transactionalTimerAbstractName,
+            AbstractNameQuery nonTransactionalTimerAbstractName,
+            AbstractNameQuery corbaGBeanAbstractName,
+            Repository repository,
+            ModuleBuilder ejbConfigBuilder,
+            EJBReferenceBuilder ejbReferenceBuilder,
+            ModuleBuilder webConfigBuilder,
+            ModuleBuilder connectorConfigBuilder,
+            ResourceReferenceBuilder resourceReferenceBuilder,
+            ModuleBuilder appClientConfigBuilder,
+            ServiceReferenceBuilder serviceReferenceBuilder,
+            Kernel kernel) {
         this.kernel = kernel;
         this.repository = repository;
         this.defaultEnvironment = defaultEnvironment;
@@ -212,12 +226,8 @@
         EnvironmentType environmentType = gerApplication.getEnvironment();
         Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
 
-        AbstractName earName;
-        try {
-            earName = NameFactory.buildApplicationName(environment.getProperties(), environment.getConfigId());
-        } catch (MalformedObjectNameException e) {
-            throw new DeploymentException("Could not build ear name", e);
-        }
+        Artifact artifact = environment.getConfigId();
+        AbstractName earName = Naming.createRootName(artifact, artifact.toString(), NameFactory.J2EE_APPLICATION);
 
         // get the modules either the application plan or for a stand alone module from the specific deployer
         // todo change module so you can extract the real module path back out.. then we can eliminate
@@ -666,11 +676,11 @@
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EARConfigBuilder.class, NameFactory.CONFIG_BUILDER);
         infoFactory.addAttribute("defaultEnvironment", Environment.class, true, true);
-        infoFactory.addAttribute("transactionContextManagerObjectName", AbstractName.class, true);
-        infoFactory.addAttribute("connectionTrackerObjectName", AbstractName.class, true);
-        infoFactory.addAttribute("transactionalTimerObjectName", AbstractName.class, true);
-        infoFactory.addAttribute("nonTransactionalTimerObjectName", AbstractName.class, true);
-        infoFactory.addAttribute("corbaGBeanObjectName", AbstractName.class, true);
+        infoFactory.addAttribute("transactionContextManagerAbstractName", AbstractNameQuery.class, true);
+        infoFactory.addAttribute("connectionTrackerAbstractName", AbstractNameQuery.class, true);
+        infoFactory.addAttribute("transactionalTimerAbstractName", AbstractNameQuery.class, true);
+        infoFactory.addAttribute("nonTransactionalTimerAbstractName", AbstractNameQuery.class, true);
+        infoFactory.addAttribute("corbaGBeanAbstractName", AbstractNameQuery.class, true);
 
         infoFactory.addReference("Repository", Repository.class, NameFactory.GERONIMO_SERVICE);
         infoFactory.addReference("EJBConfigBuilder", ModuleBuilder.class, NameFactory.MODULE_BUILDER);
@@ -687,11 +697,11 @@
 
         infoFactory.setConstructor(new String[]{
                 "defaultEnvironment",
-                "transactionContextManagerObjectName",
-                "connectionTrackerObjectName",
-                "transactionalTimerObjectName",
-                "nonTransactionalTimerObjectName",
-                "corbaGBeanObjectName",
+                "transactionContextManagerAbstractName",
+                "connectionTrackerAbstractName",
+                "transactionalTimerAbstractName",
+                "nonTransactionalTimerAbstractName",
+                "corbaGBeanAbstractName",
                 "Repository",
                 "EJBConfigBuilder",
                 "EJBReferenceBuilder",

Modified: geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java?rev=385692&r1=385691&r2=385692&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java (original)
+++ geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java Mon Mar 13 15:07:17 2006
@@ -41,16 +41,22 @@
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.ReferencePatterns;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.config.InvalidConfigException;
 import org.apache.geronimo.kernel.config.NoSuchConfigException;
+import org.apache.geronimo.kernel.config.ConfigurationManagerImpl;
+import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.ImportType;
 import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.KernelFactory;
 
 /**
  * @version $Rev: 385487 $ $Date$
@@ -74,11 +80,17 @@
         }
     };
 
-    private static final AbstractName rootConfig = Naming.createRootName(new Artifact("test", "stuff", "", "ear"), "app", NameFactory.J2EE_APPLICATION) ;
+    private static final AbstractName rootConfig = Naming.createRootName(new Artifact("test", "stuff", "", "car"), "test", "test") ;
     private static final AbstractName transactionManagerObjectName = Naming.createChildName(rootConfig, "TransactionManager", "TransactionManager");
     private static final AbstractName connectionTrackerObjectName = Naming.createChildName(rootConfig, "ConnectionTracker", "ConnectionTracker");
     private static final AbstractName transactionalTimerObjectName = Naming.createChildName(rootConfig, "ThreadPooledTimer", "TransactionalThreaPooledTimer");
     private static final AbstractName nonTransactionalTimerObjectName = Naming.createChildName(rootConfig, "ThreadPooledTimer", "NonTransactionalThreaPooledTimer");
+
+    private static final AbstractName earName = Naming.createRootName(new Artifact("test", "test-ear", "", "ear"), "test", NameFactory.J2EE_APPLICATION) ;
+    private static final AbstractName ejbModuleName = Naming.createChildName(earName, NameFactory.EJB_MODULE, "ejb-jar");
+    private static final AbstractName webModuleName = Naming.createChildName(earName, NameFactory.WEB_MODULE, "war");
+    private static final AbstractName raModuleName = Naming.createChildName(earName, NameFactory.RESOURCE_ADAPTER_MODULE, "rar");
+
     private Environment defaultParentId;
     private static String contextRoot = "test";
     private static final Map portMap = null;
@@ -95,10 +107,10 @@
         TestSetup setup14 = new TestSetup(inner) {
             protected void setUp() throws Exception {
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear14/test-ear.ear"));
-                ejbConfigBuilder.ejbModule = new EJBModule(false, moduleName, null, null, "test-ejb-jar.jar", null, null, null);
+                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, moduleName, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
-                connectorConfigBuilder.connectorModule = new ConnectorModule(false, moduleName, null, null, "test-rar.rar", null, null, null);
+                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+                connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null);
             }
 
             protected void tearDown() {
@@ -111,10 +123,10 @@
         TestSetup setupNaked14 = new TestSetup(inner) {
             protected void setUp() throws Exception {
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear14/test-naked-ear.ear"));
-                ejbConfigBuilder.ejbModule = new EJBModule(false, moduleName, null, null, "test-ejb-jar.jar", null, null, null);
+                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, moduleName, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
-                connectorConfigBuilder.connectorModule = new ConnectorModule(false, moduleName, null, null, "test-rar.rar", null, null, null);
+                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+                connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null);
             }
 
             protected void tearDown() {
@@ -127,10 +139,10 @@
         TestSetup setup13 = new TestSetup(inner) {
             protected void setUp() throws Exception {
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear13/test-ear.ear"));
-                ejbConfigBuilder.ejbModule = new EJBModule(false, moduleName, null, null, "test-ejb-jar.jar", null, null, null);
+                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, moduleName, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
-                connectorConfigBuilder.connectorModule = new ConnectorModule(false, moduleName, null, null, "test-rar.rar", null, null, null);
+                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+                connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null);
             }
 
             protected void tearDown() {
@@ -143,10 +155,10 @@
         TestSetup setupNaked13 = new TestSetup(inner) {
             protected void setUp() throws Exception {
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear13/test-naked-ear.ear"));
-                ejbConfigBuilder.ejbModule = new EJBModule(false, moduleName, null, null, "test-ejb-jar.jar", null, null, null);
+                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, moduleName, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
-                connectorConfigBuilder.connectorModule = new ConnectorModule(false, moduleName, null, null, "test-rar.rar", null, null, null);
+                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+                connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null);
             }
 
             protected void tearDown() {
@@ -159,10 +171,10 @@
         TestSetup setupUnpacked = new TestSetup(inner) {
             protected void setUp() throws Exception {
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/full/"));
-                ejbConfigBuilder.ejbModule = new EJBModule(false, moduleName, null, null, "test-ejb-jar.jar/", null, null, null);
+                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar/", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, moduleName, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
-                connectorConfigBuilder.connectorModule = new ConnectorModule(false, moduleName, null, null, "test-rar.rar", null, null, null);
+                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+                connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null);
             }
 
             protected void tearDown() {
@@ -175,10 +187,10 @@
         TestSetup setupUnpackedNaked = new TestSetup(inner) {
             protected void setUp() throws Exception {
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/naked/"));
-                ejbConfigBuilder.ejbModule = new EJBModule(false, moduleName, null, null, "test-ejb-jar.jar/", null, null, null);
+                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar/", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, moduleName, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
-                connectorConfigBuilder.connectorModule = new ConnectorModule(false, moduleName, null, null, "test-rar.rar", null, null, null);
+                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+                connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null);
             }
 
             protected void tearDown() {
@@ -191,10 +203,10 @@
         TestSetup setupUnpackedAltDD = new TestSetup(inner) {
             protected void setUp() throws Exception {
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/alt-dd/"));
-                ejbConfigBuilder.ejbModule = new EJBModule(false, moduleName, null, null, "test-ejb-jar.jar/", null, null, null);
+                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar/", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, moduleName, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
-                connectorConfigBuilder.connectorModule = new ConnectorModule(false, moduleName, null, null, "test-rar.rar", null, null, null);
+                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+                connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null);
             }
 
             protected void tearDown() {
@@ -207,10 +219,10 @@
         TestSetup setupPackedAltDD = new TestSetup(inner) {
             protected void setUp() throws Exception {
                 earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/alt-dd.ear"));
-                ejbConfigBuilder.ejbModule = new EJBModule(false, moduleName, null, null, "test-ejb-jar.jar/", null, null, null);
+                ejbConfigBuilder.ejbModule = new EJBModule(false, ejbModuleName, null, null, "test-ejb-jar.jar/", null, null, null);
                 webConfigBuilder.contextRoot = contextRoot;
-                webConfigBuilder.webModule = new WebModule(false, moduleName, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
-                connectorConfigBuilder.connectorModule = new ConnectorModule(false, moduleName, null, null, "test-rar.rar", null, null, null);
+                webConfigBuilder.webModule = new WebModule(false, webModuleName, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+                connectorConfigBuilder.connectorModule = new ConnectorModule(false, raModuleName, null, null, "test-rar.rar", null, null, null);
             }
 
             protected void tearDown() {
@@ -233,21 +245,34 @@
         return suite;
     }
 
-//    public void testBuildConfiguration() throws Exception {
+    public void testBuildConfiguration() throws Exception {
 //        Kernel kernel = KernelFactory.newInstance().createKernel("foo");
 //        kernel.boot();
 //
-//        GBeanData store = new GBeanData(JMXUtil.getObjectName("foo:j2eeType=ConfigurationStore,name=mock"), MockConfigStore.GBEAN_INFO);
+//        GBeanData store = new GBeanData(Naming.createChildName(rootConfig, "ConfigStore", "ConfigStore"), MockConfigStore.GBEAN_INFO);
 //        kernel.loadGBean(store, this.getClass().getClassLoader());
-//        kernel.startGBean(store.getName());
+//        kernel.startGBean(store.getAbstractName());
 //
-//        ObjectName configurationManagerName = new ObjectName(":j2eeType=ConfigurationManager,name=Basic");
-//        GBeanData configurationManagerData = new GBeanData(configurationManagerName, ConfigurationManagerImpl.GBEAN_INFO);
-//        configurationManagerData.setReferencePatterns("Stores", Collections.singleton(store.getName()));
+//        GBeanData configurationManagerData = new GBeanData(Naming.createChildName(rootConfig, "ConfigurationManager", "ConfigurationManager"), ConfigurationManagerImpl.GBEAN_INFO);
+//        configurationManagerData.setReferencePattern("Stores", new AbstractNameQuery(store.getAbstractName()));
 //        kernel.loadGBean(configurationManagerData, getClass().getClassLoader());
-//        kernel.startGBean(configurationManagerName);
+//        kernel.startGBean(configurationManagerData.getAbstractName());
 //
-//        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName, null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder, resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, kernel);
+//        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+//                new AbstractNameQuery(transactionManagerObjectName),
+//                new AbstractNameQuery(connectionTrackerObjectName),
+//                new AbstractNameQuery(transactionalTimerObjectName),
+//                new AbstractNameQuery(nonTransactionalTimerObjectName),
+//                null,
+//                null,
+//                ejbConfigBuilder,
+//                ejbConfigBuilder,
+//                webConfigBuilder,
+//                connectorConfigBuilder,
+//                resourceReferenceBuilder,
+//                appClientConfigBuilder,
+//                serviceReferenceBuilder,
+//                kernel);
 //
 //        ConfigurationData configurationData = null;
 //        try {
@@ -259,120 +284,219 @@
 //            }
 //            kernel.shutdown();
 //        }
-//    }
-//
-//    public void testBadEJBJARConfiguration() throws Exception {
-//        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName, null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder, resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, null);
-//
-//        ConfigurationData configurationData = null;
-//        try {
-//            Object plan = configBuilder.getDeploymentPlan(new File(basedir, "target/plans/test-bad-ejb-jar.xml"), earFile);
-//            configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
-//            fail("Should have thrown a DeploymentException");
-//        } catch (DeploymentException e) {
-//            if(e.getCause() instanceof IOException) {
-//                fail("Should not be complaining about bad vendor DD for invalid module entry");
-//            }
-//        } finally {
-//            if (configurationData != null) {
-//                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
-//            }
-//        }
-//    }
-//
-//    public void testBadWARConfiguration() throws Exception {
-//        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName, null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder, resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, null);
-//
-//        ConfigurationData configurationData = null;
-//        try {
-//            Object plan = configBuilder.getDeploymentPlan(new File(basedir, "target/plans/test-bad-war.xml"), earFile);
-//            configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
-//            fail("Should have thrown a DeploymentException");
-//        } catch (DeploymentException e) {
-//            if(e.getCause() instanceof IOException) {
-//                fail("Should not be complaining about bad vendor DD for invalid module entry");
-//            }
-//        } finally {
-//            if (configurationData != null) {
-//                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
-//            }
-//        }
-//    }
-//
-//    public void testBadRARConfiguration() throws Exception {
-//        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName, null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder, resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, null);
-//
-//        ConfigurationData configurationData = null;
-//        try {
-//            Object plan = configBuilder.getDeploymentPlan(new File(basedir, "target/plans/test-bad-rar.xml"), earFile);
-//            configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
-//            fail("Should have thrown a DeploymentException");
-//        } catch (DeploymentException e) {
-//            if(e.getCause() instanceof IOException) {
-//                fail("Should not be complaining about bad vendor DD for invalid module entry");
-//            }
-//        } finally {
-//            if (configurationData != null) {
-//                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
-//            }
-//        }
-//    }
-//
-//    public void testBadCARConfiguration() throws Exception {
-//        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName, null, null, ejbConfigBuilder, ejbConfigBuilder, webConfigBuilder, connectorConfigBuilder, resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, null);
-//
-//        ConfigurationData configurationData = null;
-//        try {
-//            Object plan = configBuilder.getDeploymentPlan(new File(basedir, "target/plans/test-bad-car.xml"), earFile);
-//            configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
-//            fail("Should have thrown a DeploymentException");
-//        } catch (DeploymentException e) {
-//            if(e.getCause() instanceof IOException) {
-//                fail("Should not be complaining about bad vendor DD for invalid module entry");
-//            }
-//        } finally {
-//            if (configurationData != null) {
-//                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
-//            }
-//        }
-//    }
-//
-//    public void testNoEJBDeployer() throws Exception {
-//        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName, null, null, null, null, webConfigBuilder, connectorConfigBuilder, resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, null);
-//
-//        ConfigurationData configurationData = null;
-//        try {
-//            Object plan = configBuilder.getDeploymentPlan(null, earFile);
-//            configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
-//            fail("Should have thrown a DeploymentException");
-//        } catch (DeploymentException e) {
-//            // expected
-//        } finally {
-//            if (configurationData != null) {
-//                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
-//            }
-//        }
-//    }
-//
-//    public void testNoWARDeployer() throws Exception {
-//        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName, null, null, ejbConfigBuilder, null, null, connectorConfigBuilder, resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, null);
-//
-//        ConfigurationData configurationData = null;
-//        try {
-//            Object plan = configBuilder.getDeploymentPlan(null, earFile);
-//            configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
-//            fail("Should have thrown a DeploymentException");
-//        } catch (DeploymentException e) {
-//            // expected
-//        } finally {
-//            if (configurationData != null) {
-//                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
-//            }
-//        }
-//    }
-//
+    }
+
+    public void testBadEJBJARConfiguration() throws Exception {
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+                new AbstractNameQuery(transactionManagerObjectName),
+                new AbstractNameQuery(connectionTrackerObjectName),
+                new AbstractNameQuery(transactionalTimerObjectName),
+                new AbstractNameQuery(nonTransactionalTimerObjectName),
+                null,
+                null,
+                ejbConfigBuilder,
+                ejbConfigBuilder,
+                webConfigBuilder,
+                connectorConfigBuilder,
+                resourceReferenceBuilder,
+                appClientConfigBuilder,
+                serviceReferenceBuilder,
+                null);
+
+        ConfigurationData configurationData = null;
+        try {
+            Object plan = configBuilder.getDeploymentPlan(new File(basedir, "target/plans/test-bad-ejb-jar.xml"), earFile);
+            configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
+            fail("Should have thrown a DeploymentException");
+        } catch (DeploymentException e) {
+            if(e.getCause() instanceof IOException) {
+                fail("Should not be complaining about bad vendor DD for invalid module entry");
+            }
+        } finally {
+            if (configurationData != null) {
+                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
+            }
+        }
+    }
+
+    public void testBadWARConfiguration() throws Exception {
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+                new AbstractNameQuery(transactionManagerObjectName),
+                new AbstractNameQuery(connectionTrackerObjectName),
+                new AbstractNameQuery(transactionalTimerObjectName),
+                new AbstractNameQuery(nonTransactionalTimerObjectName),
+                null,
+                null,
+                ejbConfigBuilder,
+                ejbConfigBuilder,
+                webConfigBuilder,
+                connectorConfigBuilder,
+                resourceReferenceBuilder,
+                appClientConfigBuilder,
+                serviceReferenceBuilder,
+                null);
+
+        ConfigurationData configurationData = null;
+        try {
+            Object plan = configBuilder.getDeploymentPlan(new File(basedir, "target/plans/test-bad-war.xml"), earFile);
+            configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
+            fail("Should have thrown a DeploymentException");
+        } catch (DeploymentException e) {
+            if(e.getCause() instanceof IOException) {
+                fail("Should not be complaining about bad vendor DD for invalid module entry");
+            }
+        } finally {
+            if (configurationData != null) {
+                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
+            }
+        }
+    }
+
+    public void testBadRARConfiguration() throws Exception {
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+                new AbstractNameQuery(transactionManagerObjectName),
+                new AbstractNameQuery(connectionTrackerObjectName),
+                new AbstractNameQuery(transactionalTimerObjectName),
+                new AbstractNameQuery(nonTransactionalTimerObjectName),
+                null,
+                null,
+                ejbConfigBuilder,
+                ejbConfigBuilder,
+                webConfigBuilder,
+                connectorConfigBuilder,
+                resourceReferenceBuilder,
+                appClientConfigBuilder,
+                serviceReferenceBuilder,
+                null);
+
+        ConfigurationData configurationData = null;
+        try {
+            Object plan = configBuilder.getDeploymentPlan(new File(basedir, "target/plans/test-bad-rar.xml"), earFile);
+            configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
+            fail("Should have thrown a DeploymentException");
+        } catch (DeploymentException e) {
+            if(e.getCause() instanceof IOException) {
+                fail("Should not be complaining about bad vendor DD for invalid module entry");
+            }
+        } finally {
+            if (configurationData != null) {
+                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
+            }
+        }
+    }
+
+    public void testBadCARConfiguration() throws Exception {
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+                new AbstractNameQuery(transactionManagerObjectName),
+                new AbstractNameQuery(connectionTrackerObjectName),
+                new AbstractNameQuery(transactionalTimerObjectName),
+                new AbstractNameQuery(nonTransactionalTimerObjectName),
+                null,
+                null,
+                ejbConfigBuilder,
+                ejbConfigBuilder,
+                webConfigBuilder,
+                connectorConfigBuilder,
+                resourceReferenceBuilder,
+                appClientConfigBuilder,
+                serviceReferenceBuilder,
+                null);
+
+        ConfigurationData configurationData = null;
+        try {
+            Object plan = configBuilder.getDeploymentPlan(new File(basedir, "target/plans/test-bad-car.xml"), earFile);
+            configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
+            fail("Should have thrown a DeploymentException");
+        } catch (DeploymentException e) {
+            if(e.getCause() instanceof IOException) {
+                fail("Should not be complaining about bad vendor DD for invalid module entry");
+            }
+        } finally {
+            if (configurationData != null) {
+                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
+            }
+        }
+    }
+
+    public void testNoEJBDeployer() throws Exception {
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+                new AbstractNameQuery(transactionManagerObjectName),
+                new AbstractNameQuery(connectionTrackerObjectName),
+                new AbstractNameQuery(transactionalTimerObjectName),
+                new AbstractNameQuery(nonTransactionalTimerObjectName),
+                null,
+                null,
+                null,
+                null,
+                webConfigBuilder,
+                connectorConfigBuilder,
+                resourceReferenceBuilder,
+                appClientConfigBuilder,
+                serviceReferenceBuilder,
+                null);
+
+
+        ConfigurationData configurationData = null;
+        try {
+            Object plan = configBuilder.getDeploymentPlan(null, earFile);
+            configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
+            fail("Should have thrown a DeploymentException");
+        } catch (DeploymentException e) {
+            // expected
+        } finally {
+            if (configurationData != null) {
+                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
+            }
+        }
+    }
+
+    public void testNoWARDeployer() throws Exception {
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+                new AbstractNameQuery(transactionManagerObjectName),
+                new AbstractNameQuery(connectionTrackerObjectName),
+                new AbstractNameQuery(transactionalTimerObjectName),
+                new AbstractNameQuery(nonTransactionalTimerObjectName),
+                null,
+                null,
+                ejbConfigBuilder,
+                ejbConfigBuilder,
+                null,
+                connectorConfigBuilder,
+                resourceReferenceBuilder,
+                appClientConfigBuilder,
+                serviceReferenceBuilder,
+                null);
+
+        ConfigurationData configurationData = null;
+        try {
+            Object plan = configBuilder.getDeploymentPlan(null, earFile);
+            configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
+            fail("Should have thrown a DeploymentException");
+        } catch (DeploymentException e) {
+            // expected
+        } finally {
+            if (configurationData != null) {
+                DeploymentUtil.recursiveDelete(configurationData.getConfigurationDir());
+            }
+        }
+    }
+
     public void testNoConnectorDeployer() throws Exception {
-        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId, transactionManagerObjectName, connectionTrackerObjectName, transactionalTimerObjectName, nonTransactionalTimerObjectName, null, null, ejbConfigBuilder, null, webConfigBuilder, null, resourceReferenceBuilder, appClientConfigBuilder, serviceReferenceBuilder, null);
+        EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
+                new AbstractNameQuery(transactionManagerObjectName),
+                new AbstractNameQuery(connectionTrackerObjectName),
+                new AbstractNameQuery(transactionalTimerObjectName),
+                new AbstractNameQuery(nonTransactionalTimerObjectName),
+                null,
+                null,
+                ejbConfigBuilder,
+                null,
+                webConfigBuilder,
+                null,
+                resourceReferenceBuilder,
+                appClientConfigBuilder,
+                serviceReferenceBuilder,
+                null);
 
         ConfigurationData configurationData = null;
         try {
@@ -410,6 +534,7 @@
             environment.getProperties().put(NameFactory.JSR77_BASE_NAME_PROPERTY, "geronimo.test:J2EEServer=geronimo");
             configData.setAttribute("environment", environment);
             configData.setAttribute("gBeanState", NO_OBJECTS_OS);
+            configData.setAttribute("type", ConfigurationModuleType.CAR);
 
             return configData;
         }

Modified: geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EJBRefContextTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EJBRefContextTest.java?rev=385692&r1=385691&r2=385692&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EJBRefContextTest.java (original)
+++ geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EJBRefContextTest.java Mon Mar 13 15:07:17 2006
@@ -26,6 +26,7 @@
 import junit.framework.TestCase;
 import org.apache.geronimo.common.UnresolvedEJBRefException;
 import org.apache.geronimo.common.UnresolvedReferenceException;
+import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.DeploymentContext;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanData;
@@ -235,7 +236,7 @@
             return new FakeReference(objectName);
         }
 
-        public Reference createCORBAReference(URI corbaURL, String objectName, AbstractName containerName, String home) {
+        public Reference createCORBAReference(Artifact configId, AbstractNameQuery containerNameQuery, URI nsCorbaloc, String objectName, String home) throws DeploymentException {
             return new FakeReference(objectName);
         }
 

Modified: geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java?rev=385692&r1=385691&r2=385692&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java (original)
+++ geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java Mon Mar 13 15:07:17 2006
@@ -25,6 +25,9 @@
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.Repository;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 import javax.management.ObjectName;
 import javax.naming.Reference;
@@ -33,7 +36,7 @@
 import java.util.jar.JarFile;
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 385487 $ $Date$
  */
 public class MockConnectorConfigBuilder extends Assert implements ModuleBuilder, ResourceReferenceBuilder{
     public EARContext earContext;
@@ -41,10 +44,13 @@
     public ClassLoader cl;
 
     public Module createModule(File plan, JarFile moduleFile) throws DeploymentException {
+        AbstractName earName = Naming.createRootName(new Artifact("test", "test-war", "", "rar"), NameFactory.NULL, NameFactory.J2EE_APPLICATION) ;
+        AbstractName moduleName = Naming.createChildName(earName, NameFactory.RESOURCE_ADAPTER_MODULE, "rar");
         return new ConnectorModule(true, moduleName, null, moduleFile, "connector", null, null, null);
     }
 
     public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName) throws DeploymentException {
+        AbstractName moduleName = Naming.createChildName(earName, NameFactory.RESOURCE_ADAPTER_MODULE, "rar");
         return new ConnectorModule(false, moduleName, null, moduleFile, targetPath, null, null, null);
     }
 

Modified: geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java?rev=385692&r1=385691&r2=385692&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java (original)
+++ geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java Mon Mar 13 15:07:17 2006
@@ -20,9 +20,13 @@
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.Repository;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 import javax.naming.Reference;
 import java.io.File;
@@ -32,7 +36,7 @@
 
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 385487 $ $Date$
  */
 public class MockEJBConfigBuilder extends Assert implements ModuleBuilder, EJBReferenceBuilder {
     public EARContext earContext;
@@ -40,10 +44,13 @@
     public ClassLoader cl;
 
     public Module createModule(File plan, JarFile moduleFile) throws DeploymentException {
+        AbstractName earName = Naming.createRootName(new Artifact("test", "test-ejb-jar", "", "jar"), NameFactory.NULL, NameFactory.J2EE_APPLICATION) ;
+        AbstractName moduleName = Naming.createChildName(earName, NameFactory.EJB_MODULE, "ejb-jar");
         return new EJBModule(true, moduleName, null, moduleFile, "ejb.jar", null, null, null);
     }
 
     public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName) throws DeploymentException {
+        AbstractName moduleName = Naming.createChildName(earName, NameFactory.EJB_MODULE, "ejb-jar");
         return new EJBModule(false, moduleName, null, moduleFile, targetPath, null, null, null);
     }
 
@@ -85,7 +92,7 @@
         return null;
     }
 
-    public Reference createCORBAReference(URI corbaURL, String objectName, AbstractName containerName, String home) throws DeploymentException {
+    public Reference createCORBAReference(Artifact configId, AbstractNameQuery containerNameQuery, URI nsCorbaloc, String objectName, String home) throws DeploymentException {
         return null;
     }
 

Modified: geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java?rev=385692&r1=385691&r2=385692&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java (original)
+++ geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java Mon Mar 13 15:07:17 2006
@@ -21,7 +21,10 @@
 import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.Repository;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 import java.io.File;
 import java.net.URL;
@@ -29,7 +32,7 @@
 import java.util.jar.JarFile;
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 385487 $ $Date$
  */
 public class MockWARConfigBuilder extends Assert implements ModuleBuilder {
     public EARContext earContext;
@@ -40,10 +43,13 @@
     private String namespace = "foo";
 
     public Module createModule(File plan, JarFile moduleFile) throws DeploymentException {
+        AbstractName earName = Naming.createRootName(new Artifact("test", "test-war", "", "war"), NameFactory.NULL, NameFactory.J2EE_APPLICATION) ;
+        AbstractName moduleName = Naming.createChildName(earName, NameFactory.WEB_MODULE, "war");
         return new WebModule(true, moduleName, null, moduleFile, "war", null, null, null, contextRoot, portMap, namespace);
     }
 
     public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName) throws DeploymentException {
+        AbstractName moduleName = Naming.createChildName(earName, NameFactory.EJB_MODULE, "war");
         return new WebModule(false, moduleName, null, moduleFile, targetPath, null, null, null, contextRoot, portMap, namespace);
     }
 

Modified: geronimo/branches/1.1/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java?rev=385692&r1=385691&r2=385692&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java (original)
+++ geronimo/branches/1.1/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java Mon Mar 13 15:07:17 2006
@@ -20,6 +20,7 @@
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
+import org.apache.geronimo.kernel.Naming;
 
 import java.util.Properties;
 import java.util.Map;
@@ -130,22 +131,6 @@
             J2EE_MODULE,  //this is a bad name here
             J2EE_MODULE   //should be SpringModule?
     };
-
-    public static AbstractName buildApplicationName(Map properties, Artifact artifact) throws MalformedObjectNameException {
-        String baseNameString = (String) properties.get(JSR77_BASE_NAME_PROPERTY);
-        ObjectName baseName = ObjectName.getInstance(baseNameString);
-        String domain = baseName.getDomain();
-        Hashtable keys = baseName.getKeyPropertyList();
-        String serverName = (String) keys.get(J2EE_SERVER);
-        if (serverName == null) {
-            throw new MalformedObjectNameException("No J2EEServer key in " + baseNameString);
-        }
-        Map nameMap = new HashMap();
-        keys.put(J2EE_TYPE, J2EE_APPLICATION);
-        keys.put(J2EE_NAME, artifact.toString());
-        ObjectName moduleObjectName = ObjectName.getInstance(domain, keys);
-        return new AbstractName(artifact, nameMap, Collections.EMPTY_SET, moduleObjectName);
-    }
 
     public static AbstractName buildModuleName(Map properties, Artifact artifact, ConfigurationModuleType moduleType, String moduleName) throws MalformedObjectNameException {
         String moduleTypeString = moduleTypeNames[moduleType.getValue()];



Mime
View raw message