geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r156292 [2/3] - in geronimo/trunk: itests/naming/client/src/plan/ modules/assembly/src/plan/ modules/axis/src/java/org/apache/geronimo/axis/ modules/axis/src/plans/ modules/client-builder/src/java/org/apache/geronimo/client/builder/ modules/client/src/java/org/apache/geronimo/client/ modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ modules/connector-builder/src/test-data/connector_1_0/ modules/connector-builder/src/test-data/connector_1_5/ modules/connector-builder/src/test-data/data/ modules/connector/src/java/org/apache/geronimo/connector/ modules/connector/src/java/org/apache/geronimo/connector/outbound/ modules/connector/src/java/org/apache/geronimo/connector/outbound/connectiontracking/ modules/connector/src/java/org/apache/geronimo/connector/outbound/transactionlog/ modules/connector/src/java/org/apache/geronimo/connector/work/ modules/deployment/src/java/org/apache/geronimo/deployment/ modules/deployment/src/java/org/apache/geronimo/deployment/xml/ modules/derby/src/java/org/apache/geronimo/derby/ modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ modules/j2ee-builder/src/test-ear/META-INF/ modules/j2ee-builder/src/test-ear13/META-INF/ modules/j2ee-builder/src/test-unpacked-ear/META-INF/ modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/ modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/ modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/ modules/jetty-builder/src/test-resources/services/ modules/jetty/src/java/org/apache/geronimo/jetty/ modules/jetty/src/java/org/apache/geronimo/jetty/connector/ modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/ modules/jetty/src/test-resources/services/ modules/kernel/src/java/org/apache/geronimo/gbean/ modules/kernel/src/java/org/apache/geronimo/kernel/config/ modules/kernel/src/test/org/apache/geronimo/gbean/ modules/kernel/src/test/org/apache/geronimo/kernel/ modules/mail/src/java/org/apache/geronimo/mail/ modules/security/src/java/org/apache/geronimo/security/ modules/security/src/java/org/apache/geronimo/security/jaas/ modules/security/src/java/org/apache/geronimo/security/realm/ modules/security/src/java/org/apache/geronimo/security/remoting/jmx/ modules/security/src/test/org/apache/geronimo/security/ modules/security/src/test/org/apache/geronimo/security/jaas/ modules/security/src/test/org/apache/geronimo/security/remoting/jmx/ modules/service-builder/src/java/org/apache/geronimo/deployment/service/ modules/service-builder/src/schema/ modules/service-builder/src/test-resources/services/ modules/service-builder/src/test/org/apache/geronimo/deployment/ modules/service-builder/src/test/org/apache/geronimo/deployment/service/ modules/spring-builder/src/java/org/apache/geronimo/spring/deployment/ modules/system/src/java/org/apache/geronimo/system/configuration/ modules/system/src/java/org/apache/geronimo/system/logging/log4j/ modules/system/src/java/org/apache/geronimo/system/repository/ modules/timer/src/java/org/apache/geronimo/timer/jdbc/ modules/timer/src/java/org/apache/geronimo/timer/vm/ modules/tomcat/src/java/org/apache/geronimo/tomcat/ modules/tomcat/src/java/org/apache/geronimo/tomcat/connector/ modules/tomcat/src/plan/ modules/transaction/src/java/org/apache/geronimo/transaction/context/ modules/transaction/src/java/org/apache/geronimo/transaction/log/ modules/transaction/src/java/org/apache/geronimo/transaction/manager/
Date Sun, 06 Mar 2005 02:48:21 GMT
Modified: geronimo/trunk/modules/connector-builder/src/test-data/connector_1_0/geronimo-ra.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/test-data/connector_1_0/geronimo-ra.xml?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/test-data/connector_1_0/geronimo-ra.xml (original)
+++ geronimo/trunk/modules/connector-builder/src/test-data/connector_1_0/geronimo-ra.xml Sat Mar  5 18:48:02 2005
@@ -79,10 +79,10 @@
     </resourceadapter>
 
     <!--normally this is in the j2ee-server-plan.xml.  It is included here so the gbeans can start in unit tests-->
-    <gbean namePart="ConnectionTracker" class="org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator">
+    <gbean name="ConnectionTracker" class="org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator">
     </gbean>
 
-    <gbean namePart="TargetRealm" class="org.apache.geronimo.security.bridge.ConfiguredIdentityUserPasswordRealmBridge">
+    <gbean name="TargetRealm" class="org.apache.geronimo.security.bridge.ConfiguredIdentityUserPasswordRealmBridge">
         <attribute name="targetRealm">TargetRealm</attribute>
         <attribute name="configuredUser">testUser</attribute>
         <attribute name="configuredPassword">testPassword</attribute>

Modified: geronimo/trunk/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml (original)
+++ geronimo/trunk/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml Sat Mar  5 18:48:02 2005
@@ -104,30 +104,30 @@
     </adminobject>
 
     <!--normally this is in the j2ee-server-plan.xml.  It is included here so the gbeans can start in unit tests-->
-    <gbean namePart="ConnectionTracker" class="org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator">
+    <gbean name="ConnectionTracker" class="org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator">
     </gbean>
 
-    <gbean namePart="DefaultWorkManager" class="org.apache.geronimo.connector.work.GeronimoWorkManager">
+    <gbean name="DefaultWorkManager" class="org.apache.geronimo.connector.work.GeronimoWorkManager">
         <attribute name="syncMaximumPoolSize">10</attribute>
         <attribute name="startMaximumPoolSize">10</attribute>
         <attribute name="scheduledMaximumPoolSize">10</attribute>
-        <reference name="TransactionContextManager">*:name=TransactionContextManager,*</reference>
+        <reference name="TransactionContextManager"><gbean-name>*:name=TransactionContextManager,*</gbean-name></reference>
     </gbean>
 
-    <gbean namePart="TransactionManager" class="org.apache.geronimo.transaction.manager.TransactionManagerImpl">
+    <gbean name="TransactionManager" class="org.apache.geronimo.transaction.manager.TransactionManagerImpl">
         <attribute name="defaultTransactionTimeoutSeconds">10</attribute>
         <references name="ResourceManagers">
-            <pattern>*:j2eeType=JCAManagedConnectionFactory,*</pattern>
-            <pattern>*:j2eeType=MessageDrivenBean,*</pattern>
+            <pattern><gbean-name>*:j2eeType=JCAManagedConnectionFactory,*</gbean-name></pattern>
+            <pattern><gbean-name>*:j2eeType=MessageDrivenBean,*</gbean-name></pattern>
         </references>
     </gbean>
 
-    <gbean namePart="TransactionContextManager" class="org.apache.geronimo.transaction.context.TransactionContextManager">
-        <reference name="TransactionManager">*:name=TransactionManager,*</reference>
-        <reference name="XidImporter">*:name=TransactionManager,*</reference>
+    <gbean name="TransactionContextManager" class="org.apache.geronimo.transaction.context.TransactionContextManager">
+        <reference name="TransactionManager"><gbean-name>*:name=TransactionManager,*</gbean-name></reference>
+        <reference name="XidImporter"><gbean-name>*:name=TransactionManager,*</gbean-name></reference>
     </gbean>
 
-    <gbean namePart="TargetRealm" class="org.apache.geronimo.security.bridge.ConfiguredIdentityUserPasswordRealmBridge">
+    <gbean name="TargetRealm" class="org.apache.geronimo.security.bridge.ConfiguredIdentityUserPasswordRealmBridge">
         <attribute name="targetRealm">TargetRealm</attribute>
         <attribute name="configuredUser">testUser</attribute>
         <attribute name="configuredPassword">testPassword</attribute>

Modified: geronimo/trunk/modules/connector-builder/src/test-data/data/external-application-plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/test-data/data/external-application-plan.xml?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/test-data/data/external-application-plan.xml (original)
+++ geronimo/trunk/modules/connector-builder/src/test-data/data/external-application-plan.xml Sat Mar  5 18:48:02 2005
@@ -173,30 +173,30 @@
     </module>
     
     <!--normally this is in the j2ee-server-plan.xml.  It is included here so the gbeans can start in unit tests-->
-    <gbean namePart="ConnectionTracker" class="org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator">
+    <gbean name="ConnectionTracker" class="org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator">
     </gbean>
 
-    <gbean namePart="DefaultWorkManager" class="org.apache.geronimo.connector.work.GeronimoWorkManager">
+    <gbean name="DefaultWorkManager" class="org.apache.geronimo.connector.work.GeronimoWorkManager">
         <attribute name="syncMaximumPoolSize">10</attribute>
         <attribute name="startMaximumPoolSize">10</attribute>
         <attribute name="scheduledMaximumPoolSize">10</attribute>
-        <reference name="TransactionContextManager">*:name=TransactionContextManager,*</reference>
+        <reference name="TransactionContextManager"><gbean-name>*:name=TransactionContextManager,*</gbean-name></reference>
     </gbean>
 
-    <gbean namePart="TransactionManager" class="org.apache.geronimo.transaction.manager.TransactionManagerImpl">
+    <gbean name="TransactionManager" class="org.apache.geronimo.transaction.manager.TransactionManagerImpl">
         <attribute name="defaultTransactionTimeoutSeconds">10</attribute>
         <references name="ResourceManagers">
-            <pattern>*:j2eeType=JCAManagedConnectionFactory,*</pattern>
-            <pattern>*:j2eeType=MessageDrivenBean,*</pattern>
+            <pattern><gbean-name>*:j2eeType=JCAManagedConnectionFactory,*</gbean-name></pattern>
+            <pattern><gbean-name>*:j2eeType=MessageDrivenBean,*</gbean-name></pattern>
         </references>
     </gbean>
 
-    <gbean namePart="TransactionContextManager" class="org.apache.geronimo.transaction.context.TransactionContextManager">
-        <reference name="TransactionManager">*:name=TransactionManager,*</reference>
-        <reference name="XidImporter">*:name=TransactionManager,*</reference>
+    <gbean name="TransactionContextManager" class="org.apache.geronimo.transaction.context.TransactionContextManager">
+        <reference name="TransactionManager"><gbean-name>*:name=TransactionManager,*</gbean-name></reference>
+        <reference name="XidImporter"><gbean-name>*:name=TransactionManager,*</gbean-name></reference>
     </gbean>
 
-    <gbean namePart="TargetRealm" class="org.apache.geronimo.security.bridge.ConfiguredIdentityUserPasswordRealmBridge">
+    <gbean name="TargetRealm" class="org.apache.geronimo.security.bridge.ConfiguredIdentityUserPasswordRealmBridge">
         <attribute name="targetRealm">TargetRealm</attribute>
         <attribute name="configuredUser">testUser</attribute>
         <attribute name="configuredPassword">testPassword</attribute>

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ActivationSpecWrapper.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ActivationSpecWrapper.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ActivationSpecWrapper.java (original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ActivationSpecWrapper.java Sat Mar  5 18:48:02 2005
@@ -180,7 +180,7 @@
         infoBuilder.addAttribute("containerId", String.class, true);
         infoBuilder.addAttribute("classLoader", ClassLoader.class, false);
 
-        infoBuilder.addReference("ResourceAdapterWrapper", ResourceAdapterWrapper.class);
+        infoBuilder.addReference("ResourceAdapterWrapper", ResourceAdapterWrapper.class, NameFactory.RESOURCE_ADAPTER);
 
         infoBuilder.addOperation("activate", new Class[]{MessageEndpointFactory.class});
         infoBuilder.addOperation("deactivate", new Class[]{MessageEndpointFactory.class});

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterModuleImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterModuleImpl.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterModuleImpl.java (original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterModuleImpl.java Sat Mar  5 18:48:02 2005
@@ -142,8 +142,8 @@
 
     static {
         GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder(ResourceAdapterModuleImpl.class, NameFactory.RESOURCE_ADAPTER_MODULE);
-        infoBuilder.addReference("J2EEServer", J2EEServer.class);
-        infoBuilder.addReference("J2EEApplication", J2EEApplication.class);
+        infoBuilder.addReference("J2EEServer", J2EEServer.class, null);
+        infoBuilder.addReference("J2EEApplication", J2EEApplication.class, null);
 
         infoBuilder.addAttribute("deploymentDescriptor", String.class, true);
 

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterWrapper.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterWrapper.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterWrapper.java (original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/ResourceAdapterWrapper.java Sat Mar  5 18:48:02 2005
@@ -132,7 +132,7 @@
         infoBuilder.addAttribute("resourceAdapterClass", String.class, true);
         infoBuilder.addAttribute("classLoader", ClassLoader.class, false);
 
-        infoBuilder.addReference("WorkManager", GeronimoWorkManager.class);
+        infoBuilder.addReference("WorkManager", GeronimoWorkManager.class, NameFactory.JCA_WORK_MANAGER);
 
         infoBuilder.addOperation("registerResourceAdapterAssociation", new Class[]{ResourceAdapterAssociation.class});
 

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/GenericConnectionManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/GenericConnectionManager.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/GenericConnectionManager.java (original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/GenericConnectionManager.java Sat Mar  5 18:48:02 2005
@@ -25,6 +25,7 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.security.bridge.RealmBridge;
 import org.apache.geronimo.transaction.context.TransactionContextManager;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 /**
  * GenericConnectionManager sets up a connection manager stack according to the
@@ -127,9 +128,9 @@
 
         infoBuilder.addAttribute("objectName", String.class, false);
 
-        infoBuilder.addReference("ConnectionTracker", ConnectionTracker.class);
-        infoBuilder.addReference("RealmBridge", RealmBridge.class);
-        infoBuilder.addReference("TransactionContextManager", TransactionContextManager.class);
+        infoBuilder.addReference("ConnectionTracker", ConnectionTracker.class, NameFactory.JCA_RESOURCE);
+        infoBuilder.addReference("RealmBridge", RealmBridge.class, NameFactory.GERONIMO_SERVICE);
+        infoBuilder.addReference("TransactionContextManager", TransactionContextManager.class, NameFactory.JTA_RESOURCE);
 
         infoBuilder.setConstructor(new String[]{
             "transactionSupport",

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java (original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java Sat Mar  5 18:48:02 2005
@@ -309,9 +309,9 @@
 
         infoFactory.addInterface(ResourceManager.class);
 
-        infoFactory.addReference("ResourceAdapterWrapper", ResourceAdapterWrapper.class);
-        infoFactory.addReference("ConnectionManagerFactory", ConnectionManagerFactory.class);
-        infoFactory.addReference("ManagedConnectionFactoryListener", ManagedConnectionFactoryListener.class);
+        infoFactory.addReference("ResourceAdapterWrapper", ResourceAdapterWrapper.class, NameFactory.RESOURCE_ADAPTER);
+        infoFactory.addReference("ConnectionManagerFactory", ConnectionManagerFactory.class, NameFactory.JCA_CONNECTION_MANAGER);
+        infoFactory.addReference("ManagedConnectionFactoryListener", ManagedConnectionFactoryListener.class, NameFactory.SECURITY_REALM);
 
         infoFactory.setConstructor(new String[]{
             "managedConnectionFactoryClass",

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/connectiontracking/ConnectionTrackingCoordinator.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/connectiontracking/ConnectionTrackingCoordinator.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/connectiontracking/ConnectionTrackingCoordinator.java (original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/connectiontracking/ConnectionTrackingCoordinator.java Sat Mar  5 18:48:02 2005
@@ -32,6 +32,7 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.transaction.InstanceContext;
 import org.apache.geronimo.transaction.TrackedConnectionAssociator;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 /**
  * ConnectionTrackingCoordinator tracks connections that are in use by
@@ -145,7 +146,7 @@
     }
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(ConnectionTrackingCoordinator.class);
+        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(ConnectionTrackingCoordinator.class, NameFactory.JCA_RESOURCE);
         infoFactory.addInterface(TrackedConnectionAssociator.class);
         infoFactory.addInterface(ConnectionTracker.class);
         GBEAN_INFO = infoFactory.getBeanInfo();

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/transactionlog/JDBCLog.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/transactionlog/JDBCLog.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/transactionlog/JDBCLog.java (original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/outbound/transactionlog/JDBCLog.java Sat Mar  5 18:48:02 2005
@@ -39,6 +39,7 @@
 import org.apache.geronimo.transaction.manager.TransactionBranchInfoImpl;
 import org.apache.geronimo.transaction.manager.TransactionLog;
 import org.apache.geronimo.transaction.manager.XidFactory;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 /**
  * "Last Resource optimization" for single servers wishing to have valid xa transactions with
@@ -203,13 +204,13 @@
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(JDBCLog.class);
+        GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(JDBCLog.class, NameFactory.JCA_RESOURCE);
 
         infoFactory.addAttribute("systemId", String.class, true);
 
         infoFactory.addInterface(TransactionLog.class);
 
-        infoFactory.addReference("ManagedConnectionFactoryWrapper", ManagedConnectionFactoryWrapper.class);
+        infoFactory.addReference("ManagedConnectionFactoryWrapper", ManagedConnectionFactoryWrapper.class, NameFactory.JCA_MANAGED_CONNECTION_FACTORY);
 
         infoFactory.setConstructor(new String[]{"systemId", "DataSource"});
 

Modified: geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/work/GeronimoWorkManager.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/work/GeronimoWorkManager.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/work/GeronimoWorkManager.java (original)
+++ geronimo/trunk/modules/connector/src/java/org/apache/geronimo/connector/work/GeronimoWorkManager.java Sat Mar  5 18:48:02 2005
@@ -262,7 +262,7 @@
 
         infoFactory.addOperation("getXATerminator");
 
-        infoFactory.addReference("TransactionContextManager", TransactionContextManager.class);
+        infoFactory.addReference("TransactionContextManager", TransactionContextManager.class, NameFactory.JTA_RESOURCE);
 
         infoFactory.setConstructor(new String[]{
             "syncMaximumPoolSize",

Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java (original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java Sat Mar  5 18:48:02 2005
@@ -226,8 +226,8 @@
         infoFactory.addOperation("deploy", new Class[]{File.class, File.class});
         infoFactory.addOperation("deploy", new Class[]{File.class, File.class, File.class, boolean.class, String.class, String.class, String.class});
 
-        infoFactory.addReference("Builders", ConfigurationBuilder.class);
-        infoFactory.addReference("Store", ConfigurationStore.class);
+        infoFactory.addReference("Builders", ConfigurationBuilder.class, "ConfigBuilder");
+        infoFactory.addReference("Store", ConfigurationStore.class, "ConfigurationStore");
 
         infoFactory.setConstructor(new String[]{"Builders", "Store"});
 

Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/xml/ParserFactoryImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/xml/ParserFactoryImpl.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/xml/ParserFactoryImpl.java (original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/xml/ParserFactoryImpl.java Sat Mar  5 18:48:02 2005
@@ -93,7 +93,7 @@
 
         infoFactory.addOperation("getParser");
 
-        infoFactory.addReference("EntityResolver", EntityResolver.class);
+        infoFactory.addReference("EntityResolver", EntityResolver.class, "GBean");
 
         infoFactory.setConstructor(new String[]{"EntityResolver"});
 

Modified: geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/DerbyNetworkGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/DerbyNetworkGBean.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/DerbyNetworkGBean.java (original)
+++ geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/DerbyNetworkGBean.java Sat Mar  5 18:48:02 2005
@@ -88,7 +88,7 @@
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(DerbyNetworkGBean.class);
         infoFactory.addAttribute("host", String.class, true);
         infoFactory.addAttribute("port", Integer.TYPE, true);
-        infoFactory.addReference("derbySystem", DerbySystem.class);
+        infoFactory.addReference("derbySystem", DerbySystem.class, "GBean");
         infoFactory.setConstructor(new String[]{"derbySystem"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/DerbySystemGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/DerbySystemGBean.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/DerbySystemGBean.java (original)
+++ geronimo/trunk/modules/derby/src/java/org/apache/geronimo/derby/DerbySystemGBean.java Sat Mar  5 18:48:02 2005
@@ -90,8 +90,8 @@
     static {
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(DerbySystemGBean.class);
         infoFactory.addAttribute("derbySystemHome", String.class, true);
-        infoFactory.addReference("serverInfo", ServerInfo.class);
-        infoFactory.setConstructor(new String[]{"serverInfo", "derbySystemHome"});
+        infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
+        infoFactory.setConstructor(new String[]{"ServerInfo", "derbySystemHome"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 }

Modified: geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java (original)
+++ geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java Sat Mar  5 18:48:02 2005
@@ -529,14 +529,14 @@
         infoFactory.addAttribute("transactionalTimerObjectName", ObjectName.class, true);
         infoFactory.addAttribute("nonTransactionalTimerObjectName", ObjectName.class, true);
 
-        infoFactory.addReference("Repository", Repository.class);
-        infoFactory.addReference("EJBConfigBuilder", ModuleBuilder.class);
-        infoFactory.addReference("EJBReferenceBuilder", EJBReferenceBuilder.class);
-        infoFactory.addReference("WebConfigBuilder", ModuleBuilder.class);
-        infoFactory.addReference("ConnectorConfigBuilder", ModuleBuilder.class);
-        infoFactory.addReference("ResourceReferenceBuilder", ResourceReferenceBuilder.class);
-        infoFactory.addReference("AppClientConfigBuilder", ModuleBuilder.class);
-        infoFactory.addReference("ServiceReferenceBuilder", ServiceReferenceBuilder.class);
+        infoFactory.addReference("Repository", Repository.class, NameFactory.GERONIMO_SERVICE);
+        infoFactory.addReference("EJBConfigBuilder", ModuleBuilder.class, NameFactory.MODULE_BUILDER);
+        infoFactory.addReference("EJBReferenceBuilder", EJBReferenceBuilder.class, NameFactory.MODULE_BUILDER);
+        infoFactory.addReference("WebConfigBuilder", ModuleBuilder.class, NameFactory.MODULE_BUILDER);
+        infoFactory.addReference("ConnectorConfigBuilder", ModuleBuilder.class, NameFactory.MODULE_BUILDER);
+        infoFactory.addReference("ResourceReferenceBuilder", ResourceReferenceBuilder.class, NameFactory.MODULE_BUILDER);
+        infoFactory.addReference("AppClientConfigBuilder", ModuleBuilder.class, NameFactory.MODULE_BUILDER);
+        infoFactory.addReference("ServiceReferenceBuilder", ServiceReferenceBuilder.class, NameFactory.MODULE_BUILDER);
 
         infoFactory.addAttribute("kernel", Kernel.class, false);
 

Modified: geronimo/trunk/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml (original)
+++ geronimo/trunk/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml Sat Mar  5 18:48:02 2005
@@ -21,6 +21,6 @@
     parentId="org/apache/geronimo/Server">
 
     <!-- a random gbean just to verify that the deployer doesn't die because of it -->
-    <gbean name="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
+    <gbean gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
 
 </application>

Modified: geronimo/trunk/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml (original)
+++ geronimo/trunk/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml Sat Mar  5 18:48:02 2005
@@ -21,6 +21,6 @@
     parentId="org/apache/geronimo/Server">
 
     <!-- a random gbean just to verify that the deployer doesn't die because of it -->
-    <gbean name="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
+    <gbean gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
 
 </application>

Modified: geronimo/trunk/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml (original)
+++ geronimo/trunk/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml Sat Mar  5 18:48:02 2005
@@ -34,6 +34,6 @@
     </module>
 
     <!-- a random gbean just to verify that the deployer doesn't die because of it -->
-    <gbean name="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
+    <gbean gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
 
 </application>

Modified: geronimo/trunk/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml (original)
+++ geronimo/trunk/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml Sat Mar  5 18:48:02 2005
@@ -21,6 +21,6 @@
     parentId="org/apache/geronimo/Server">
 
     <!-- a random gbean just to verify that the deployer doesn't die because of it -->
-    <gbean name="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
+    <gbean gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
 
 </application>

Modified: geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java (original)
+++ geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java Sat Mar  5 18:48:02 2005
@@ -80,7 +80,7 @@
     public static final String GERONIMO_SERVICE = "GBean"; //copied in GBeanInfoBuilder to avoid dependencies in the wrong direction.
 
     public static String JAXR_CONNECTION_FACTORY = "JAXRConnectionFactory";
-    
+
     public static final String CONFIG_BUILDER = "ConfigBuilder";
     public static final String MODULE_BUILDER = "ModuleBuilder";
     public static final String SECURITY_REALM = "SecurityRealm";
@@ -147,41 +147,77 @@
         return getEjbComponentName(j2eeDomainName, j2eeServerName, j2eeApplicationName, j2eeModuleName, j2eeName, j2eeType, context).getCanonicalName();
     }
 
+
+    public static ObjectName getComponentNameQuery(String domainName, String serverName, String applicationName, String moduleType, String moduleName, String name, String type, J2eeContext context) throws MalformedObjectNameException {
+        StringBuffer buffer = new StringBuffer();
+        if ("*".equals(domainName)) {
+            buffer.append("*");
+        } else {
+            buffer.append(context.getJ2eeDomainName(domainName));
+        }
+        boolean query = false;
+        String sep = ":";
+        //implicit attributes, if they are missing it means "use value from j2eecontext": if they are * it means skip and make a query
+        if ("*".equals(serverName)) {
+            query = true;
+        } else {
+            buffer.append(sep).append(J2EE_SERVER + "=").append(context.getJ2eeServerName(serverName));
+            sep = ",";
+        }
+        if ("*".equals(applicationName)) {
+            query = true;
+        } else {
+            buffer.append(sep).append(J2EE_APPLICATION + "=").append(context.getJ2eeApplicationName(applicationName));
+            sep = ",";
+        }
+        if ("*".equals(moduleName)) {
+            query = true;
+        } else {
+            buffer.append(sep).append(context.getJ2eeModuleType(moduleType)).append("=").append(context.getJ2eeModuleName(moduleName));
+            sep = ",";
+        }
+        if ("*".equals(type)) {
+            query = true;
+        } else {
+            buffer.append(sep).append(J2EE_TYPE + "=").append(context.getJ2eeType(type));
+            sep = ",";
+        }
+        //explicit attributes, must be included: if * then make a query
+        if ("*".equals(name)) {
+            query = true;
+        } else {
+            buffer.append(sep).append(J2EE_NAME + "=").append(context.getJ2eeName(name));
+            sep = ",";
+        }
+        //make a query, possibly
+        if (query) {
+            buffer.append(sep).append("*");
+        }
+        return ObjectName.getInstance(buffer.toString());
+    }
+
+    public static ObjectName getComponentNameQuery(String domainName, String serverName, String applicationName, String name, String type, J2eeContext context) throws MalformedObjectNameException {
+        return getComponentNameQuery(domainName, serverName, applicationName, null, "*", name, type, context);
+    }
+
+    public static ObjectName getComponentInModuleQuery(String domainName, String serverName, String applicationName, String moduleType, String moduleName, String type, J2eeContext context) throws MalformedObjectNameException {
+        return getComponentNameQuery(domainName, serverName, applicationName, moduleType, moduleName, "*", type, context);
+    }
+
     /**
      * Creates a query for components that are in no application with given name.
      *
-     * @param j2eeDomainName
-     * @param j2eeServerName
-     * @param j2eeName
-     * @param j2eeType
+     * @param domainName
+     * @param serverName
+     * @param name
+     * @param type
      * @param context
      * @return
      * @throws MalformedObjectNameException
      */
 
-    public static ObjectName getComponentRestrictedQueryName(String j2eeDomainName, String j2eeServerName, String j2eeName, String j2eeType, J2eeContext context) throws MalformedObjectNameException {
-        String applicationName = NULL;
-        return getComponentNameQuery(j2eeDomainName, j2eeServerName, applicationName, j2eeName, j2eeType, context);
-    }
-
-    public static ObjectName getComponentNameQuery(String j2eeDomainName, String j2eeServerName, String applicationName, String j2eeName, String j2eeType, J2eeContext context) throws MalformedObjectNameException {
-        StringBuffer buffer = new StringBuffer(context.getJ2eeDomainName(j2eeDomainName))
-                .append(":" + J2EE_TYPE + "=").append(context.getJ2eeType(j2eeType))
-                .append("," + J2EE_SERVER + "=").append(context.getJ2eeServerName(j2eeServerName))
-                .append("," + J2EE_APPLICATION + "=").append(context.getJ2eeApplicationName(applicationName))
-                .append("," + J2EE_NAME + "=").append(context.getJ2eeName(j2eeName))
-                .append(",*");
-        return ObjectName.getInstance(buffer.toString());
-    }
-
-    public static ObjectName getComponentInModuleQuery(String j2eeDomainName, String j2eeServerName, String applicationName, String j2eeModuleType, String j2eeModuleName, String j2eeType, J2eeContext context) throws MalformedObjectNameException {
-        StringBuffer buffer = new StringBuffer(context.getJ2eeDomainName(j2eeDomainName))
-                .append(":" + J2EE_TYPE + "=").append(context.getJ2eeType(j2eeType))
-                .append("," + J2EE_SERVER + "=").append(context.getJ2eeServerName(j2eeServerName))
-                .append("," + J2EE_APPLICATION + "=").append(context.getJ2eeApplicationName(applicationName))
-                .append(",").append(context.getJ2eeModuleType(j2eeModuleType)).append("=").append(context.getJ2eeModuleName(j2eeModuleName))
-                .append(",*");
-        return ObjectName.getInstance(buffer.toString());
+    public static ObjectName getComponentRestrictedQueryName(String domainName, String serverName, String name, String type, J2eeContext context) throws MalformedObjectNameException {
+        return getComponentNameQuery(domainName, serverName, NULL, null, "*", name, type, context);
     }
 
     public static ObjectName getWebComponentName(String j2eeDomainName, String j2eeServerName, String j2eeApplicationName, String j2eeModuleName, String j2eeName, String j2eeType, J2eeContext context) throws MalformedObjectNameException {

Modified: geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java (original)
+++ geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java Sat Mar  5 18:48:02 2005
@@ -109,7 +109,7 @@
         infoFactory.addAttribute("serverVendor", String.class, false);
         infoFactory.addAttribute("serverVersion", String.class, false);
 
-        infoFactory.addReference("ServerInfo", ServerInfo.class);
+        infoFactory.addReference("ServerInfo", ServerInfo.class, NameFactory.GERONIMO_SERVICE);
 
         infoFactory.setConstructor(new String[]{"kernel", "objectName", "ServerInfo"});
 

Modified: geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java (original)
+++ geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java Sat Mar  5 18:48:02 2005
@@ -1113,8 +1113,8 @@
         infoBuilder.addAttribute("defaultFilters", ObjectName.class, true);
         infoBuilder.addAttribute("defaultFilterMappings", ObjectName.class, true);
         infoBuilder.addAttribute("pojoWebServiceTemplate", ObjectName.class, true);
-        infoBuilder.addReference("WebServiceBuilder", WebServiceBuilder.class);
-        infoBuilder.addReference("Repository", Repository.class);
+        infoBuilder.addReference("WebServiceBuilder", WebServiceBuilder.class, NameFactory.MODULE_BUILDER);
+        infoBuilder.addReference("Repository", Repository.class, NameFactory.GERONIMO_SERVICE);
         infoBuilder.addAttribute("kernel", Kernel.class, false);
         infoBuilder.addInterface(ModuleBuilder.class);
 

Modified: geronimo/trunk/modules/jetty-builder/src/test-resources/services/local.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/test-resources/services/local.xml?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/test-resources/services/local.xml (original)
+++ geronimo/trunk/modules/jetty-builder/src/test-resources/services/local.xml Sat Mar  5 18:48:02 2005
@@ -5,7 +5,7 @@
     <gbean class="org.apache.geronimo.jetty.connector.HTTPConnector" objectName="geronimo.web:type=WebConnector,container=Jetty,port=8080">
         <default attribute="Port">5678</default>
         <endpoint name="JettyContainer">
-            <pattern>geronimo.web:type=WebContainer,container=Jetty</pattern>
+            <pattern><gbean-name>geronimo.web:type=WebContainer,container=Jetty</gbean-name></pattern>
         </endpoint>
     </gbean>
 </gbeans>

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyAxisPOJOWebService.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyAxisPOJOWebService.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyAxisPOJOWebService.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyAxisPOJOWebService.java Sat Mar  5 18:48:02 2005
@@ -132,7 +132,7 @@
         infoBuilder.addAttribute("loadOnStartup", Integer.class, true);
         infoBuilder.addAttribute("servletMappings", Set.class, true);
         infoBuilder.addAttribute("webRoleRefPermissions", Map.class, true);
-        infoBuilder.addReference("JettyServletRegistration", JettyServletRegistration.class);
+        infoBuilder.addReference("JettyServletRegistration", JettyServletRegistration.class, NameFactory.WEB_MODULE);
 
         infoBuilder.setConstructor(new String[] {"servletName",
                                                  "initParams",

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterHolder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterHolder.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterHolder.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterHolder.java Sat Mar  5 18:48:02 2005
@@ -54,7 +54,7 @@
         infoBuilder.addAttribute("filterClass", String.class, true);
         infoBuilder.addAttribute("initParams", Map.class, true);
 
-        infoBuilder.addReference("JettyServletRegistration", JettyServletRegistration.class);
+        infoBuilder.addReference("JettyServletRegistration", JettyServletRegistration.class, NameFactory.WEB_MODULE);
 
         infoBuilder.setConstructor(new String[] {"filterName", "filterClass", "initParams", "JettyServletRegistration"});
 

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterMapping.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterMapping.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterMapping.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyFilterMapping.java Sat Mar  5 18:48:02 2005
@@ -145,10 +145,10 @@
         infoBuilder.addAttribute("includeDispatch", boolean.class, true);
         infoBuilder.addAttribute("errorDispatch", boolean.class, true);
 
-        infoBuilder.addReference("Filter", JettyFilterHolder.class);
-        infoBuilder.addReference("Servlet", JettyServletHolder.class);
-        infoBuilder.addReference("Previous", JettyFilterMapping.class);
-        infoBuilder.addReference("JettyServletRegistration", JettyServletRegistration.class);
+        infoBuilder.addReference("Filter", JettyFilterHolder.class, NameFactory.WEB_FILTER);
+        infoBuilder.addReference("Servlet", JettyServletHolder.class, NameFactory.SERVLET);
+        infoBuilder.addReference("Previous", JettyFilterMapping.class, NameFactory.WEB_FILTER_MAPPING);
+        infoBuilder.addReference("JettyServletRegistration", JettyServletRegistration.class, NameFactory.WEB_MODULE);
 
         infoBuilder.setConstructor(new String[]{"urlPattern",
                                                 "requestDispatch",

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java Sat Mar  5 18:48:02 2005
@@ -117,7 +117,7 @@
         infoBuilder.addAttribute("loadOnStartup", Integer.class, true);
         infoBuilder.addAttribute("servletMappings", Set.class, true);
         infoBuilder.addAttribute("webRoleRefPermissions", Map.class, true);
-        infoBuilder.addReference("JettyServletRegistration", JettyServletRegistration.class);
+        infoBuilder.addReference("JettyServletRegistration", JettyServletRegistration.class, NameFactory.WEB_MODULE);
 
         infoBuilder.setConstructor(new String[] {"servletName",
                                                  "servletClass",

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java Sat Mar  5 18:48:02 2005
@@ -473,7 +473,7 @@
     public static final GBeanInfo GBEAN_INFO;
                                                               
     static {
-        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder("Jetty WebApplication Context", JettyWebAppContext.class);
+        GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder("Jetty WebApplication Context", JettyWebAppContext.class, NameFactory.WEB_MODULE);
         infoBuilder.addAttribute("deploymentDescriptor", String.class, true);
         //from jetty's webapp context
 
@@ -504,9 +504,9 @@
 
         infoBuilder.addAttribute("contextPath", String.class, true);
 
-        infoBuilder.addReference("TransactionContextManager", TransactionContextManager.class);
-        infoBuilder.addReference("TrackedConnectionAssociator", TrackedConnectionAssociator.class);
-        infoBuilder.addReference("JettyContainer", JettyContainer.class);
+        infoBuilder.addReference("TransactionContextManager", TransactionContextManager.class, NameFactory.JTA_RESOURCE);
+        infoBuilder.addReference("TrackedConnectionAssociator", TrackedConnectionAssociator.class, NameFactory.JCA_RESOURCE);
+        infoBuilder.addReference("JettyContainer", JettyContainer.class, NameFactory.GERONIMO_SERVICE);
 
         infoBuilder.addInterface(JettyServletRegistration.class);
 

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/HTTPSConnector.java Sat Mar  5 18:48:02 2005
@@ -21,6 +21,7 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.jetty.JettyContainer;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.mortbay.http.SunJsseListener;
 
 /**
@@ -110,7 +111,7 @@
         infoFactory.addAttribute("password", String.class, true);
         infoFactory.addAttribute("useDefaultTrustStore", boolean.class, true);
         infoFactory.addAttribute("needClientAuth", boolean.class, true);
-        infoFactory.addReference("ServerInfo", ServerInfo.class);
+        infoFactory.addReference("ServerInfo", ServerInfo.class, NameFactory.GERONIMO_SERVICE);
         infoFactory.setConstructor(new String[]{"JettyContainer", "ServerInfo"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/connector/JettyConnector.java Sat Mar  5 18:48:02 2005
@@ -21,6 +21,7 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.jetty.JettyContainer;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.mortbay.http.HttpListener;
 import org.mortbay.util.ThreadedServer;
 
@@ -84,7 +85,7 @@
     static {
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("Jetty HTTP Connector", JettyConnector.class);
         infoFactory.addAttribute("port", int.class, true);
-        infoFactory.addReference("JettyContainer", JettyContainer.class);
+        infoFactory.addReference("JettyContainer", JettyContainer.class, NameFactory.GERONIMO_SERVICE);
         infoFactory.setConstructor(new String[] {"JettyContainer"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/requestlog/NCSARequestLog.java Sat Mar  5 18:48:02 2005
@@ -21,6 +21,7 @@
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.jetty.JettyContainer;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 /**
  * @version $Rev$ $Date$
@@ -131,8 +132,8 @@
 
     static {
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("NCSA Request Log", NCSARequestLog.class);
-        infoFactory.addReference("JettyContainer", JettyContainer.class);
-        infoFactory.addReference("ServerInfo", ServerInfo.class);
+        infoFactory.addReference("JettyContainer", JettyContainer.class, NameFactory.GERONIMO_SERVICE);
+        infoFactory.addReference("ServerInfo", ServerInfo.class, NameFactory.GERONIMO_SERVICE);
 
         infoFactory.addAttribute("filename", String.class, true);
         infoFactory.addAttribute("logDateFormat", String.class, true);

Modified: geronimo/trunk/modules/jetty/src/test-resources/services/local.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/test-resources/services/local.xml?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/jetty/src/test-resources/services/local.xml (original)
+++ geronimo/trunk/modules/jetty/src/test-resources/services/local.xml Sat Mar  5 18:48:02 2005
@@ -5,7 +5,7 @@
     <gbean class="org.apache.geronimo.jetty.connector.HTTPConnector" objectName="geronimo.web:type=WebConnector,container=Jetty,port=8080">
         <default attribute="Port">5678</default>
         <endpoint name="JettyContainer">
-            <pattern>geronimo.web:type=WebContainer,container=Jetty</pattern>
+            <pattern><gbean-name>geronimo.web:type=WebContainer,container=Jetty</gbean-name></pattern>
         </endpoint>
     </gbean>
 </gbeans>

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanInfoBuilder.java Sat Mar  5 18:48:02 2005
@@ -103,7 +103,7 @@
 
             for (Iterator iterator = source.getReferences().iterator(); iterator.hasNext();) {
                 GReferenceInfo referenceInfo = (GReferenceInfo) iterator.next();
-                references.put(referenceInfo.getName(), referenceInfo.getReferenceType());
+                references.put(referenceInfo.getName(), new RefInfo(referenceInfo.getReferenceType(), referenceInfo.getNameTypeName()));
             }
 
             //in case subclass constructor has same parameters as superclass.
@@ -215,16 +215,21 @@
     }
 
     public void addReference(GReferenceInfo info) {
-        references.put(info.getName(), info.getReferenceType());
+        references.put(info.getName(), new RefInfo(info.getReferenceType(), info.getNameTypeName()));
     }
 
     /**
      * Add a reference to another GBean or collection of GBeans
      * @param name the name of the reference
      * @param type The proxy type of the GBean or objects in a ReferenceCollection
+     * @param namingType the string expected as the type component of the name.  For jsr-77 names this is the j2eeType value
      */
+    public void addReference(String name, Class type, String namingType) {
+        references.put(name, new RefInfo(type.getName(), namingType));
+    }
+
     public void addReference(String name, Class type) {
-        references.put(name, type.getName());
+        references.put(name, new RefInfo(type.getName(), null));
     }
 
     public GBeanInfo getBeanInfo() {
@@ -237,7 +242,9 @@
         for (Iterator iterator = references.entrySet().iterator(); iterator.hasNext();) {
             Map.Entry entry = (Map.Entry) iterator.next();
             String referenceName = (String) entry.getKey();
-            String referenceType = (String) entry.getValue();
+            RefInfo refInfo = (RefInfo) entry.getValue();
+            String referenceType = refInfo.getJavaType();
+            String namingType = refInfo.getNamingType();
 
             String proxyType = (String) constructorTypes.get(referenceName);
             String setterName = null;
@@ -258,7 +265,7 @@
                 throw new InvalidConfigurationException("Reference proxy type must be Collection or " + referenceType + ": name=" + referenceName);
             }
 
-            referenceInfos.add(new GReferenceInfo(referenceName, referenceType, proxyType, setterName));
+            referenceInfos.add(new GReferenceInfo(referenceName, referenceType, proxyType, setterName, namingType));
         }
 
 
@@ -276,7 +283,7 @@
                 argumentTypes[i] = attribute.getType();
                 isReference[i] = false;
             } else if (references.containsKey(argumentName)) {
-                argumentTypes[i] = (String) references.get(argumentName);
+                argumentTypes[i] = ((RefInfo) references.get(argumentName)).getJavaType();
                 isReference[i] = true;
             }
         }
@@ -447,6 +454,24 @@
             return classLoader.loadClass(name);
         } catch (ClassNotFoundException e) {
             throw new InvalidConfigurationException("Could not load class " + name, e);
+        }
+    }
+
+    private static class RefInfo {
+        private final String javaType;
+        private final String namingType;
+
+        public RefInfo(String javaType, String namingType) {
+            this.javaType = javaType;
+            this.namingType = namingType;
+        }
+
+        public String getJavaType() {
+            return javaType;
+        }
+
+        public String getNamingType() {
+            return namingType;
         }
     }
 }

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GReferenceInfo.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GReferenceInfo.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GReferenceInfo.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GReferenceInfo.java Sat Mar  5 18:48:02 2005
@@ -44,11 +44,17 @@
      */
     private final String setterName;
 
-    public GReferenceInfo(String name, String referenceType, String proxyType, String setterName) {
+    /**
+     * String for type component when constructing reference patterns. For jsr-77 this maps to j2eeType=nameTypeName
+     */
+    private final String nameTypeName;
+
+    public GReferenceInfo(String name, String referenceType, String proxyType, String setterName, String nameTypeName) {
         this.name = name;
         this.referenceType = referenceType;
         this.setterName = setterName;
         this.proxyType = proxyType;
+        this.nameTypeName = nameTypeName;
     }
 
     public String getName() {
@@ -67,11 +73,16 @@
         return setterName;
     }
 
+    public String getNameTypeName() {
+        return nameTypeName;
+    }
+
     public String toString() {
         return "[GReferenceInfo: name=" + name +
                 " referenceType=" + referenceType +
                 " proxyType=" + proxyType +
                 " setterName=" + setterName +
+                " naming system type name= " + nameTypeName +
                 "]";
     }
 }

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java Sat Mar  5 18:48:02 2005
@@ -450,7 +450,7 @@
         infoFactory.addAttribute("configurationClassLoader", ClassLoader.class, false);
 
         infoFactory.addReference("Parent", ConfigurationParent.class);
-        infoFactory.addReference("Repositories", Repository.class);
+        infoFactory.addReference("Repositories", Repository.class, "GBean");
         infoFactory.addReference("ConfigurationStore", ConfigurationStore.class);
 
         infoFactory.setConstructor(new String[]{

Modified: geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanInfoFactoryTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanInfoFactoryTest.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanInfoFactoryTest.java (original)
+++ geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanInfoFactoryTest.java Sat Mar  5 18:48:02 2005
@@ -132,7 +132,7 @@
             infoFactory.setConstructor(new String[]{"foo", "bar"});
             infoFactory.addAttribute("foo", String.class, false);
             infoFactory.addAttribute("bar", String.class, false);
-            infoFactory.addReference("reference", String.class);
+            infoFactory.addReference("reference", String.class, null);
             GBEAN_INFO = infoFactory.getBeanInfo();
         }
 

Modified: geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanInfoTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanInfoTest.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanInfoTest.java (original)
+++ geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/gbean/GBeanInfoTest.java Sat Mar  5 18:48:02 2005
@@ -108,7 +108,7 @@
 
     final static GOperationInfo opInfo = new GOperationInfo("operation");
 
-    final static GReferenceInfo refInfo = new GReferenceInfo("reference", String.class.getName(), String.class.getName(), "setReference");
+    final static GReferenceInfo refInfo = new GReferenceInfo("reference", String.class.getName(), String.class.getName(), "setReference", "Fooifier");
 
     public void setUp() {
         gbeanInfo = MockGBean.getGBeanInfo();

Modified: geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/MockGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/MockGBean.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/MockGBean.java (original)
+++ geronimo/trunk/modules/kernel/src/test/org/apache/geronimo/kernel/MockGBean.java Sat Mar  5 18:48:02 2005
@@ -81,8 +81,8 @@
 
         infoFactory.addInterface(MockEndpoint.class, new String[]{"mutableInt"});
 
-        infoFactory.addReference("MockEndpoint", MockEndpoint.class);
-        infoFactory.addReference("EndpointCollection", MockEndpoint.class);
+        infoFactory.addReference("MockEndpoint", MockEndpoint.class, null);
+        infoFactory.addReference("EndpointCollection", MockEndpoint.class, null);
 
         infoFactory.setConstructor(new String[]{"name", "finalInt", "objectName", "classLoader", "gbeanLifecycleController", "kernel"});
 

Modified: geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/MailGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/MailGBean.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/MailGBean.java (original)
+++ geronimo/trunk/modules/mail/src/java/org/apache/geronimo/mail/MailGBean.java Sat Mar  5 18:48:02 2005
@@ -351,10 +351,10 @@
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(MailGBean.class, NameFactory.JAVA_MAIL_RESOURCE);
 
         infoFactory.addAttribute("objectName", String.class, false);
-        infoFactory.addReference("Protocols", ProtocolGBean.class);
+        infoFactory.addReference("Protocols", ProtocolGBean.class, NameFactory.GERONIMO_SERVICE);
         infoFactory.addAttribute("useDefault", Boolean.class, true);
         infoFactory.addAttribute("properties", Properties.class, true);
-        infoFactory.addReference("Authenticator", Authenticator.class);
+        infoFactory.addReference("Authenticator", Authenticator.class, NameFactory.GERONIMO_SERVICE);
         infoFactory.addAttribute("storeProtocol", String.class, true);
         infoFactory.addAttribute("transportProtocol", String.class, true);
         infoFactory.addAttribute("host", String.class, true);

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/SecurityServiceImpl.java Sat Mar  5 18:48:02 2005
@@ -26,6 +26,7 @@
 import org.apache.geronimo.security.jacc.PolicyContextHandlerSOAPMessage;
 import org.apache.geronimo.security.util.ConfigurationUtil;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 import javax.security.jacc.PolicyConfigurationFactory;
 import javax.security.jacc.PolicyContextException;
@@ -116,7 +117,7 @@
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(SecurityServiceImpl.class);
 
         infoFactory.addAttribute("classLoader", ClassLoader.class, false);
-        infoFactory.addReference("ServerInfo", ServerInfo.class);
+        infoFactory.addReference("ServerInfo", ServerInfo.class, NameFactory.GERONIMO_SERVICE);
         infoFactory.addAttribute("policyConfigurationFactory", String.class, true);
         infoFactory.addAttribute("policyProvider", String.class, true);
         infoFactory.addAttribute("keyStore", String.class, true);

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/DirectConfigurationEntry.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/DirectConfigurationEntry.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/DirectConfigurationEntry.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/DirectConfigurationEntry.java Sat Mar  5 18:48:02 2005
@@ -62,7 +62,7 @@
         infoFactory.addAttribute("applicationConfigName", String.class, true);
         infoFactory.addAttribute("controlFlag", LoginModuleControlFlag.class, true);
 
-        infoFactory.addReference("Module", LoginModuleGBean.class);
+        infoFactory.addReference("Module", LoginModuleGBean.class, null);
 
         infoFactory.setConstructor(new String[]{"applicationConfigName", "controlFlag", "Module"});
         GBEAN_INFO = infoFactory.getBeanInfo();

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/GeronimoLoginConfiguration.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/GeronimoLoginConfiguration.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/GeronimoLoginConfiguration.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/GeronimoLoginConfiguration.java Sat Mar  5 18:48:02 2005
@@ -151,7 +151,7 @@
 
     static {
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(GeronimoLoginConfiguration.class); //just a gbean
-        infoFactory.addReference("Configurations", ConfigurationEntryFactory.class);
+        infoFactory.addReference("Configurations", ConfigurationEntryFactory.class, null);
 
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginService.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginService.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginService.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/jaas/JaasLoginService.java Sat Mar  5 18:48:02 2005
@@ -51,6 +51,7 @@
 import org.apache.geronimo.security.IdentificationPrincipal;
 import org.apache.geronimo.security.SubjectId;
 import org.apache.geronimo.security.realm.SecurityRealm;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 /**
  * The single point of contact for Geronimo JAAS realms.  Instead of attempting
@@ -443,7 +444,7 @@
         infoFactory.addOperation("loginFailed", new Class[]{JaasClientId.class});
         infoFactory.addOperation("logout", new Class[]{JaasClientId.class});
 
-        infoFactory.addReference("Realms", SecurityRealm.class);
+        infoFactory.addReference("Realms", SecurityRealm.class, NameFactory.SECURITY_REALM);
 
         infoFactory.setConstructor(new String[] {"algorithm", "password", "classLoader"});
 

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/realm/GenericSecurityRealm.java Sat Mar  5 18:48:02 2005
@@ -232,7 +232,7 @@
         infoFactory.addAttribute("deploymentSupport", Properties.class, true);
         infoFactory.addAttribute("restrictPrincipalsToServer", boolean.class, true);
 
-        infoFactory.addReference("ServerInfo", ServerInfo.class);
+        infoFactory.addReference("ServerInfo", ServerInfo.class, NameFactory.GERONIMO_SERVICE);
 
         infoFactory.addOperation("getAppConfigurationEntries", new Class[0]);
 

Modified: geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java (original)
+++ geronimo/trunk/modules/security/src/java/org/apache/geronimo/security/remoting/jmx/JaasLoginServiceRemotingServer.java Sat Mar  5 18:48:02 2005
@@ -147,8 +147,8 @@
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder(JaasLoginServiceRemotingServer.class); //has fixed name, j2eeType is irrelevant
         infoFactory.addAttribute("bindURI", URI.class, true);
         infoFactory.addAttribute("clientConnectURI", URI.class, false);        
-        infoFactory.addReference("loginService", JaasLoginServiceMBean.class);
-        infoFactory.setConstructor(new String[]{"bindURI", "loginService"});
+        infoFactory.addReference("LoginService", JaasLoginServiceMBean.class, "GBean");
+        infoFactory.setConstructor(new String[]{"bindURI", "LoginService"});
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 

Modified: geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/AbstractTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/AbstractTest.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/AbstractTest.java (original)
+++ geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/AbstractTest.java Sat Mar  5 18:48:02 2005
@@ -83,7 +83,7 @@
         serverStub = new ObjectName("geronimo.remoting:target=JaasLoginServiceRemotingServer");
         gbean = new GBeanData(serverStub, JaasLoginServiceRemotingServer.getGBeanInfo());
         gbean.setAttribute("bindURI", new URI("tcp://0.0.0.0:4242"));
-        gbean.setReferencePattern("loginService", loginService);
+        gbean.setReferencePattern("LoginService", loginService);
         kernel.loadGBean(gbean, JaasLoginServiceRemotingServer.class.getClassLoader());
 
         kernel.startGBean(loginService);

Modified: geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java (original)
+++ geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/ConfigurationEntryTest.java Sat Mar  5 18:48:02 2005
@@ -200,7 +200,7 @@
         serverStub = new ObjectName("geronimo.remoting:target=JaasLoginServiceRemotingServer");
         gbean = new GBeanData(serverStub, JaasLoginServiceRemotingServer.getGBeanInfo());
         gbean.setAttribute("bindURI", new URI("tcp://0.0.0.0:4242"));
-        gbean.setReferencePattern("loginService", loginService);
+        gbean.setReferencePattern("LoginService", loginService);
         kernel.loadGBean(gbean, JaasLoginServiceRemotingServer.class.getClassLoader());               
 
         kernel.startGBean(loginConfiguration);

Modified: geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/TimeoutTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/TimeoutTest.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/TimeoutTest.java (original)
+++ geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/jaas/TimeoutTest.java Sat Mar  5 18:48:02 2005
@@ -71,7 +71,7 @@
         serverStub = new ObjectName("geronimo.remoting:target=JaasLoginServiceRemotingServer");
         gbean = new GBeanData(serverStub, JaasLoginServiceRemotingServer.getGBeanInfo());
         gbean.setAttribute("bindURI", new URI("tcp://0.0.0.0:4242"));
-        gbean.setReferencePattern("loginService", loginService);
+        gbean.setReferencePattern("LoginService", loginService);
         kernel.loadGBean(gbean, JaasLoginServiceRemotingServer.class.getClassLoader());
 
         kernel.startGBean(loginService);

Modified: geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/remoting/jmx/RemoteLoginTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/remoting/jmx/RemoteLoginTest.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/remoting/jmx/RemoteLoginTest.java (original)
+++ geronimo/trunk/modules/security/src/test/org/apache/geronimo/security/remoting/jmx/RemoteLoginTest.java Sat Mar  5 18:48:02 2005
@@ -128,7 +128,7 @@
         serverStub = new ObjectName("geronimo.remoting:target=JaasLoginServiceRemotingServer");
         gbean = new GBeanData(serverStub, JaasLoginServiceRemotingServer.getGBeanInfo());
         gbean.setAttribute("bindURI", new URI("tcp://0.0.0.0:4242"));
-        gbean.setReferencePattern("loginService", loginService);
+        gbean.setReferencePattern("LoginService", loginService);
         kernel.loadGBean(gbean, JaasLoginServiceRemotingServer.class.getClassLoader());
 
         kernel.startGBean(loginService);

Modified: geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanBuilder.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanBuilder.java (original)
+++ geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanBuilder.java Sat Mar  5 18:48:02 2005
@@ -21,6 +21,7 @@
 import java.util.HashSet;
 import java.util.Set;
 import java.util.Map;
+import java.util.Iterator;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 
@@ -29,6 +30,11 @@
 import org.apache.geronimo.gbean.GAttributeInfo;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GReferenceInfo;
+import org.apache.geronimo.deployment.xbeans.ReferenceType;
+import org.apache.geronimo.deployment.xbeans.PatternType;
+import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.xmlbeans.XmlObject;
 import org.apache.xmlbeans.XmlCursor;
 
@@ -95,20 +101,52 @@
         gbean.setAttribute(name, value);
     }
 
-    public void setReference(String name, String pattern) throws DeploymentException {
-        setReference( name, new String[] { pattern } );
+    public void setReference(String name, ReferenceType pattern, J2eeContext j2eeContext) throws DeploymentException {
+        setReference(name, new PatternType[] { pattern }, j2eeContext);
     }
 
-    public void setReference(String name, String[] patterns) throws DeploymentException {
+    public void setReference(String name, PatternType[] patterns, J2eeContext j2eeContext) throws DeploymentException {
         Set patternNames = new HashSet(patterns.length);
         for (int i = 0; i < patterns.length; i++) {
             try {
-                patternNames.add(new ObjectName(patterns[i]));
+                patternNames.add(buildObjectName(name, patterns[i], j2eeContext));
             } catch (MalformedObjectNameException e) {
                 throw new DeploymentException("Invalid pattern for reference " + name + ": " + patterns[i], e);
             }
         }
         gbean.setReferencePatterns(name, patternNames);
+    }
+
+    private ObjectName buildObjectName(String refName, PatternType pattern, J2eeContext j2eeContext) throws MalformedObjectNameException, DeploymentException {
+        if (pattern.isSetGbeanName()) {
+            String gbeanName = pattern.getGbeanName();
+            return ObjectName.getInstance(gbeanName);
+        }
+        String domain = pattern.isSetDomain()? pattern.getDomain().trim(): null;
+        String server = pattern.isSetServer()? pattern.getServer().trim(): null;
+        String application = pattern.isSetApplication()? pattern.getApplication().trim(): null;
+        String moduleType = pattern.isSetModuleType()? pattern.getModuleType().trim(): null;
+        String module = pattern.isSetModule()? pattern.getModule().trim(): null;
+        String type = pattern.isSetType()? pattern.getType().trim(): null;
+        String name = pattern.getName().trim();
+
+        //get the type from the gbean info if not supplied explicitly
+        if (type == null) {
+            boolean found = false;
+            Set referenceInfos = gbean.getGBeanInfo().getReferences();
+            for (Iterator iterator = referenceInfos.iterator(); iterator.hasNext();) {
+                GReferenceInfo referenceInfo = (GReferenceInfo) iterator.next();
+                String testRefName = referenceInfo.getName();
+                if (testRefName.equals(refName)) {
+                    type = referenceInfo.getNameTypeName();
+                    found = true;
+                }
+            }
+            if (!found) {
+                throw new DeploymentException("No reference named " + refName + " in gbean " + gbean.getName());
+            }
+        }
+        return NameFactory.getComponentNameQuery(domain, server, application, moduleType, module, name, type, j2eeContext);
     }
 
     public GBeanData getGBeanData() {

Modified: geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java (original)
+++ geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java Sat Mar  5 18:48:02 2005
@@ -25,14 +25,13 @@
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.net.URLClassLoader;
+import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 import java.util.Map;
-import java.util.HashMap;
-import java.util.Collection;
-import java.util.Iterator;
+import java.util.Set;
 import java.util.jar.JarFile;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
@@ -52,19 +51,16 @@
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.gbean.ReferenceCollection;
-import org.apache.geronimo.gbean.ReferenceCollectionListener;
-import org.apache.geronimo.gbean.ReferenceCollectionEvent;
 import org.apache.geronimo.gbean.ReferenceMap;
 import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext;
 import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContextImpl;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
-import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.kernel.repository.MissingDependencyException;
-import org.apache.xmlbeans.XmlException;
+import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.xmlbeans.XmlCursor;
+import org.apache.xmlbeans.XmlException;
 
 /**
  * @version $Rev$ $Date$
@@ -241,14 +237,14 @@
     public static GBeanData getGBeanData(GbeanType gbean, J2eeContext j2eeContext, ClassLoader cl) throws DeploymentException {
         GBeanInfo gBeanInfo = GBeanInfo.getGBeanInfo(gbean.getClass1(), cl);
         ObjectName objectName;
-        if (gbean.isSetName()) {
+        if (gbean.isSetGbeanName()) {
             try {
-                objectName = ObjectName.getInstance(gbean.getName());
+                objectName = ObjectName.getInstance(gbean.getGbeanName());
             } catch (MalformedObjectNameException e) {
                 throw new DeploymentException("Invalid ObjectName: " + gbean.getName(), e);
             }
         } else {
-            String namePart = gbean.getNamePart();
+            String namePart = gbean.getName();
             try {
                 String j2eeType = gBeanInfo.getJ2eeType();
                 //todo investigate using the module type from the j2eecontext.
@@ -286,7 +282,7 @@
         ReferenceType[] referenceArray = gbean.getReferenceArray();
         if (referenceArray != null) {
             for (int j = 0; j < referenceArray.length; j++) {
-                builder.setReference(referenceArray[j].getName(), referenceArray[j].getStringValue());
+                builder.setReference(referenceArray[j].getName2(), referenceArray[j], j2eeContext);
             }
         }
 
@@ -294,7 +290,7 @@
         ReferencesType[] referencesArray = gbean.getReferencesArray();
         if (referencesArray != null) {
             for (int j = 0; j < referencesArray.length; j++) {
-                builder.setReference(referencesArray[j].getName(), referencesArray[j].getPatternArray());
+                builder.setReference(referencesArray[j].getName(), referencesArray[j].getPatternArray(), j2eeContext);
             }
         }
 
@@ -333,8 +329,8 @@
         infoFactory.addInterface(ConfigurationBuilder.class);
 
         infoFactory.addAttribute("defaultParentId", URI.class, true);
-        infoFactory.addReference("Repository", Repository.class);
-        infoFactory.addReference("XmlAttributeBuilders", XmlAttributeBuilder.class);
+        infoFactory.addReference("Repository", Repository.class, NameFactory.GERONIMO_SERVICE);
+        infoFactory.addReference("XmlAttributeBuilders", XmlAttributeBuilder.class, "XmlAttributeBuilder");
         infoFactory.addAttribute("kernel", Kernel.class, false);
 
         infoFactory.setConstructor(new String[]{"defaultParentId", "Repository", "XmlAttributeBuilders", "kernel"});

Modified: geronimo/trunk/modules/service-builder/src/schema/geronimo-config.xsd
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/schema/geronimo-config.xsd?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/service-builder/src/schema/geronimo-config.xsd (original)
+++ geronimo/trunk/modules/service-builder/src/schema/geronimo-config.xsd Sat Mar  5 18:48:02 2005
@@ -74,8 +74,8 @@
             <xs:element name="reference" type="sys:referenceType"/>
             <xs:element name="references" type="sys:referencesType"/>
         </xs:choice>
+        <xs:attribute name="gbeanName" type="xs:string"/>
         <xs:attribute name="name" type="xs:string"/>
-        <xs:attribute name="namePart" type="xs:string"/>
         <xs:attribute name="class" type="xs:string" use="required"/>
     </xs:complexType>
 
@@ -90,24 +90,48 @@
 
     <xs:complexType name="xml-attributeType">
         <xs:sequence>
-           <xs:any namespace="##other"/>
+            <xs:any namespace="##other"/>
         </xs:sequence>
         <xs:attribute name="name" type="xs:string"/>
     </xs:complexType>
 
-    <xs:complexType name="referenceType">
-        <xs:simpleContent>
-            <xs:extension base="xs:string">
-                <xs:attribute name="name" type="xs:string"/>
-            </xs:extension>
-        </xs:simpleContent>
-    </xs:complexType>
-
     <xs:complexType name="referencesType">
         <xs:sequence>
-            <xs:element name="pattern" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
+            <xs:element name="pattern" type="sys:patternType" minOccurs="1" maxOccurs="unbounded"/>
         </xs:sequence>
         <xs:attribute name="name" type="xs:string"/>
     </xs:complexType>
+
+    <xs:complexType name="patternType">
+        <xs:sequence>
+            <xs:group ref="sys:gbean-nameGroup"/>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="referenceType">
+        <xs:complexContent>
+            <xs:extension base="sys:patternType">
+                <xs:attribute name="name" type="xs:string"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:group name="gbean-nameGroup">
+        <xs:annotation>
+            <xs:documentation>This group contains the components of a jsr-77 object name</xs:documentation>
+        </xs:annotation>
+        <xs:choice>
+            <xs:sequence>
+                <xs:element name="domain" type="xs:string" minOccurs="0"/>
+                <xs:element name="server" type="xs:string" minOccurs="0"/>
+                <xs:element name="application" type="xs:string" minOccurs="0"/>
+                <xs:element name="moduleType" type="xs:string" minOccurs="0"/>
+                <xs:element name="module" type="xs:string" minOccurs="0"/>
+                <xs:element name="type" type="xs:string" minOccurs="0"/>
+                <xs:element name="name" type="xs:string"/>
+            </xs:sequence>
+            <xs:element name="gbean-name" type="xs:string"/>
+        </xs:choice>
+    </xs:group>
 
 </xs:schema>

Modified: geronimo/trunk/modules/service-builder/src/test-resources/services/plan1.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/test-resources/services/plan1.xml?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/service-builder/src/test-resources/services/plan1.xml (original)
+++ geronimo/trunk/modules/service-builder/src/test-resources/services/plan1.xml Sat Mar  5 18:48:02 2005
@@ -27,7 +27,7 @@
         <version>DEV</version>
     </dependency>
     
-    <gbean name="geronimo.test:name=MyMockGMBean" class="org.apache.geronimo.deployment.MockGBean">
+    <gbean gbeanName="geronimo.test:name=MyMockGMBean" class="org.apache.geronimo.deployment.MockGBean">
         <attribute name="value">1234</attribute>
         <attribute name="intValue">1234</attribute>
         <xml-attribute name="fooBarBean">
@@ -42,6 +42,6 @@
                 </ns:bean-property>
             </ns:javabean>
         </xml-attribute>
-        <reference name="MockEndpoint">geronimo.test:name=MyMockGMBean</reference>
+        <reference name="MockEndpoint"><gbean-name>geronimo.test:name=MyMockGMBean</gbean-name></reference>
     </gbean>
 </configuration>

Modified: geronimo/trunk/modules/service-builder/src/test/org/apache/geronimo/deployment/MockGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/test/org/apache/geronimo/deployment/MockGBean.java?view=diff&r1=156291&r2=156292
==============================================================================
--- geronimo/trunk/modules/service-builder/src/test/org/apache/geronimo/deployment/MockGBean.java (original)
+++ geronimo/trunk/modules/service-builder/src/test/org/apache/geronimo/deployment/MockGBean.java Sat Mar  5 18:48:02 2005
@@ -98,7 +98,7 @@
         infoFactory.addOperation("checkEndpoint");
         infoFactory.addOperation("doSomething", new Class[]{String.class});
 
-        infoFactory.addReference("MockEndpoint", MockEndpoint.class);
+        infoFactory.addReference("MockEndpoint", MockEndpoint.class, null);
 
         infoFactory.setConstructor(new String[] {"name"});
 



Mime
View raw message