geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r386505 [2/2] - in /geronimo/branches/1.1: modules/client-builder/src/java/org/apache/geronimo/client/builder/ modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ modules/connector-builder/src/test-data/connector_1_...
Date Fri, 17 Mar 2006 02:21:42 GMT
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=386505&r1=386504&r2=386505&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 Thu Mar 16 18:21:37 2006
@@ -79,6 +79,7 @@
  * @version $Rev:385232 $ $Date$
  */
 public class EARConfigBuilder implements ConfigurationBuilder {
+
     private final static QName APPLICATION_QNAME = GerApplicationDocument.type.getDocumentElementName();
     private static final String DEFAULT_GROUPID = "defaultGroupId";
 
@@ -92,8 +93,7 @@
     private final ServiceReferenceBuilder serviceReferenceBuilder;
 
     private final Environment defaultEnvironment;
-    //TODO configid FIXME
-    private final AbstractNameQuery serverName = null;
+    private final AbstractNameQuery serverName;
     private final AbstractNameQuery transactionContextManagerObjectName;
     private final AbstractNameQuery connectionTrackerObjectName;
     private final AbstractNameQuery transactionalTimerObjectName;
@@ -108,6 +108,7 @@
             AbstractNameQuery transactionalTimerAbstractName,
             AbstractNameQuery nonTransactionalTimerAbstractName,
             AbstractNameQuery corbaGBeanAbstractName,
+            AbstractNameQuery serverName,
             Repository repository,
             ModuleBuilder ejbConfigBuilder,
             EJBReferenceBuilder ejbReferenceBuilder,
@@ -123,6 +124,7 @@
                 transactionalTimerAbstractName,
                 nonTransactionalTimerAbstractName,
                 corbaGBeanAbstractName,
+                serverName,
                 repository,
                 ejbConfigBuilder,
                 ejbReferenceBuilder,
@@ -140,6 +142,7 @@
             AbstractNameQuery transactionalTimerAbstractName,
             AbstractNameQuery nonTransactionalTimerAbstractName,
             AbstractNameQuery corbaGBeanAbstractName,
+            AbstractNameQuery serverName,
             Repository repository,
             ModuleBuilder ejbConfigBuilder,
             EJBReferenceBuilder ejbReferenceBuilder,
@@ -164,6 +167,7 @@
         this.transactionalTimerObjectName = transactionalTimerAbstractName;
         this.nonTransactionalTimerObjectName = nonTransactionalTimerAbstractName;
         this.corbaGBeanObjectName = corbaGBeanAbstractName;
+        this.serverName = serverName;
         this.naming = naming;
     }
 
@@ -561,7 +565,8 @@
                             altSpecDD,
                             environment,
                             moduleContextInfo,
-                            earName, naming);
+                            earName,
+                            naming);
 
                     if (module == null) {
                         throw new DeploymentException("Module was not " + moduleTypeName + ": " + modulePath);
@@ -661,7 +666,9 @@
                         moduleName,
                         altSpecDD,
                         environment,
-                        moduleContextInfo, earName, naming);
+                        moduleContextInfo,
+                        earName,
+                        naming);
 
                 if (module == null) {
                     throw new DeploymentException("Module was not " + moduleTypeName + ": " + moduleName);
@@ -717,7 +724,7 @@
         infoFactory.addAttribute("transactionalTimerAbstractName", AbstractNameQuery.class, true);
         infoFactory.addAttribute("nonTransactionalTimerAbstractName", AbstractNameQuery.class, true);
         infoFactory.addAttribute("corbaGBeanAbstractName", AbstractNameQuery.class, true);
-        infoFactory.addAttribute("kernel", Kernel.class, false, false);
+        infoFactory.addAttribute("serverName", AbstractNameQuery.class, true);
 
         infoFactory.addReference("Repository", Repository.class, NameFactory.GERONIMO_SERVICE);
         infoFactory.addReference("EJBConfigBuilder", ModuleBuilder.class, NameFactory.MODULE_BUILDER);
@@ -728,6 +735,8 @@
         infoFactory.addReference("AppClientConfigBuilder", ModuleBuilder.class, NameFactory.MODULE_BUILDER);
         infoFactory.addReference("ServiceReferenceBuilder", ServiceReferenceBuilder.class, NameFactory.MODULE_BUILDER);
 
+        infoFactory.addAttribute("kernel", Kernel.class, false);
+
         infoFactory.addInterface(ConfigurationBuilder.class);
 
         infoFactory.setConstructor(new String[]{
@@ -737,6 +746,7 @@
                 "transactionalTimerAbstractName",
                 "nonTransactionalTimerAbstractName",
                 "corbaGBeanAbstractName",
+                "serverName",
                 "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=386505&r1=386504&r2=386505&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 Thu Mar 16 18:21:37 2006
@@ -52,12 +52,12 @@
 import org.apache.geronimo.kernel.Jsr77Naming;
 
 /**
- * @version $Rev: 385487 $ $Date$
+ * @version $Rev:386276 $ $Date$
  */
 public class EARConfigBuilderTest extends TestCase {
     private static final File basedir = new File(System.getProperty("basedir", System.getProperty("user.dir")));
 
-    private static String WEB_NAMESPACE="foo";
+    private static String WEB_NAMESPACE = "foo";
     private static JarFile earFile;
     private static MockConfigStore configStore = new MockConfigStore();
     private static MockEJBConfigBuilder ejbConfigBuilder = new MockEJBConfigBuilder();
@@ -74,11 +74,13 @@
     };
 
     private static final Naming naming = new Jsr77Naming();
+
     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, "TransactionalThreaPooledTimer", "ThreadPooledTimer");
     private static final AbstractName nonTransactionalTimerObjectName = naming.createChildName(rootConfig, "NonTransactionalThreaPooledTimer", "ThreadPooledTimer");
+    private static final AbstractName serverName = naming.createChildName(rootConfig, "J2EEServer", "Server");
 
     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, "ejb-jar", NameFactory.EJB_MODULE);
@@ -88,6 +90,11 @@
     private Environment defaultParentId;
     private static String contextRoot = "test";
     private static final Map portMap = null;
+    private final AbstractNameQuery transactionContextManagerAbstractNameQuery = new AbstractNameQuery(transactionManagerObjectName, null);
+    private final AbstractNameQuery connectionTrackerAbstractNameQuery = new AbstractNameQuery(connectionTrackerObjectName, null);
+    private final AbstractNameQuery transactionalTimerAbstractNameQuery = new AbstractNameQuery(transactionalTimerObjectName, null);
+    private final AbstractNameQuery nonTransactionalTimerAbstractNameQuery = new AbstractNameQuery(nonTransactionalTimerObjectName, null);
+    private final AbstractNameQuery corbaGBeanAbstractNameQuery = new AbstractNameQuery(serverName, null);
 
     protected void setUp() throws Exception {
         super.setUp();
@@ -243,10 +250,11 @@
         ConfigurationData configurationData = null;
         try {
             EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
-                    new AbstractNameQuery(transactionManagerObjectName),
-                    new AbstractNameQuery(connectionTrackerObjectName),
-                    new AbstractNameQuery(transactionalTimerObjectName),
-                    new AbstractNameQuery(nonTransactionalTimerObjectName),
+                    transactionContextManagerAbstractNameQuery,
+                    connectionTrackerAbstractNameQuery,
+                    transactionalTimerAbstractNameQuery,
+                    nonTransactionalTimerAbstractNameQuery,
+                    corbaGBeanAbstractNameQuery,
                     null,
                     null,
                     ejbConfigBuilder,
@@ -269,10 +277,11 @@
 
     public void testBadEJBJARConfiguration() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
-                new AbstractNameQuery(transactionManagerObjectName),
-                new AbstractNameQuery(connectionTrackerObjectName),
-                new AbstractNameQuery(transactionalTimerObjectName),
-                new AbstractNameQuery(nonTransactionalTimerObjectName),
+                transactionContextManagerAbstractNameQuery,
+                connectionTrackerAbstractNameQuery,
+                transactionalTimerAbstractNameQuery,
+                nonTransactionalTimerAbstractNameQuery,
+                corbaGBeanAbstractNameQuery,
                 null,
                 null,
                 ejbConfigBuilder,
@@ -290,7 +299,7 @@
             configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
             fail("Should have thrown a DeploymentException");
         } catch (DeploymentException e) {
-            if(e.getCause() instanceof IOException) {
+            if (e.getCause() instanceof IOException) {
                 fail("Should not be complaining about bad vendor DD for invalid module entry");
             }
         } finally {
@@ -302,10 +311,11 @@
 
     public void testBadWARConfiguration() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
-                new AbstractNameQuery(transactionManagerObjectName),
-                new AbstractNameQuery(connectionTrackerObjectName),
-                new AbstractNameQuery(transactionalTimerObjectName),
-                new AbstractNameQuery(nonTransactionalTimerObjectName),
+                transactionContextManagerAbstractNameQuery,
+                connectionTrackerAbstractNameQuery,
+                transactionalTimerAbstractNameQuery,
+                nonTransactionalTimerAbstractNameQuery,
+                corbaGBeanAbstractNameQuery,
                 null,
                 null,
                 ejbConfigBuilder,
@@ -323,7 +333,7 @@
             configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
             fail("Should have thrown a DeploymentException");
         } catch (DeploymentException e) {
-            if(e.getCause() instanceof IOException) {
+            if (e.getCause() instanceof IOException) {
                 fail("Should not be complaining about bad vendor DD for invalid module entry");
             }
         } finally {
@@ -335,10 +345,11 @@
 
     public void testBadRARConfiguration() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
-                new AbstractNameQuery(transactionManagerObjectName),
-                new AbstractNameQuery(connectionTrackerObjectName),
-                new AbstractNameQuery(transactionalTimerObjectName),
-                new AbstractNameQuery(nonTransactionalTimerObjectName),
+                transactionContextManagerAbstractNameQuery,
+                connectionTrackerAbstractNameQuery,
+                transactionalTimerAbstractNameQuery,
+                nonTransactionalTimerAbstractNameQuery,
+                corbaGBeanAbstractNameQuery,
                 null,
                 null,
                 ejbConfigBuilder,
@@ -356,7 +367,7 @@
             configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
             fail("Should have thrown a DeploymentException");
         } catch (DeploymentException e) {
-            if(e.getCause() instanceof IOException) {
+            if (e.getCause() instanceof IOException) {
                 fail("Should not be complaining about bad vendor DD for invalid module entry");
             }
         } finally {
@@ -368,10 +379,11 @@
 
     public void testBadCARConfiguration() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
-                new AbstractNameQuery(transactionManagerObjectName),
-                new AbstractNameQuery(connectionTrackerObjectName),
-                new AbstractNameQuery(transactionalTimerObjectName),
-                new AbstractNameQuery(nonTransactionalTimerObjectName),
+                transactionContextManagerAbstractNameQuery,
+                connectionTrackerAbstractNameQuery,
+                transactionalTimerAbstractNameQuery,
+                nonTransactionalTimerAbstractNameQuery,
+                corbaGBeanAbstractNameQuery,
                 null,
                 null,
                 ejbConfigBuilder,
@@ -389,7 +401,7 @@
             configurationData = configBuilder.buildConfiguration(plan, earFile, configStore);
             fail("Should have thrown a DeploymentException");
         } catch (DeploymentException e) {
-            if(e.getCause() instanceof IOException) {
+            if (e.getCause() instanceof IOException) {
                 fail("Should not be complaining about bad vendor DD for invalid module entry");
             }
         } finally {
@@ -401,10 +413,11 @@
 
     public void testNoEJBDeployer() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
-                new AbstractNameQuery(transactionManagerObjectName),
-                new AbstractNameQuery(connectionTrackerObjectName),
-                new AbstractNameQuery(transactionalTimerObjectName),
-                new AbstractNameQuery(nonTransactionalTimerObjectName),
+                transactionContextManagerAbstractNameQuery,
+                connectionTrackerAbstractNameQuery,
+                transactionalTimerAbstractNameQuery,
+                nonTransactionalTimerAbstractNameQuery,
+                corbaGBeanAbstractNameQuery,
                 null,
                 null,
                 null,
@@ -433,10 +446,11 @@
 
     public void testNoWARDeployer() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
-                new AbstractNameQuery(transactionManagerObjectName),
-                new AbstractNameQuery(connectionTrackerObjectName),
-                new AbstractNameQuery(transactionalTimerObjectName),
-                new AbstractNameQuery(nonTransactionalTimerObjectName),
+                transactionContextManagerAbstractNameQuery,
+                connectionTrackerAbstractNameQuery,
+                transactionalTimerAbstractNameQuery,
+                nonTransactionalTimerAbstractNameQuery,
+                corbaGBeanAbstractNameQuery,
                 null,
                 null,
                 ejbConfigBuilder,
@@ -464,10 +478,11 @@
 
     public void testNoConnectorDeployer() throws Exception {
         EARConfigBuilder configBuilder = new EARConfigBuilder(defaultParentId,
-                new AbstractNameQuery(transactionManagerObjectName),
-                new AbstractNameQuery(connectionTrackerObjectName),
-                new AbstractNameQuery(transactionalTimerObjectName),
-                new AbstractNameQuery(nonTransactionalTimerObjectName),
+                transactionContextManagerAbstractNameQuery,
+                connectionTrackerAbstractNameQuery,
+                transactionalTimerAbstractNameQuery,
+                nonTransactionalTimerAbstractNameQuery,
+                corbaGBeanAbstractNameQuery,
                 null,
                 null,
                 ejbConfigBuilder,
@@ -498,6 +513,7 @@
             module.close();
         }
     }
+
     public static class MockConfigStore implements ConfigurationStore {
         private final Map locations = new HashMap();
 

Modified: geronimo/branches/1.1/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java (original)
+++ geronimo/branches/1.1/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java Thu Mar 16 18:21:37 2006
@@ -41,7 +41,7 @@
 public class SchemaConversionUtils {
     static final String J2EE_NAMESPACE = "http://java.sun.com/xml/ns/j2ee";
 
-    static final String GERONIMO_NAMING_NAMESPACE = "http://geronimo.apache.org/xml/ns/naming-1.0";
+    static final String GERONIMO_NAMING_NAMESPACE = "http://geronimo.apache.org/xml/ns/naming-1.1";
     private static final String GERONIMO_SECURITY_NAMESPACE = "http://geronimo.apache.org/xml/ns/security-1.1";
     private static final String GERONIMO_SERVICE_NAMESPACE = "http://geronimo.apache.org/xml/ns/deployment-1.1";
 

Modified: geronimo/branches/1.1/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml (original)
+++ geronimo/branches/1.1/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml Thu Mar 16 18:21:37 2006
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 
-<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1" xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
+<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1" xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
     <dep:environment>
         <dep:configId>
             <dep:groupId>test</dep:groupId>

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=386505&r1=386504&r2=386505&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 Thu Mar 16 18:21:37 2006
@@ -21,13 +21,11 @@
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 
-import java.util.Properties;
-import java.util.Map;
-import java.util.Hashtable;
-import java.util.HashMap;
-import java.util.Collections;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
 
 /**
  * @version $Rev:385692 $ $Date$
@@ -81,6 +79,7 @@
     public static final String NULL = "null";
 
     //geronimo extensions
+    public static final String SERVICE_MODULE = "ServiceModule";
     // todo should these really be j2eeType or should we have a Geronimo-specific property?
     public static final String TRANSACTION_MANAGER = "TransactionManager";
     public static final String TRANSACTION_CONTEXT_MANAGER = "TransactionContextManager";
@@ -90,7 +89,6 @@
     public static final String JCA_CONNECTION_TRACKER = "JCAConnectionTracker";
     public static final String JCA_ADMIN_OBJECT = "JCAAdminObject";
     public static final String JCA_ACTIVATION_SPEC = "JCAActivationSpec";
-    //TODO shouldn't we use the RESOURCE_ADAPTER string?
     public static final String JCA_RESOURCE_ADAPTER = "JCAResourceAdapter";
     public static final String JCA_WORK_MANAGER = "JCAWorkManager";
     public static final String JCA_CONNECTION_MANAGER = "JCAConnectionManager";
@@ -122,61 +120,6 @@
     public static final String CORBA_TSS = "CORBATSS";
     public static final String WEB_SERVICE_LINK = "WSLink";
 
-    private static String[] moduleTypeNames = new String[] {
-            J2EE_APPLICATION, //null?? this should never happen
-            EJB_MODULE,
-            APP_CLIENT_MODULE,
-            RESOURCE_ADAPTER_MODULE,
-            WEB_MODULE,
-            J2EE_MODULE,  //this is a bad name here
-            J2EE_MODULE   //should be SpringModule?
-    };
-
-    public static AbstractName buildModuleName(Map properties, Artifact artifact, ConfigurationModuleType moduleType, String moduleName) throws MalformedObjectNameException {
-        String moduleTypeString = moduleTypeNames[moduleType.getValue()];
-        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();
-        if (moduleName == null) {
-            //this is a standalone module
-            keys.put(J2EE_APPLICATION, NULL);
-            keys.put(J2EE_TYPE, moduleTypeString);
-            keys.put(J2EE_NAME, artifact.toString());
-        } else {
-            //this is part of an application
-            keys.put(J2EE_APPLICATION, artifact.toString());
-            keys.put(J2EE_TYPE, moduleTypeString);
-            keys.put(J2EE_NAME, moduleName);
-            nameMap.put("module", moduleName);
-        }
-        ObjectName moduleObjectName = ObjectName.getInstance(domain, keys);
-        return new AbstractName(artifact, nameMap, Collections.EMPTY_SET, moduleObjectName);
-    }
-
-
-    /**
-     *
-     * @deprecated
-     * @param j2eeDomainName
-     * @param j2eeServerName
-     * @param j2eeApplicationName
-     * @param context
-     * @return
-     * @throws MalformedObjectNameException
-     */
-    public static ObjectName getApplicationName(String j2eeDomainName, String j2eeServerName, String j2eeApplicationName, J2eeContext context) throws MalformedObjectNameException {
-        Properties props = new Properties();
-        props.put(J2EE_TYPE, J2EE_APPLICATION);
-        props.put(J2EE_SERVER, context.getJ2eeServerName(j2eeServerName));
-        props.put(J2EE_NAME, context.getJ2eeApplicationName(j2eeApplicationName));
-        return ObjectName.getInstance(context.getJ2eeDomainName(j2eeDomainName), props);
-    }
 
     /**
      *
@@ -241,52 +184,7 @@
         return getComponentName(j2eeDomainName, j2eeServerName, j2eeApplicationName, EJB_MODULE, j2eeModuleName, j2eeName, j2eeType, context);
     }
 
-    /**
-     *
-     * @deprecated
-     * @param name
-     * @param type
-     * @param context
-     * @return AbstractNameQuery
-     */
-    public static AbstractNameQuery getComponentNameQuery(String name, String type, AbstractName context) {
-        return getComponentNameQuery(null, null, name, type, context);
-    }
-
-    /**
-     *
-     * @deprecated
-     * @param moduleName
-     * @param moduleType
-     * @param name
-     * @param type
-     * @param context
-     * @return AbstractNameQuery
-     */
-    public static AbstractNameQuery getComponentNameQuery(String moduleName, String moduleType, String name, String type, AbstractName context) {
-        Map nameProperties = new HashMap(context.getName());
 
-        // from the existing name properties define a new propertye ${j2eeType}=${name}
-        String parentName = (String) nameProperties.remove(J2EE_NAME);
-        String parentJ2eeType = (String) nameProperties.remove(J2EE_TYPE);
-        if (parentName != null && parentJ2eeType != null) {
-            nameProperties.put(parentJ2eeType, parentName);
-        }
-
-        if (!"*".equals(moduleName)) {
-            nameProperties.put(moduleType, moduleName);
-        }
-
-        if (!"*".equals(name)) {
-            nameProperties.put(J2EE_NAME, name);
-        }
-
-        if (type != null) {
-            nameProperties.put(J2EE_TYPE, type);
-        }
-
-        return new AbstractNameQuery(context.getArtifact(), nameProperties, (String) null);
-    }
 
     /**
      * @param j2eeDomainName

Modified: geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/Abstract77Test.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/Abstract77Test.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/Abstract77Test.java (original)
+++ geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/Abstract77Test.java Thu Mar 16 18:21:37 2006
@@ -17,7 +17,6 @@
 
 package org.apache.geronimo.j2ee.management;
 
-import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
 import java.util.Hashtable;
@@ -27,7 +26,6 @@
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.AbstractName;
-import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl;
 import org.apache.geronimo.j2ee.management.impl.J2EEServerImpl;
 import org.apache.geronimo.j2ee.management.impl.JVMImpl;
@@ -66,7 +64,7 @@
             String v = value[i];
             names.put(k, v);
         }
-        return new AbstractName(new Artifact("test", "foo", "1", "car"), names, info.getInterfaces(), JMXUtil.getObjectName(DOMAIN, names));
+        return new AbstractName(new Artifact("test", "foo", "1", "car"), names, JMXUtil.getObjectName(DOMAIN, names));
     }
 
     protected void setUp() throws Exception {

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=386505&r1=386504&r2=386505&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 Thu Mar 16 18:21:37 2006
@@ -237,11 +237,8 @@
         }
         AbstractName moduleName;
         if (earName == null) {
-            try {
-                moduleName = NameFactory.buildModuleName(environment.getProperties(), environment.getConfigId(), ConfigurationModuleType.WAR, null);
-            } catch (MalformedObjectNameException e) {
-                throw new DeploymentException("Could not construct standalone web module name", e);
-            }
+            earName = Naming.createRootName(environment.getConfigId(), NameFactory.NULL, NameFactory.J2EE_APPLICATION);
+            moduleName = Naming.createChildName(earName, NameFactory.WEB_MODULE, environment.getConfigId().toString());
         } else {
             moduleName = naming.createChildName(earName, targetPath, NameFactory.WEB_MODULE);
         }

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java Thu Mar 16 18:21:37 2006
@@ -34,27 +34,14 @@
 
     private final Artifact artifact;
     private final Map name;
-    private final Set interfaceTypes;
-
     private final ObjectName objectName;
 
     public AbstractName(Artifact artifact, Map name, ObjectName objectName) {
-        this(artifact, name, Collections.EMPTY_SET, objectName);
-    }
-
-    public AbstractName(Artifact artifact, Map name, String interfaceType, ObjectName objectName) {
-        this(artifact, name, Collections.singleton(interfaceType), objectName);
-        assert interfaceType != null;
-    }
-
-    public AbstractName(Artifact artifact, Map name, Set interfaceTypes, ObjectName objectName) {
         assert artifact != null;
         assert name != null;
-        if (interfaceTypes == null) interfaceTypes = Collections.EMPTY_SET;
         assert objectName != null;
         this.artifact = artifact;
         this.name = name;
-        this.interfaceTypes = interfaceTypes;
         this.objectName = objectName;
     }
 
@@ -66,25 +53,17 @@
         return Collections.unmodifiableMap(name);
     }
 
-    public Set getInterfaceTypes() {
-        return interfaceTypes;
-    }
-
     public ObjectName getObjectName() {
         return objectName;
     }
 
     public String toString() {
-        StringBuffer buf = new StringBuffer("AbstractName");
+        StringBuffer buf = new StringBuffer("AbstractName:");
         for (Iterator iterator = name.entrySet().iterator(); iterator.hasNext();) {
             Map.Entry entry = (Map.Entry) iterator.next();
             buf.append(",").append(entry.getKey()).append("=").append(entry.getValue());
         }
         buf.append(",artifact=").append(artifact);
-        for (Iterator iterator = interfaceTypes.iterator(); iterator.hasNext();) {
-            String interfaceType = (String) iterator.next();
-            buf.append(",interface=").append(interfaceType);
-        }
         return buf.toString();
     }
 

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractNameQuery.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractNameQuery.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractNameQuery.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractNameQuery.java Thu Mar 16 18:21:37 2006
@@ -36,9 +36,13 @@
     private final Set interfaceTypes;
 
     public AbstractNameQuery(AbstractName abstractName) {
+        this(abstractName, null);
+    }
+
+    public AbstractNameQuery(AbstractName abstractName, Set interfaceTypes) {
         this.artifact = abstractName.getArtifact();
         this.name = abstractName.getName();
-        this.interfaceTypes = abstractName.getInterfaceTypes();
+        this.interfaceTypes = interfaceTypes == null? Collections.EMPTY_SET: interfaceTypes;
     }
 
     public AbstractNameQuery(Artifact artifact, Map name) {
@@ -118,7 +122,27 @@
     }
 
 
-    public boolean matches(AbstractName info) {
+    public boolean matches(AbstractName info, Set targetInterfaceTypes) {
+        if (!info.getName().entrySet().containsAll(name.entrySet())) {
+            return false;
+        }
+        if (!targetInterfaceTypes.containsAll(interfaceTypes)) {
+            return false;
+        }
+        if (artifact == null) {
+            return true;
+        }
+        Artifact otherArtifact = info.getArtifact();
+        return artifact.matches(otherArtifact);
+    }
+
+    /**
+     * N.B. parameter info is supposed to be more specific than this.
+     * This is the opposite of the meaning of Artifact.matches.
+     * @param info
+     * @return if info is a more specific version of this name query.
+     */
+    public boolean matches(AbstractNameQuery info) {
         if (!info.getName().entrySet().containsAll(name.entrySet())) {
             return false;
         }

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java Thu Mar 16 18:21:37 2006
@@ -262,9 +262,9 @@
                 addOperation(new GOperationInfo(method.getName(), method.getParameterTypes()));
             }
         }
-        if(intf.isInterface()) {
+//        if(intf.isInterface()) {
             addInterface(interfaces, intf);
-        }
+//        }
     }
 
     private static void addInterface(Set set, Class intf) {

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/ReferencePatterns.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/ReferencePatterns.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/ReferencePatterns.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/ReferencePatterns.java Thu Mar 16 18:21:37 2006
@@ -77,4 +77,8 @@
         return abstractName;
     }
 
+    public boolean isResolved() {
+        return abstractName != null;
+    }
+
 }

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanDependency.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanDependency.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanDependency.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanDependency.java Thu Mar 16 18:21:37 2006
@@ -70,7 +70,8 @@
     }
 
     public final synchronized void online() {
-        AbstractNameQuery query = new AbstractNameQuery(targetName);
+        //TODO consider including interfaces in query
+        AbstractNameQuery query = new AbstractNameQuery(targetName, null);
         kernel.getLifecycleMonitor().addLifecycleListener(listener, query);
         targetRunning = isRunning(kernel, targetName);
     }

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Jsr77Naming.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Jsr77Naming.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Jsr77Naming.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Jsr77Naming.java Thu Mar 16 18:21:37 2006
@@ -70,7 +70,9 @@
      */
     private static ObjectName createObjectName(Map nameMap) {
         Hashtable objectNameMap = new Hashtable(nameMap);
-        objectNameMap.put("J2EEServer", DEFAULT_SERVER_NAME);
+        if (!"J2EEServer".equals(nameMap.get(J2EE_TYPE))) {
+            objectNameMap.put("J2EEServer", DEFAULT_SERVER_NAME);
+        }
 
         ObjectName moduleObjectName = null;
         try {

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java Thu Mar 16 18:21:37 2006
@@ -32,14 +32,14 @@
 import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
- * @version $Rev: 385487 $ $Date$
+ * @version $Rev$ $Date$
  */
 public interface Kernel {
     /**
      * The JMX name used by a Kernel to register itself when it boots.
      */
     ObjectName KERNEL = JMXUtil.getObjectName(":role=Kernel");
-    AbstractName KERNEL_NAME = new AbstractName(new Artifact("geronimo", "boot", "none", "car"), Collections.EMPTY_MAP, Kernel.class.getName(), KERNEL);
+    AbstractName KERNEL_NAME = new AbstractName(new Artifact("geronimo", "boot", "none", "car"), Collections.EMPTY_MAP, KERNEL);
 
     /**
      * Get the name of this kernel

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java Thu Mar 16 18:21:37 2006
@@ -68,7 +68,7 @@
  * 
  * TODO: Describe the order of method invocation (e.g. if loadGbean may be before boot)
  *
- * @version $Rev: 385487 $ $Date$
+ * @version $Rev:386276 $ $Date$
  */
 public class BasicKernel implements Kernel {
     /**
@@ -237,7 +237,8 @@
 
     public void loadGBean(GBeanData gbeanData, ClassLoader classLoader) throws GBeanAlreadyExistsException, InternalKernelException {
         AbstractName abstractName = gbeanData.getAbstractName();
-        GBeanInstance gbeanInstance = new GBeanInstance(gbeanData, this, dependencyManager, lifecycleMonitor.createLifecycleBroadcaster(abstractName), classLoader);
+        Set interfaces = gbeanData.getGBeanInfo().getInterfaces();
+        GBeanInstance gbeanInstance = new GBeanInstance(gbeanData, this, dependencyManager, lifecycleMonitor.createLifecycleBroadcaster(abstractName, interfaces), classLoader);
         registry.register(gbeanInstance);
     }
 

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicLifecycleMonitor.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicLifecycleMonitor.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicLifecycleMonitor.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicLifecycleMonitor.java Thu Mar 16 18:21:37 2006
@@ -27,11 +27,13 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.lifecycle.LifecycleMonitor;
 import org.apache.geronimo.kernel.lifecycle.LifecycleListener;
 import org.apache.geronimo.gbean.runtime.LifecycleBroadcaster;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.GBeanData;
 
 /**
  * @version $Rev$ $Date$
@@ -41,7 +43,14 @@
 
 
     // todo we should only hold weak references to the listeners
+    /**
+     * Map of AbstractName to set of Listeners interested in this name.
+     */
     private final Map boundListeners = new HashMap();
+
+    /**
+     * Map of listener to patterns they are interested in.
+     */
     private final Map listenerPatterns = new HashMap();
 
     public BasicLifecycleMonitor(Kernel kernel) {
@@ -49,7 +58,15 @@
         // register for state change notifications with all mbeans that match the target patterns
         Set names = kernel.listGBeans((AbstractNameQuery)null);
         for (Iterator objectNameIterator = names.iterator(); objectNameIterator.hasNext();) {
-            addSource((AbstractName) objectNameIterator.next());
+            AbstractName source = (AbstractName) objectNameIterator.next();
+            GBeanData gBeanData;
+            try {
+                gBeanData = kernel.getGBeanData(source);
+            } catch (GBeanNotFoundException e) {
+                //this should never happen
+                throw new AssertionError(e);
+            }
+            addSource(source, gBeanData.getGBeanInfo().getInterfaces());
         }
     }
 
@@ -58,27 +75,28 @@
         listenerPatterns.clear();
     }
 
-    private synchronized void addSource(AbstractName source) {
+    private synchronized void addSource(AbstractName source, Set interfaceTypes) {
         if (boundListeners.containsKey(source)) {
             // already registered
             return;
         }
 
         // find all listeners interested in events from this source
-        HashSet listeners = new HashSet();
+        SourceInfo sourceInfo = new SourceInfo(interfaceTypes);
+        HashSet listeners = sourceInfo.getListeners();
         for (Iterator listenerIterator = listenerPatterns.entrySet().iterator(); listenerIterator.hasNext();) {
             Map.Entry entry = (Map.Entry) listenerIterator.next();
             Set patterns = (Set) entry.getValue();
             for (Iterator patternIterator = patterns.iterator(); patternIterator.hasNext();) {
                 AbstractNameQuery pattern = (AbstractNameQuery) patternIterator.next();
-                if (pattern.matches(source)) {
+                if (pattern.matches(source, interfaceTypes)) {
                     LifecycleListener listener = (LifecycleListener) entry.getKey();
                     listeners.add(listener);
                 }
             }
         }
 
-        boundListeners.put(source, listeners);
+        boundListeners.put(source, sourceInfo);
     }
 
     private synchronized void removeSource(AbstractName source) {
@@ -95,8 +113,9 @@
             for (Iterator iterator = boundListeners.entrySet().iterator(); iterator.hasNext();) {
                 Map.Entry entry = (Map.Entry) iterator.next();
                 AbstractName source = (AbstractName) entry.getKey();
-                if (pattern.matches(source)) {
-                    Set listeners = (Set) entry.getValue();
+                SourceInfo sourceInfo = (SourceInfo) entry.getValue();
+                if (pattern.matches(source, sourceInfo.getInterfaceTypes())) {
+                    Set listeners = sourceInfo.getListeners();
                     listeners.add(listener);
                 }
             }
@@ -106,19 +125,19 @@
 
     public synchronized void removeLifecycleListener(LifecycleListener listener) {
         for (Iterator iterator = boundListeners.values().iterator(); iterator.hasNext();) {
-            Set set = (Set) iterator.next();
-            set.remove(listener);
+            SourceInfo sourceInfo = (SourceInfo) iterator.next();
+            sourceInfo.getListeners().remove(listener);
         }
         listenerPatterns.remove(listener);
     }
 
     private synchronized Set getTargets(AbstractName source) {
-        Set targets = (Set) boundListeners.get(source);
+        SourceInfo targets = (SourceInfo) boundListeners.get(source);
         if (targets == null) {
             // no one is interested in this event
             return Collections.EMPTY_SET;
         } else {
-            return new HashSet(targets);
+            return new HashSet(targets.getListeners());
         }
     }
 
@@ -206,19 +225,21 @@
         }
     }
 
-    public LifecycleBroadcaster createLifecycleBroadcaster(AbstractName abstractName) {
-        return new RawLifecycleBroadcaster(abstractName);
+    public LifecycleBroadcaster createLifecycleBroadcaster(AbstractName abstractName, Set interfaceTypes) {
+        return new RawLifecycleBroadcaster(abstractName, interfaceTypes);
     }
 
     private class RawLifecycleBroadcaster implements LifecycleBroadcaster {
         private final AbstractName abstractName;
+        private final Set interfaceTypes;
 
-        public RawLifecycleBroadcaster(AbstractName abstractName) {
+        public RawLifecycleBroadcaster(AbstractName abstractName, Set interfaceTypes) {
             this.abstractName = abstractName;
+            this.interfaceTypes = interfaceTypes;
         }
 
         public void fireLoadedEvent() {
-            addSource(abstractName);
+            addSource(abstractName, interfaceTypes);
             BasicLifecycleMonitor.this.fireLoadedEvent(abstractName);
         }
 
@@ -248,5 +269,21 @@
         }
     }
 
+    private final class SourceInfo {
+        private final Set interfaceTypes;
+        private final HashSet listeners = new HashSet();
+
+        public SourceInfo(Set interfaceTypes) {
+            this.interfaceTypes = interfaceTypes;
+        }
+
+        public Set getInterfaceTypes() {
+            return interfaceTypes;
+        }
+
+        public HashSet getListeners() {
+            return listeners;
+        }
+    }
 
 }

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicRegistry.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicRegistry.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicRegistry.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicRegistry.java Thu Mar 16 18:21:37 2006
@@ -32,6 +32,7 @@
 import org.apache.geronimo.gbean.GBeanName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.runtime.GBeanInstance;
 
 /**
@@ -175,9 +176,10 @@
         Set result = new HashSet(clone.size());
         for (Iterator i = clone.entrySet().iterator(); i.hasNext();) {
             Map.Entry entry = (Map.Entry) i.next();
-            AbstractName name = (AbstractName) entry.getKey();
-            if (query == null || query.matches(name)) {
-                result.add(entry.getValue());
+            AbstractName abstractName = (AbstractName) entry.getKey();
+            GBeanInstance gbeanData = (GBeanInstance) entry.getValue();
+            if (query == null || query.matches(abstractName, gbeanData.getGBeanInfo().getInterfaces())) {
+                result.add(gbeanData);
             }
         }
         return result;

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java Thu Mar 16 18:21:37 2006
@@ -110,7 +110,7 @@
     }
 
     public static AbstractName getConfigurationAbstractName(Artifact configId) throws InvalidConfigException {
-        return new AbstractName(configId, Collections.EMPTY_MAP, Configuration.class.getName(), getConfigurationObjectName(configId));
+        return new AbstractName(configId, Collections.EMPTY_MAP, getConfigurationObjectName(configId));
     }
 
     public static boolean isConfigurationObjectName(ObjectName name) {
@@ -520,8 +520,7 @@
 
     public AbstractName findGBean(ReferencePatterns referencePatterns) throws GBeanNotFoundException {
         if (referencePatterns == null) throw new NullPointerException("referencePatterns is null");
-        if (referencePatterns.getAbstractName() != null) {
-            // this pattern is already resolved
+        if (referencePatterns.isResolved()) {
             return referencePatterns.getAbstractName();
         }
 
@@ -621,8 +620,9 @@
                 for (Iterator iterator = gbeanNames.iterator(); iterator.hasNext();) {
                     Map.Entry entry = (Map.Entry) iterator.next();
                     AbstractName abstractName = (AbstractName) entry.getKey();
-                    if (abstractNameQuery.matches(abstractName)) {
-                        result.add(entry.getValue());
+                    GBeanData gbeanData = (GBeanData) entry.getValue();
+                    if (abstractNameQuery.matches(abstractName, gbeanData.getGBeanInfo().getInterfaces())) {
+                        result.add(gbeanData);
                     }
                 }
             }

Modified: geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/ConfigTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/ConfigTest.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/ConfigTest.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/ConfigTest.java Thu Mar 16 18:21:37 2006
@@ -32,7 +32,7 @@
 import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
 
 /**
- * @version $Rev: 384999 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class ConfigTest extends TestCase {
     private Kernel kernel;
@@ -203,7 +203,7 @@
         mockBean2.setAttribute("name", "Parent");
         mockBean2.setAttribute("finalInt", new Integer(3));
         mockBean2.setReferencePattern("MockEndpoint", gbeanName1);
-        mockBean2.setReferencePattern("EndpointCollection", new AbstractNameQuery(gbeanName1));
+        mockBean2.setReferencePattern("EndpointCollection", new AbstractNameQuery(gbeanName1, MockGBean.getGBeanInfo().getInterfaces()));
     }
 
     protected void tearDown() throws Exception {

Modified: geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java Thu Mar 16 18:21:37 2006
@@ -36,7 +36,7 @@
 import org.apache.log4j.PatternLayout;
 
 /**
- * @version $Rev: 384141 $ $Date$
+ * @version $Rev$ $Date$
  */
 public class GBeanTest extends TestCase {
     private Kernel kernel;
@@ -48,7 +48,7 @@
         kernel.startGBean(gbean.getAbstractName());
         assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(gbean.getAbstractName()));
 
-        Set gbeans = kernel.listGBeans(new AbstractNameQuery(gbean.getAbstractName()));
+        Set gbeans = kernel.listGBeans(new AbstractNameQuery(gbean.getAbstractName(), gbean.getGBeanInfo().getInterfaces()));
         assertEquals(1, gbeans.size());
         assertEquals(gbean.getAbstractName(), gbeans.iterator().next());
     }

Modified: geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java (original)
+++ geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java Thu Mar 16 18:21:37 2006
@@ -26,6 +26,7 @@
 import org.apache.geronimo.j2ee.deployment.ServiceReferenceBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.ClassLoading;
+import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.naming.java.ComponentContextBuilder;
@@ -172,7 +173,6 @@
                 try {
                     AbstractNameQuery containerId = getResourceContainerId(name, j2eeType, moduleURI, gerResourceRef);
 
-                    //TODO configid not sure what knownParent is supposed to be
                     ref = refContext.getConnectionFactoryRef(containerId, iface, earContext);
                     builder.bind(name, ref);
                 } catch (UnresolvedReferenceException e) {
@@ -216,7 +216,6 @@
             GerResourceEnvRefType gerResourceEnvRef = (GerResourceEnvRefType) refMap.get(name);
             try {
                 AbstractNameQuery containerId = getAdminObjectContainerId(name, gerResourceEnvRef);
-                //TODO not sure what knownParent is supposed to be
                 Reference ref = refContext.getAdminObjectRef(containerId, iface, earContext);
 
                 builder.bind(name, ref);
@@ -278,7 +277,6 @@
             //try to resolve ref based only matching resource-ref-name
             //throws exception if it can't locate ref.
             AbstractNameQuery containerId = buildAbstractNameQuery(null, moduleURI, NameFactory.JCA_ADMIN_OBJECT, linkName);
-            //TODO configid not sure what knwonParent is suppsed to be
             Reference ref = refContext.getAdminObjectRef(containerId, iface, earContext);
             builder.bind(name, ref);
 
@@ -291,77 +289,85 @@
             EjbRefType ejbRef = ejbRefs[i];
 
             String ejbRefName = getStringValue(ejbRef.getEjbRefName());
+            GerEjbRefType remoteRef = (GerEjbRefType) ejbRefMap.get(ejbRefName);
 
-            String remote = getStringValue(ejbRef.getRemote());
-            try {
-                assureEJBObjectInterface(remote, cl);
-            } catch (DeploymentException e) {
-                throw new DeploymentException("Error processing 'remote' element for EJB Reference '" + ejbRefName + "' for module '" + moduleURI + "': " + e.getMessage());
-            }
+            Reference ejbReference = addEJBRef(earContext, ejbContext, refContext, moduleURI, ejbRef, remoteRef, cl);
+            builder.bind(ejbRefName, ejbReference);
+        }
+    }
 
-            String home = getStringValue(ejbRef.getHome());
-            try {
-                assureEJBHomeInterface(home, cl);
-            } catch (DeploymentException e) {
-                throw new DeploymentException("Error processing 'home' element for EJB Reference '" + ejbRefName + "' for module '" + moduleURI + "': " + e.getMessage());
-            }
+    static Reference addEJBRef(Configuration earContext, Configuration ejbContext, RefContext refContext, URI moduleURI, EjbRefType ejbRef, GerEjbRefType remoteRef, ClassLoader cl) throws DeploymentException {
+        String remote = getStringValue(ejbRef.getRemote());
+        try {
+            assureEJBObjectInterface(remote, cl);
+        } catch (DeploymentException e) {
+            throw new DeploymentException("Error processing 'remote' element for EJB Reference '" + getStringValue(ejbRef.getEjbRefName()) + "' for module '" + moduleURI + "': " + e.getMessage());
+        }
 
-            Reference ejbReference;
-            boolean isSession = "Session".equals(getStringValue(ejbRef.getEjbRefType()));
-
-            if (isSession && remote.equals("javax.management.j2ee.Management") && home.equals("javax.management.j2ee.ManagementHome"))
-            {
-                AbstractNameQuery query = new AbstractNameQuery(null, Collections.singletonMap("name", "ejb/mgmt/MEJB"));
-                ejbReference = refContext.getEJBRemoteRef(null, null, null, null, query, isSession, home, remote, ejbContext);
-            } else {
+        String home = getStringValue(ejbRef.getHome());
+        try {
+            assureEJBHomeInterface(home, cl);
+        } catch (DeploymentException e) {
+            throw new DeploymentException("Error processing 'home' element for EJB Reference '" + getStringValue(ejbRef.getEjbRefName()) + "' for module '" + moduleURI + "': " + e.getMessage());
+        }
 
-                String ejbLink = null;
-                GerEjbRefType remoteRef = (GerEjbRefType) ejbRefMap.get(ejbRefName);
-                if (remoteRef != null && remoteRef.isSetNsCorbaloc()) {
-                    try {
-                        AbstractNameQuery cssBean;
-                        if (remoteRef.isSetCssLink()) {
-                            String cssLink = remoteRef.getCssLink().trim();
-                            cssBean = buildAbstractNameQuery(null, null, NameFactory.CORBA_CSS, cssLink);
-                        } else {
-                            GerPatternType css = remoteRef.getCss();
-                            cssBean = buildAbstractNameQuery(css, NameFactory.CORBA_CSS);
-                        }
-                        ejbReference = refContext.getCORBARemoteRef(earContext,
-                                cssBean,
-                                new URI(getStringValue(remoteRef.getNsCorbaloc())),
-                                getStringValue(remoteRef.getName()),
-                                home);
-                    } catch (URISyntaxException e) {
-                        throw new DeploymentException("Could not construct CORBA NameServer URI: " + remoteRef.getNsCorbaloc(), e);
-                    }
-                } else {
-                    Artifact targetConfigId = null;
-                    String optionalModule = moduleURI == null ? null : moduleURI.toString();
-                    String requiredModule = null;
-                    AbstractNameQuery containerId = null;
-                    if (remoteRef != null && remoteRef.isSetEjbLink()) {
-                        ejbLink = remoteRef.getEjbLink();
-                    } else if (ejbRef.isSetEjbLink()) {
-                        ejbLink = getStringValue(ejbRef.getEjbLink());
-                        targetConfigId = ejbContext.getId();
+        Reference ejbReference;
+        boolean isSession = "Session".equals(getStringValue(ejbRef.getEjbRefType()));
+
+        if (isSession && remote.equals("javax.management.j2ee.Management") && home.equals("javax.management.j2ee.ManagementHome"))
+        {
+            AbstractNameQuery query = new AbstractNameQuery(null, Collections.singletonMap("name", "ejb/mgmt/MEJB"));
+            ejbReference = refContext.getEJBRemoteRef(null, null, null, null, query, isSession, home, remote, ejbContext);
+        } else {
+
+            String ejbLink = null;
+            if (remoteRef != null && remoteRef.isSetNsCorbaloc()) {
+                try {
+                    AbstractNameQuery cssBean;
+                    if (remoteRef.isSetCssLink()) {
+                        String cssLink = remoteRef.getCssLink().trim();
+                        cssBean = buildAbstractNameQuery(null, null, NameFactory.CORBA_CSS, cssLink);
+                    } else {
+                        GerPatternType css = remoteRef.getCss();
+                        cssBean = buildAbstractNameQuery(css, NameFactory.CORBA_CSS);
                     }
-                    if (ejbLink != null) {
-                        String[] bits = ejbLink.split("#");
-                        if (bits.length == 2) {
-                            //look only in specified module.
-                            requiredModule = bits[0];
-                            ejbLink = bits[1];
+                    ejbReference = refContext.getCORBARemoteRef(earContext,
+                            cssBean,
+                            new URI(getStringValue(remoteRef.getNsCorbaloc())),
+                            getStringValue(remoteRef.getName()),
+                            home);
+                } catch (URISyntaxException e) {
+                    throw new DeploymentException("Could not construct CORBA NameServer URI: " + remoteRef.getNsCorbaloc(), e);
+                }
+            } else {
+                Artifact targetConfigId = null;
+                String optionalModule = moduleURI == null ? null : moduleURI.toString();
+                String requiredModule = null;
+                AbstractNameQuery containerId = null;
+                if (remoteRef != null && remoteRef.isSetEjbLink()) {
+                    ejbLink = remoteRef.getEjbLink();
+                } else if (ejbRef.isSetEjbLink()) {
+                    ejbLink = getStringValue(ejbRef.getEjbLink());
+                    targetConfigId = ejbContext.getId();
+                }
+                if (ejbLink != null) {
+                    String[] bits = ejbLink.split("#");
+                    if (bits.length == 2) {
+                        //look only in specified module.
+                        requiredModule = bits[0];
+                        if (moduleURI != null) {
+                            requiredModule = moduleURI.resolve(requiredModule).getPath();
                         }
-                    } else if (remoteRef != null) {
-                        GerPatternType patternType = remoteRef.getPattern();
-                        containerId = buildAbstractNameQuery(patternType, null);
+                        ejbLink = bits[1];
                     }
-                    ejbReference = refContext.getEJBRemoteRef(requiredModule, optionalModule, ejbLink, targetConfigId, containerId, isSession, home, remote, ejbContext);
+                } else if (remoteRef != null) {
+                    GerPatternType patternType = remoteRef.getPattern();
+                    containerId = buildAbstractNameQuery(patternType, null);
                 }
+                ejbReference = refContext.getEJBRemoteRef(requiredModule, optionalModule, ejbLink, targetConfigId, containerId, isSession, home, remote, ejbContext);
             }
-            builder.bind(ejbRefName, ejbReference);
         }
+        return ejbReference;
     }
 
     static void addEJBLocalRefs(Configuration ejbContext, RefContext refContext, URI moduleURI, EjbLocalRefType[] ejbLocalRefs, Map ejbLocalRefMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
@@ -369,55 +375,59 @@
             EjbLocalRefType ejbLocalRef = ejbLocalRefs[i];
 
             String ejbRefName = getStringValue(ejbLocalRef.getEjbRefName());
+            GerEjbLocalRefType localRef = (GerEjbLocalRefType) ejbLocalRefMap.get(ejbRefName);
 
-            String local = getStringValue(ejbLocalRef.getLocal());
-            try {
-                assureEJBLocalObjectInterface(local, cl);
-            } catch (DeploymentException e) {
-                throw new DeploymentException("Error processing 'local' element for EJB Local Reference '" + ejbRefName + "' for module '" + moduleURI + "': " + e.getMessage());
-            }
-
-            String localHome = getStringValue(ejbLocalRef.getLocalHome());
-            try {
-                assureEJBLocalHomeInterface(localHome, cl);
-            } catch (DeploymentException e) {
-                throw new DeploymentException("Error processing 'local-home' element for EJB Local Reference '" + ejbRefName + "' for module '" + moduleURI + "': " + e.getMessage());
-            }
+            Reference ejbReference = addEJBLocalRef(ejbContext, refContext, moduleURI, ejbLocalRef, localRef, cl);
+            builder.bind(ejbRefName, ejbReference);
+        }
+    }
 
-            boolean isSession = "Session".equals(getStringValue(ejbLocalRef.getEjbRefType()));
+    static Reference addEJBLocalRef(Configuration ejbContext, RefContext refContext, URI moduleURI, EjbLocalRefType ejbLocalRef, GerEjbLocalRefType localRef, ClassLoader cl) throws DeploymentException {
+        String local = getStringValue(ejbLocalRef.getLocal());
+        try {
+            assureEJBLocalObjectInterface(local, cl);
+        } catch (DeploymentException e) {
+            throw new DeploymentException("Error processing 'local' element for EJB Local Reference '" + getStringValue(ejbLocalRef.getEjbRefName()) + "' for module '" + moduleURI + "': " + e.getMessage());
+        }
 
-            String ejbLink = null;
-            GerEjbLocalRefType localRef = (GerEjbLocalRefType) ejbLocalRefMap.get(ejbRefName);
-            if (localRef != null && localRef.isSetEjbLink()) {
-                ejbLink = localRef.getEjbLink();
-            } else if (ejbLocalRef.isSetEjbLink()) {
-                ejbLink = getStringValue(ejbLocalRef.getEjbLink());
-            }
-
-            Artifact targetConfigId = null;
-            String optionalModule = moduleURI == null ? null : moduleURI.toString();
-            String requiredModule = null;
-            AbstractNameQuery containerId = null;
-            if (localRef != null && localRef.isSetEjbLink()) {
-                ejbLink = localRef.getEjbLink();
-            } else if (ejbLocalRef.isSetEjbLink()) {
-                ejbLink = getStringValue(ejbLocalRef.getEjbLink());
-                targetConfigId = ejbContext.getId();
-            }
-            if (ejbLink != null) {
-                String[] bits = ejbLink.split("#");
-                if (bits.length == 2) {
-                    //look only in specified module.
-                    requiredModule = bits[0];
-                    ejbLink = bits[1];
-                }
-            } else if (localRef != null) {
-                GerPatternType patternType = localRef.getPattern();
-                containerId = buildAbstractNameQuery(patternType, null);
-            }
-            Reference ejbReference = refContext.getEJBRemoteRef(requiredModule, optionalModule, ejbLink, targetConfigId, containerId, isSession, localHome, local, ejbContext);
-            builder.bind(ejbRefName, ejbReference);
+        String localHome = getStringValue(ejbLocalRef.getLocalHome());
+        try {
+            assureEJBLocalHomeInterface(localHome, cl);
+        } catch (DeploymentException e) {
+            throw new DeploymentException("Error processing 'local-home' element for EJB Local Reference '" + getStringValue(ejbLocalRef.getEjbRefName()) + "' for module '" + moduleURI + "': " + e.getMessage());
+        }
+
+        boolean isSession = "Session".equals(getStringValue(ejbLocalRef.getEjbRefType()));
+
+        String ejbLink = null;
+        if (localRef != null && localRef.isSetEjbLink()) {
+            ejbLink = localRef.getEjbLink();
+        } else if (ejbLocalRef.isSetEjbLink()) {
+            ejbLink = getStringValue(ejbLocalRef.getEjbLink());
+        }
+
+        Artifact targetConfigId = null;
+        String optionalModule = moduleURI == null ? null : moduleURI.toString();
+        String requiredModule = null;
+        AbstractNameQuery containerId = null;
+        if (localRef != null && localRef.isSetEjbLink()) {
+            ejbLink = localRef.getEjbLink();
+        } else if (ejbLocalRef.isSetEjbLink()) {
+            ejbLink = getStringValue(ejbLocalRef.getEjbLink());
+            targetConfigId = ejbContext.getId();
+        }
+        if (ejbLink != null) {
+            String[] bits = ejbLink.split("#");
+            if (bits.length == 2) {
+                //look only in specified module.
+                requiredModule = bits[0];
+                ejbLink = bits[1];
+            }
+        } else if (localRef != null) {
+            GerPatternType patternType = localRef.getPattern();
+            containerId = buildAbstractNameQuery(patternType, null);
         }
+        return refContext.getEJBRemoteRef(requiredModule, optionalModule, ejbLink, targetConfigId, containerId, isSession, localHome, local, ejbContext);
     }
 
 //TODO current implementation does not deal with portComponentRef links.
@@ -753,7 +763,7 @@
         Map nameMap = new HashMap();
         nameMap.put("name", name);
         if (type != null) {
-            nameMap.put("type", type);
+            nameMap.put("j2eeType", type);
         }
         if (module != null) {
             nameMap.put("module", module);
@@ -765,7 +775,7 @@
         Map nameMap = new HashMap();
         nameMap.put("name", name);
         if (type != null) {
-            nameMap.put("type", type);
+            nameMap.put("j2eeType", type);
         }
         if (module != null) {
             nameMap.put("module", module);

Modified: geronimo/branches/1.1/modules/security/src/test/org/apache/geronimo/security/AbstractTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/security/src/test/org/apache/geronimo/security/AbstractTest.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/security/src/test/org/apache/geronimo/security/AbstractTest.java (original)
+++ geronimo/branches/1.1/modules/security/src/test/org/apache/geronimo/security/AbstractTest.java Thu Mar 16 18:21:37 2006
@@ -153,7 +153,7 @@
     private AbstractName buildAbstractName(String key, String value, GBeanInfo info) throws MalformedObjectNameException {
         Map names = new HashMap();
         names.put(key, value);
-        return new AbstractName(new Artifact("test", "foo", "1", "car"), names, info.getInterfaces(), new ObjectName("test:" + key + "=" + value));
+        return new AbstractName(new Artifact("test", "foo", "1", "car"), names, new ObjectName("test:" + key + "=" + value));
     }
 
     public static class UsernamePasswordCallback implements CallbackHandler {

Modified: geronimo/branches/1.1/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java (original)
+++ geronimo/branches/1.1/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java Thu Mar 16 18:21:37 2006
@@ -274,7 +274,7 @@
       private AbstractName buildAbstractName(String key, String value, GBeanInfo info) throws MalformedObjectNameException {
           Map names = new HashMap();
           names.put(key, value);
-          return new AbstractName(new Artifact("test", "foo", "1", "car"), names, info.getInterfaces(), new ObjectName("test:" + key + "=" + value));
+          return new AbstractName(new Artifact("test", "foo", "1", "car"), names, new ObjectName("test:" + key + "=" + value));
       }
 
 }

Modified: geronimo/branches/1.1/modules/security/src/test/org/apache/geronimo/security/remoting/jmx/RemoteLoginTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/security/src/test/org/apache/geronimo/security/remoting/jmx/RemoteLoginTest.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/security/src/test/org/apache/geronimo/security/remoting/jmx/RemoteLoginTest.java (original)
+++ geronimo/branches/1.1/modules/security/src/test/org/apache/geronimo/security/remoting/jmx/RemoteLoginTest.java Thu Mar 16 18:21:37 2006
@@ -222,7 +222,7 @@
     private AbstractName buildAbstractName(String key, String value, GBeanInfo info) throws MalformedObjectNameException {
         Map names = new HashMap();
         names.put(key, value);
-        return new AbstractName(new Artifact("test", "foo", "1", "car"), names, info.getInterfaces(), new ObjectName("test:" + key + "=" + value));
+        return new AbstractName(new Artifact("test", "foo", "1", "car"), names, new ObjectName("test:" + key + "=" + value));
     }
 
     class UsernamePasswordCallback implements CallbackHandler {

Modified: geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanBuilder.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanBuilder.java (original)
+++ geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanBuilder.java Thu Mar 16 18:21:37 2006
@@ -30,6 +30,7 @@
 import org.apache.geronimo.gbean.GReferenceInfo;
 import org.apache.geronimo.gbean.ReferencePatterns;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.Naming;
 import org.apache.xmlbeans.XmlObject;
 
 import java.beans.PropertyEditor;
@@ -172,10 +173,10 @@
         Map nameMap = new HashMap();
         nameMap.put("name", name);
         if (type != null) {
-            nameMap.put("type", type);
+            nameMap.put("j2eeType", type);
         }
         if (module != null) {
-            nameMap.put("module", module);
+            nameMap.put("J2EEModule", module);
         }
         String interfaceType = referenceInfo.getProxyType();
         return new AbstractNameQuery(artifact, nameMap, Collections.singleton(interfaceType));

Modified: geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java (original)
+++ geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java Thu Mar 16 18:21:37 2006
@@ -30,19 +30,19 @@
 import org.apache.geronimo.deployment.xbeans.ReferencesType;
 import org.apache.geronimo.deployment.xbeans.XmlAttributeType;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
+import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.ReferenceMap;
-import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
-import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.config.ConfigurationAlreadyExistsException;
 import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
-import org.apache.geronimo.kernel.config.ConfigurationAlreadyExistsException;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.Repository;
@@ -50,15 +50,14 @@
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 
-import javax.management.MalformedObjectNameException;
 import javax.xml.namespace.QName;
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Collections;
 import java.util.jar.JarFile;
 
 /**
@@ -174,12 +173,7 @@
         ClassLoader cl = context.getClassLoader();
 
 
-        AbstractName moduleName;
-        try {
-            moduleName = NameFactory.buildModuleName(environment.getProperties(), configId, ConfigurationModuleType.SERVICE, null);
-        } catch (MalformedObjectNameException e) {
-            throw new DeploymentException(e);
-        }
+        AbstractName moduleName = naming.createRootName(configId, configId.toString(), NameFactory.SERVICE_MODULE);
         GbeanType[] gbeans = configurationType.getGbeanArray();
         addGBeans(gbeans, cl, moduleName, context);
         context.close();

Modified: geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/xmlbeans/XmlBeansUtil.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/xmlbeans/XmlBeansUtil.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/xmlbeans/XmlBeansUtil.java (original)
+++ geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/xmlbeans/XmlBeansUtil.java Thu Mar 16 18:21:37 2006
@@ -43,7 +43,7 @@
         NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/j2ee/connector", "http://geronimo.apache.org/xml/ns/j2ee/connector-1.1");
         NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/deployment/javabean", "http://geronimo.apache.org/xml/ns/deployment/javabean-1.0");
         NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/loginconfig", "http://geronimo.apache.org/xml/ns/loginconfig-1.0");
-        NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/naming", "http://geronimo.apache.org/xml/ns/naming-1.0");
+        NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/naming", "http://geronimo.apache.org/xml/ns/naming-1.1");
         NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/security", "http://geronimo.apache.org/xml/ns/security-1.1");
         NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/web", "http://geronimo.apache.org/xml/ns/j2ee/web-1.1");
         NAMESPACE_UPDATES.put("http://geronimo.apache.org/xml/ns/web/jetty", "http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1");

Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigurationDump.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigurationDump.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigurationDump.java (original)
+++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigurationDump.java Thu Mar 16 18:21:37 2006
@@ -121,7 +121,7 @@
     private static AbstractName buildAbstractName(String key, String value, GBeanInfo info) throws MalformedObjectNameException {
         Map names = new HashMap();
         names.put(key, value);
-        return new AbstractName(new Artifact("geronimo", "configdump", "1", "car"), names, info.getInterfaces(), new ObjectName("geronimo.configdump:" + key + "=" + value));
+        return new AbstractName(new Artifact("geronimo", "configdump", "1", "car"), names, new ObjectName("geronimo.configdump:" + key + "=" + value));
     }
 
     private static void startGBean(Kernel kernel, GBeanData gbeanData) throws Exception {

Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java (original)
+++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java Thu Mar 16 18:21:37 2006
@@ -50,12 +50,10 @@
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.Timer;
 import java.util.TimerTask;
 
@@ -127,7 +125,7 @@
                             " gbeanName=" + name);
                 }
                 GBeanInfo gbeanInfo = GBeanInfo.getGBeanInfo(gbean.getGBeanInfo(), classLoader);
-                AbstractName abstractName = new AbstractName(configurationName, ((ObjectName)name).getKeyPropertyList(), gbeanInfo.getInterfaces(), (ObjectName)name);
+                AbstractName abstractName = new AbstractName(configurationName, ((ObjectName)name).getKeyPropertyList(), (ObjectName)name);
                 GBeanData gBeanData = new GBeanData(abstractName, gbeanInfo);
                 gbeanDatas.add(gBeanData);
             }

Modified: geronimo/branches/1.1/modules/system/src/test/org/apache/geronimo/system/configuration/LocalAttributeManagerTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/system/src/test/org/apache/geronimo/system/configuration/LocalAttributeManagerTest.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/system/src/test/org/apache/geronimo/system/configuration/LocalAttributeManagerTest.java (original)
+++ geronimo/branches/1.1/modules/system/src/test/org/apache/geronimo/system/configuration/LocalAttributeManagerTest.java Thu Mar 16 18:21:37 2006
@@ -81,7 +81,7 @@
 
     public void testGBeanShouldLoad() throws Exception {
         ObjectName objectName = ObjectName.getInstance(":name=gbean2");
-        AbstractName gbeanName2 = new AbstractName(configurationName, objectName.getKeyPropertyList(), LocalAttributeManagerTest.class.getName(), objectName);
+        AbstractName gbeanName2 = new AbstractName(configurationName, objectName.getKeyPropertyList(), objectName);
 
         // should load by default
         Set originalDatas = new HashSet();
@@ -128,7 +128,7 @@
 
     public void testSetReference() throws Exception {
         ObjectName referencePatternObjectName = new ObjectName(":name=referencePattern");
-        AbstractName referencePattern = new AbstractName(configurationName, referencePatternObjectName.getKeyPropertyList(), Collections.EMPTY_SET, referencePatternObjectName);
+        AbstractName referencePattern = new AbstractName(configurationName, referencePatternObjectName.getKeyPropertyList(), referencePatternObjectName);
         ReferencePatterns referencePatterns = new ReferencePatterns(referencePattern);
         localAttributeManager.setReferencePatterns(configurationName.toString(), gbeanName, referenceInfo, referencePatterns);
         Collection gbeanDatas = new ArrayList();
@@ -178,7 +178,7 @@
         localAttributeManager = new LocalAttributeManager("target/test-config.xml", false, new BasicServerInfo(basedir));
         configurationName = Artifact.create("configuration/name/1/car");
         ObjectName objectName = ObjectName.getInstance(":name=gbean");
-        gbeanName = new AbstractName(configurationName, objectName.getKeyPropertyList(), LocalAttributeManagerTest.class.getName(), objectName);
+        gbeanName = new AbstractName(configurationName, objectName.getKeyPropertyList(), objectName);
         attributeInfo = GBEAN_INFO.getAttribute("attribute");
         referenceInfo = GBEAN_INFO.getReference("reference");
     }

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=386505&r1=386504&r2=386505&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 Thu Mar 16 18:21:37 2006
@@ -186,11 +186,8 @@
         }
         AbstractName moduleName;
         if (earName == null) {
-            try {
-                moduleName = NameFactory.buildModuleName(environment.getProperties(), environment.getConfigId(), ConfigurationModuleType.WAR, null);
-            } catch (MalformedObjectNameException e) {
-                throw new DeploymentException("Could not construct standalone web module name", e);
-            }
+            earName = Naming.createRootName(environment.getConfigId(), NameFactory.NULL, NameFactory.J2EE_APPLICATION);
+            moduleName = Naming.createChildName(earName, NameFactory.WEB_MODULE, environment.getConfigId().toString());
         } else {
             moduleName = naming.createChildName(earName, targetPath, NameFactory.WEB_MODULE);
         }

Modified: geronimo/branches/1.1/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManagerGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManagerGBean.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManagerGBean.java (original)
+++ geronimo/branches/1.1/modules/transaction/src/java/org/apache/geronimo/transaction/context/TransactionContextManagerGBean.java Thu Mar 16 18:21:37 2006
@@ -55,6 +55,7 @@
 
         infoFactory.addInterface(XATerminator.class);
         infoFactory.addInterface(XAWork.class);
+        infoFactory.addInterface(TransactionContextManager.class);
 
         infoFactory.setConstructor(new String[]{"TransactionManager", "XidImporter"});
         GBEAN_INFO = infoFactory.getBeanInfo();

Modified: geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java?rev=386505&r1=386504&r2=386505&view=diff
==============================================================================
--- geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java (original)
+++ geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java Thu Mar 16 18:21:37 2006
@@ -47,7 +47,7 @@
  * JellyBean that builds a Geronimo Configuration using the local Mavem
  * infrastructure.
  *
- * @version $Rev: 385487 $ $Date$
+ * @version $Rev:385659 $ $Date$
  */
 public class PackageBuilder {
 



Mime
View raw message