geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r389907 [1/3] - in /geronimo/branches/1.1: applications/console-core/src/java/org/apache/geronimo/console/util/ applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ applications/console-standard/src/java/org/apa...
Date Wed, 29 Mar 2006 22:17:01 GMT
Author: dain
Date: Wed Mar 29 14:16:54 2006
New Revision: 389907

URL: http://svn.apache.org/viewcvs?rev=389907&view=rev
Log:
Removed more uses of ObjectName
Marked all ObjectName kernel methods as deprecated
Replaced use of GBeanQuery with AbstractNameQuery
Replaced unnecessary proxy creation with calls to kernel.getGBean
Improved NO_PROXY flag to cause reflective kernel invocations to not use CGLib fast class
Removed properties from environment object as they are no longer used anywhere

Added:
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/ReflectionMethodInvoker.java
    geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/GBeanReference.java
Removed:
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanQuery.java
    geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/GBeanProxyReference.java
Modified:
    geronimo/branches/1.1/applications/console-core/src/java/org/apache/geronimo/console/util/KernelManagementHelper.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
    geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/handlers/RemoveDestinationHandler.java
    geronimo/branches/1.1/configs/client-system/src/plan/plan.xml
    geronimo/branches/1.1/configs/geronimo-gbean-deployer/src/plan/plan.xml
    geronimo/branches/1.1/configs/j2ee-system/src/plan/plan.xml
    geronimo/branches/1.1/configs/online-deployer/src/plan/plan.xml
    geronimo/branches/1.1/configs/shutdown/src/plan/plan.xml
    geronimo/branches/1.1/modules/axis-builder/src/test/org/apache/geronimo/axis/builder/ServiceReferenceTest.java
    geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
    geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_0/geronimo-ra.xml
    geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml
    geronimo/branches/1.1/modules/connector-builder/src/test-data/ear/geronimo-application.xml
    geronimo/branches/1.1/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
    geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
    geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/RedeployCommand.java
    geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/StartCommand.java
    geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
    geronimo/branches/1.1/modules/deployment/src/test/org/apache/geronimo/deployment/DeploymentContextTest.java
    geronimo/branches/1.1/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java
    geronimo/branches/1.1/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml
    geronimo/branches/1.1/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml
    geronimo/branches/1.1/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml
    geronimo/branches/1.1/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml
    geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
    geronimo/branches/1.1/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java
    geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/DomainTest.java
    geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java
    geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java
    geronimo/branches/1.1/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
    geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanData.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/AbstractGBeanReference.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanAttribute.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstanceState.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanOperation.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/ProxyMethodInterceptor.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableKernelConfigurationManager.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/JMXProxyMethodInterceptor.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/KernelDelegate.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Environment.java
    geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/gbean/runtime/GBeanDependencyTest.java
    geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java
    geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/config/ConfigurationManagerTest.java
    geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/repository/ArtifactResolverTest.java
    geronimo/branches/1.1/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java
    geronimo/branches/1.1/modules/security/src/java/org/apache/geronimo/security/jaas/client/JaasLoginCoordinator.java
    geronimo/branches/1.1/modules/security/src/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java
    geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java
    geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanBuilder.java
    geronimo/branches/1.1/modules/service-builder/src/schema/geronimo-config-1.1.xsd
    geronimo/branches/1.1/modules/service-builder/src/test-resources/services/plan1.xml
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigurationDump.java
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigurationOverride.java
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/GBeanOverride.java
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ServerOverride.java
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/WebAppUtil.java
    geronimo/branches/1.1/modules/system/src/test/org/apache/geronimo/system/configuration/LocalAttributeManagerTest.java
    geronimo/branches/1.1/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
    geronimo/branches/1.1/plugins/geronimo-deployment-plugin/src/java/org/apache/geronimo/deployment/mavenplugin/WaitForStarted.java
    geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PlanProcessor.java

Modified: geronimo/branches/1.1/applications/console-core/src/java/org/apache/geronimo/console/util/KernelManagementHelper.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-core/src/java/org/apache/geronimo/console/util/KernelManagementHelper.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-core/src/java/org/apache/geronimo/console/util/KernelManagementHelper.java (original)
+++ geronimo/branches/1.1/applications/console-core/src/java/org/apache/geronimo/console/util/KernelManagementHelper.java Wed Mar 29 14:16:54 2006
@@ -42,7 +42,6 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
-import org.apache.geronimo.gbean.GBeanQuery;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
@@ -1086,11 +1085,11 @@
     }
 
     public Object[] findByInterface(Class iface) {
-        Set set = kernel.listGBeans(new GBeanQuery(null, iface.getName()));
+        Set set = kernel.listGBeans(new AbstractNameQuery(iface.getName()));
         Object[] result = new Object[set.size()];
         int i=0;
         for (Iterator it = set.iterator(); it.hasNext();) {
-            ObjectName name = (ObjectName) it.next();
+            AbstractName name = (AbstractName) it.next();
             result[i++] = kernel.getProxyManager().createProxy(name, iface.getClassLoader());
         }
         return result;

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java (original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ConfigManagerPortlet.java Wed Mar 29 14:16:54 2006
@@ -29,7 +29,6 @@
 import org.apache.geronimo.kernel.config.InvalidConfigException;
 import org.apache.geronimo.kernel.config.NoSuchConfigException;
 import org.apache.geronimo.kernel.config.NoSuchStoreException;
-import org.apache.geronimo.kernel.management.State;
 
 import javax.management.ObjectName;
 import javax.portlet.ActionRequest;
@@ -153,8 +152,7 @@
             if (result.booleanValue()) {
                 // stop config if running
                 if (configManager.isLoaded(configURI)) {
-                    int state = kernel.getGBeanState(Configuration.getConfigurationObjectName(configURI));
-                    if (state == State.RUNNING.toInt()) {
+                    if (kernel.isRunning(Configuration.getConfigurationAbstractName(configURI))) {
 
                         configManager.stopConfiguration(configURI);
                         configManager.unloadConfiguration(configURI);

Modified: geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/handlers/RemoveDestinationHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/handlers/RemoveDestinationHandler.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/handlers/RemoveDestinationHandler.java (original)
+++ geronimo/branches/1.1/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/handlers/RemoveDestinationHandler.java Wed Mar 29 14:16:54 2006
@@ -31,7 +31,9 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.console.jmsmanager.AbstractJMSManager;
 import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.kernel.DependencyManager;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
@@ -49,8 +51,8 @@
         try {
             ConfigurationManager configurationManager = ConfigurationUtil
                     .getConfigurationManager(kernel);
-            URI destinationConfigURI = new URI(destinationConfigURIName);
-            ObjectName configurationObjectName = Configuration.getConfigurationObjectName(destinationConfigURI);
+            Artifact destinationConfigArtifact = Artifact.create(destinationConfigURIName);
+            AbstractName configurationObjectName = Configuration.getConfigurationAbstractName(destinationConfigArtifact);
 
             List stores = configurationManager.listStores();
             assert stores.size() == 1 :"Piling one hack on another, this code only works with exactly one store";
@@ -75,7 +77,7 @@
             //kernel.stopConfiguration(destinationConfigURI);
             kernel.stopGBean(configurationObjectName);
             kernel.invoke(storeName, "uninstall",
-                    new Object[] {destinationConfigURI},
+                    new Object[] {destinationConfigArtifact},
                     new String[] {URI.class.getName()});
         } catch (Exception e) {
             log.error("problem removing destination: "

Modified: geronimo/branches/1.1/configs/client-system/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/client-system/src/plan/plan.xml?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/client-system/src/plan/plan.xml (original)
+++ geronimo/branches/1.1/configs/client-system/src/plan/plan.xml Wed Mar 29 14:16:54 2006
@@ -21,16 +21,6 @@
 Configuration for root app client
 -->
 <configuration xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
-
-    <environment>
-        <properties>
-            <property>
-                <name>org.apache.geronimo.name.javax.management.j2ee.BaseName</name>
-                <value>geronimo.client:J2EEServer=client</value>
-            </property>
-        </properties>
-    </environment>
-
     <!-- ServerInfo service -->
     <gbean name="ServerInfo" class="org.apache.geronimo.system.serverinfo.BasicServerInfo"/>
 

Modified: geronimo/branches/1.1/configs/geronimo-gbean-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/geronimo-gbean-deployer/src/plan/plan.xml?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/geronimo-gbean-deployer/src/plan/plan.xml (original)
+++ geronimo/branches/1.1/configs/geronimo-gbean-deployer/src/plan/plan.xml Wed Mar 29 14:16:54 2006
@@ -17,16 +17,6 @@
 -->
 
 <configuration xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
-
-    <environment>
-        <properties>
-            <property>
-                <name>org.apache.geronimo.name.javax.management.j2ee.BaseName</name>
-                <value>geronimo.maven:J2EEServer=geronimo</value>
-            </property>
-        </properties>
-    </environment>
-
     <!-- Deployer used to process modules and plans -->
     <gbean name="Deployer" class="org.apache.geronimo.deployment.Deployer">
         <reference name="Store">

Modified: geronimo/branches/1.1/configs/j2ee-system/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/j2ee-system/src/plan/plan.xml?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/j2ee-system/src/plan/plan.xml (original)
+++ geronimo/branches/1.1/configs/j2ee-system/src/plan/plan.xml Wed Mar 29 14:16:54 2006
@@ -27,16 +27,6 @@
 specific services - those should be provided by children.
 -->
 <configuration xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
-
-  <environment>
-    <properties>
-      <property>
-        <name>org.apache.geronimo.name.javax.management.j2ee.BaseName</name>
-        <value>geronimo.server:J2EEServer=geronimo</value>
-      </property>
-    </properties>
-  </environment>
-
   <!-- MBean server service -->
   <gbean name="MBeanServerKernelBridge" class="org.apache.geronimo.system.jmx.MBeanServerKernelBridge"/>
 

Modified: geronimo/branches/1.1/configs/online-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/online-deployer/src/plan/plan.xml?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/online-deployer/src/plan/plan.xml (original)
+++ geronimo/branches/1.1/configs/online-deployer/src/plan/plan.xml Wed Mar 29 14:16:54 2006
@@ -17,13 +17,5 @@
 -->
 
 <configuration xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
-
-    <environment>
-        <properties>
-            <property>
-                <name>org.apache.geronimo.name.javax.management.j2ee.BaseName</name>
-                <value>geronimo.online.deployer:J2EEServer=geronimo</value>
-            </property>
-        </properties>
-    </environment>
+    <environment/>
 </configuration>

Modified: geronimo/branches/1.1/configs/shutdown/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/configs/shutdown/src/plan/plan.xml?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/configs/shutdown/src/plan/plan.xml (original)
+++ geronimo/branches/1.1/configs/shutdown/src/plan/plan.xml Wed Mar 29 14:16:54 2006
@@ -17,13 +17,5 @@
 -->
 
 <configuration xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
-
-    <environment>
-        <properties>
-            <property>
-                <name>org.apache.geronimo.name.javax.management.j2ee.BaseName</name>
-                <value>geronimo.shutdown:J2EEServer=geronimo</value>
-            </property>
-        </properties>
-    </environment>
+  <environment/>
 </configuration>

Modified: geronimo/branches/1.1/modules/axis-builder/src/test/org/apache/geronimo/axis/builder/ServiceReferenceTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/axis-builder/src/test/org/apache/geronimo/axis/builder/ServiceReferenceTest.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/axis-builder/src/test/org/apache/geronimo/axis/builder/ServiceReferenceTest.java (original)
+++ geronimo/branches/1.1/modules/axis-builder/src/test/org/apache/geronimo/axis/builder/ServiceReferenceTest.java Wed Mar 29 14:16:54 2006
@@ -108,9 +108,6 @@
         tmpbasedir.delete();
         tmpbasedir.mkdirs();
         environment.setConfigId(configID);
-        Map nameKeys = new HashMap();
-        nameKeys.put("domain", "geronimo");
-        environment.setProperties(nameKeys);
         Jsr77Naming naming = new Jsr77Naming();
         context = new DeploymentContext(tmpbasedir, environment, ConfigurationModuleType.CAR, naming);
 

Modified: geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java (original)
+++ geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java Wed Mar 29 14:16:54 2006
@@ -788,7 +788,7 @@
         }
         Map activationSpecInfos = (Map) resourceModuleData.getAttribute("activationSpecInfoMap");
         if (activationSpecInfos == null) {
-            throw new DeploymentException("No activation spec info map found in resource adapter module: " + resourceModuleData.getName());
+            throw new DeploymentException("No activation spec info map found in resource adapter module: " + resourceModuleData.getAbstractName());
         }
         return (GBeanData) activationSpecInfos.get(messageListenerInterface);
     }
@@ -796,7 +796,7 @@
     private GBeanData locateResourceAdapterGBeanData(GBeanData resourceAdapterModuleData) throws DeploymentException {
         GBeanData data = (GBeanData) resourceAdapterModuleData.getAttribute("resourceAdapterGBeanData");
         if (data == null) {
-            throw new DeploymentException("No resource adapter info found for resource adapter module: " + resourceAdapterModuleData.getName());
+            throw new DeploymentException("No resource adapter info found for resource adapter module: " + resourceAdapterModuleData.getAbstractName());
         }
         return data;
     }
@@ -804,7 +804,7 @@
     private GBeanData locateAdminObjectInfo(GBeanData resourceAdapterModuleData, String adminObjectInterfaceName) throws DeploymentException {
         Map adminObjectInfos = (Map) resourceAdapterModuleData.getAttribute("adminObjectInfoMap");
         if (adminObjectInfos == null) {
-            throw new DeploymentException("No admin object infos found for resource adapter module: " + resourceAdapterModuleData.getName());
+            throw new DeploymentException("No admin object infos found for resource adapter module: " + resourceAdapterModuleData.getAbstractName());
         }
         return (GBeanData) adminObjectInfos.get(adminObjectInterfaceName);
     }
@@ -812,7 +812,7 @@
     private GBeanData locateConnectionFactoryInfo(GBeanData resourceAdapterModuleData, String connectionFactoryInterfaceName) throws DeploymentException {
         Map managedConnectionFactoryInfos = (Map) resourceAdapterModuleData.getAttribute("managedConnectionFactoryInfoMap");
         if (managedConnectionFactoryInfos == null) {
-            throw new DeploymentException("No managed connection factory infos found for resource adapter module: " + resourceAdapterModuleData.getName());
+            throw new DeploymentException("No managed connection factory infos found for resource adapter module: " + resourceAdapterModuleData.getAbstractName());
         }
         return (GBeanData) managedConnectionFactoryInfos.get(connectionFactoryInterfaceName);
     }

Modified: geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_0/geronimo-ra.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_0/geronimo-ra.xml?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_0/geronimo-ra.xml (original)
+++ geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_0/geronimo-ra.xml Wed Mar 29 14:16:54 2006
@@ -24,12 +24,6 @@
             <version>1.0</version>
             <type>car</type>
         </configId>
-        <properties>
-            <property>
-                <name>org.apache.geronimo.name.javax.management.j2ee.BaseName</name>
-                <value>geronimo.test:J2EEServer=geronimo</value>
-            </property>
-        </properties>
     </environment>
 
     <resourceadapter>

Modified: geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml (original)
+++ geronimo/branches/1.1/modules/connector-builder/src/test-data/connector_1_5/geronimo-ra.xml Wed Mar 29 14:16:54 2006
@@ -24,12 +24,6 @@
             <version>1.0</version>
             <type>car</type>
         </configId>
-        <properties>
-            <property>
-                <name>org.apache.geronimo.name.javax.management.j2ee.BaseName</name>
-                <value>geronimo.test:J2EEServer=geronimo</value>
-            </property>
-        </properties>
     </environment>
 
     <resourceadapter>

Modified: geronimo/branches/1.1/modules/connector-builder/src/test-data/ear/geronimo-application.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector-builder/src/test-data/ear/geronimo-application.xml?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/connector-builder/src/test-data/ear/geronimo-application.xml (original)
+++ geronimo/branches/1.1/modules/connector-builder/src/test-data/ear/geronimo-application.xml Wed Mar 29 14:16:54 2006
@@ -24,12 +24,5 @@
             <version>1.0</version>
             <type>car</type>
         </configId>
-        <properties>
-            <property>
-                <name>org.apache.geronimo.name.javax.management.j2ee.BaseName</name>
-                <value>geronimo.test:J2EEServer=geronimo</value>
-            </property>
-        </properties>
     </environment>
-
 </application>

Modified: geronimo/branches/1.1/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java (original)
+++ geronimo/branches/1.1/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java Wed Mar 29 14:16:54 2006
@@ -586,7 +586,6 @@
             } else {
                 Environment environment = new Environment();
                 environment.setConfigId(configId);
-                environment.getProperties().put(NameFactory.JSR77_BASE_NAME_PROPERTY, "geronimo.test:J2EEServer=geronimo");
                 configData.setAttribute("environment", environment);
                 configData.setAttribute("moduleType", ConfigurationModuleType.WAR);
                 configData.setAttribute("gBeanState", NO_OBJECTS_OS);

Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java (original)
+++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java Wed Mar 29 14:16:54 2006
@@ -19,7 +19,6 @@
 
 import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
 import org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager.CommandContext;
-import org.apache.geronimo.gbean.GBeanQuery;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.kernel.InternalKernelException;
@@ -301,11 +300,11 @@
             TargetModuleIDImpl id = (TargetModuleIDImpl) moduleIDs.get(i);
             if(id.getType() != null && id.getType().getValue() == ModuleType.WAR.getValue()) {
                 if(webApps == null) {
-                    webApps = kernel.listGBeans(new GBeanQuery(null, "org.apache.geronimo.management.geronimo.WebModule"));
+                    webApps = kernel.listGBeans(new AbstractNameQuery("org.apache.geronimo.management.geronimo.WebModule"));
                 }
                 for (Iterator it = webApps.iterator(); it.hasNext();) {
-                    ObjectName name = (ObjectName) it.next();
-                    if(name.getKeyProperty("name").equals(id.getModuleID())) {
+                    AbstractName name = (AbstractName) it.next();
+                    if(name.getName().get("name").equals(id.getModuleID())) {
                         try {
                             String container = (String) kernel.getAttribute(name, "containerName");
                             String context = (String) kernel.getAttribute(name, "contextPath");

Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/RedeployCommand.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/RedeployCommand.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/RedeployCommand.java (original)
+++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/RedeployCommand.java Wed Mar 29 14:16:54 2006
@@ -27,6 +27,7 @@
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
 import org.apache.geronimo.kernel.config.NoSuchConfigException;
+import org.apache.geronimo.gbean.AbstractName;
 
 import javax.enterprise.deploy.shared.CommandType;
 import javax.enterprise.deploy.spi.TargetModuleID;
@@ -36,7 +37,7 @@
 import java.net.URI;
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 383519 $ $Date$
  */
 public class RedeployCommand extends AbstractDeployCommand {
     private static final String[] UNINSTALL_SIG = {URI.class.getName()};
@@ -75,7 +76,7 @@
                     TargetModuleIDImpl module = (TargetModuleIDImpl) modules[i];
 
                     Artifact configID = Artifact.create(module.getModuleID());
-                    ObjectName configName = Configuration.getConfigurationObjectName(configID);
+                    AbstractName configName = Configuration.getConfigurationAbstractName(configID);
                     try {
                         kernel.stopGBean(configName);
                         updateStatus("Stopped "+configID);

Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/StartCommand.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/StartCommand.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/StartCommand.java (original)
+++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/StartCommand.java Wed Mar 29 14:16:54 2006
@@ -17,24 +17,22 @@
 
 package org.apache.geronimo.deployment.plugin.local;
 
+import java.util.List;
+import javax.enterprise.deploy.shared.CommandType;
+import javax.enterprise.deploy.shared.ModuleType;
+import javax.enterprise.deploy.spi.TargetModuleID;
+
 import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
-import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
-import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.repository.Artifact;
 
-import javax.enterprise.deploy.shared.CommandType;
-import javax.enterprise.deploy.shared.ModuleType;
-import javax.enterprise.deploy.spi.TargetModuleID;
-import java.util.List;
-
 /**
  *
  *
- * @version $Rev$ $Date$
+ * @version $Rev: 383519 $ $Date$
  */
 public class StartCommand extends CommandSupport {
     private final Kernel kernel;
@@ -55,15 +53,10 @@
 
                     // Check to see whether the module is already started
                     Artifact moduleID = Artifact.create(module.getModuleID());
-                    try {
-                        if(kernel.getGBeanState(Configuration.getConfigurationObjectName(moduleID)) == State.RUNNING_INDEX) {
-                            updateStatus("Module "+moduleID+" is already running");
-                            Thread.sleep(100);
-                            continue;
-                        }
-                    } catch (GBeanNotFoundException e) {
-                        // That means that the configuration may have been distributed but has not yet been loaded.
-                        // That's fine, we'll load it next.
+                    if(kernel.isRunning(Configuration.getConfigurationAbstractName(moduleID))) {
+                        updateStatus("Module "+moduleID+" is already running");
+                        Thread.sleep(100);
+                        continue;
                     }
 
                     // Load and start the module

Modified: geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java (original)
+++ geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java Wed Mar 29 14:16:54 2006
@@ -23,7 +23,6 @@
 import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.gbean.GBeanQuery;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
@@ -170,9 +169,9 @@
      * means it goes through a web server listening on an unknown port).
      */
     private String getURLFor(String containerName) throws Exception {
-        Set set = kernel.listGBeans(new GBeanQuery(null, "org.apache.geronimo.management.geronimo.WebManager"));
+        Set set = kernel.listGBeans(new AbstractNameQuery("org.apache.geronimo.management.geronimo.WebManager"));
         for (Iterator it = set.iterator(); it.hasNext();) {
-            ObjectName mgrName = (ObjectName) it.next();
+            AbstractName mgrName = (AbstractName) it.next();
             String[] cntNames = (String[]) kernel.getAttribute(mgrName, "containers");
             for (int i = 0; i < cntNames.length; i++) {
                 String cntName = cntNames[i];
@@ -243,7 +242,7 @@
             // Make sure this configuration doesn't already exist
             Artifact configID = builder.getConfigurationID(plan, module);
             try {
-                kernel.getGBeanState(Configuration.getConfigurationObjectName(configID));
+                kernel.getGBeanState(Configuration.getConfigurationAbstractName(configID));
                 throw new DeploymentException("Module "+configID+" already exists in the server.  Try to undeploy it first or use the redeploy command.");
             } catch (GBeanNotFoundException e) {
                 // this is good

Modified: geronimo/branches/1.1/modules/deployment/src/test/org/apache/geronimo/deployment/DeploymentContextTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deployment/src/test/org/apache/geronimo/deployment/DeploymentContextTest.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deployment/src/test/org/apache/geronimo/deployment/DeploymentContextTest.java (original)
+++ geronimo/branches/1.1/modules/deployment/src/test/org/apache/geronimo/deployment/DeploymentContextTest.java Wed Mar 29 14:16:54 2006
@@ -20,18 +20,16 @@
 import java.net.URI;
 import java.net.URL;
 import java.net.URLClassLoader;
-import java.util.HashMap;
-import java.util.Map;
 import javax.sql.DataSource;
 
 import junit.framework.TestCase;
 import net.sf.cglib.core.DefaultGeneratorStrategy;
 import net.sf.cglib.proxy.Enhancer;
 import net.sf.cglib.proxy.MethodInterceptor;
+import org.apache.geronimo.kernel.Jsr77Naming;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
-import org.apache.geronimo.kernel.Jsr77Naming;
 
 /**
  * @version $Rev: 384686 $ $Date$
@@ -48,9 +46,6 @@
             Environment environment = new Environment();
             Artifact configId = new Artifact("foo", "artifact", "1", "car");
             environment.setConfigId(configId);
-            Map nameKeys = new HashMap();
-            nameKeys.put("domain", "d");
-            environment.setProperties(nameKeys);
             DeploymentContext context = new DeploymentContext(basedir, environment, ConfigurationModuleType.CAR, new Jsr77Naming());
             Enhancer enhancer = new Enhancer();
             enhancer.setInterfaces(new Class[]{DataSource.class});

Modified: geronimo/branches/1.1/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java (original)
+++ geronimo/branches/1.1/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java Wed Mar 29 14:16:54 2006
@@ -19,7 +19,8 @@
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.gbean.GBeanQuery;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl;
 import org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager;
@@ -36,7 +37,6 @@
 import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
 import javax.enterprise.deploy.spi.status.ProgressObject;
 import javax.enterprise.deploy.spi.factories.DeploymentFactory;
-import javax.management.ObjectName;
 import java.io.File;
 import java.util.Set;
 import java.util.Iterator;
@@ -177,10 +177,9 @@
         }
 
         // a bit of a hack, but the PersistentConfigurationList is the only thing that knows whether the server is full started!
-        GBeanQuery query = new GBeanQuery(null, PersistentConfigurationList.class.getName());
-        Set configLists = kernel.listGBeans(query);
+        Set configLists = kernel.listGBeans(new AbstractNameQuery(PersistentConfigurationList.class.getName()));
         for (Iterator i = configLists.iterator(); i.hasNext();) {
-            ObjectName configListName = (ObjectName) i.next();
+            AbstractName configListName = (AbstractName) i.next();
             try {
                 Boolean result = (Boolean) kernel.getAttribute(configListName, "kernelFullyStarted");
                 if(!result.booleanValue()) {

Modified: geronimo/branches/1.1/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml (original)
+++ geronimo/branches/1.1/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml Wed Mar 29 14:16:54 2006
@@ -24,12 +24,6 @@
             <version>1.0</version>
             <type>car</type>
         </configId>
-        <properties>
-            <property>
-                <name>org.apache.geronimo.name.javax.management.j2ee.BaseName</name>
-                <value>geronimo.test:J2EEServer=geronimo</value>
-            </property>
-        </properties>
     </environment>
     <!-- a random gbean just to verify that the deployer doesn't die because of it -->
     <gbean xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1" name="foo"

Modified: geronimo/branches/1.1/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml (original)
+++ geronimo/branches/1.1/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml Wed Mar 29 14:16:54 2006
@@ -24,14 +24,6 @@
             <version>1.0</version>
             <type>car</type>
         </configId>
-<!--
-        <properties>
-            <property>
-                <name>org.apache.geronimo.name.javax.management.j2ee.BaseName</name>
-                <value>geronimo.test:J2EEServer=geronimo</value>
-            </property>
-        </properties>
--->
     </environment>
 
     <!-- a random gbean just to verify that the deployer doesn't die because of it -->

Modified: geronimo/branches/1.1/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml (original)
+++ geronimo/branches/1.1/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml Wed Mar 29 14:16:54 2006
@@ -24,14 +24,6 @@
             <version>1.0</version>
             <type>car</type>
         </configId>
-<!--
-        <properties>
-            <property>
-                <name>org.apache.geronimo.name.javax.management.j2ee.BaseName</name>
-                <value>geronimo.test:J2EEServer=geronimo</value>
-            </property>
-        </properties>
--->
     </environment>
 
     <module>

Modified: geronimo/branches/1.1/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml (original)
+++ geronimo/branches/1.1/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml Wed Mar 29 14:16:54 2006
@@ -24,14 +24,6 @@
             <version>1.0</version>
             <type>car</type>
         </configId>
-<!--
-        <properties>
-            <property>
-                <name>org.apache.geronimo.name.javax.management.j2ee.BaseName</name>
-                <value>geronimo.test:J2EEServer=geronimo</value>
-            </property>
-        </properties>
--->
     </environment>
 
     <!-- a random gbean just to verify that the deployer doesn't die because of it -->

Modified: geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java (original)
+++ geronimo/branches/1.1/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java Wed Mar 29 14:16:54 2006
@@ -101,7 +101,6 @@
         super.setUp();
         defaultParentId = new Environment();
         defaultParentId.addDependency(new Artifact("geronimo", "test", "1", "car"), ImportType.ALL);
-        defaultParentId.getProperties().put(NameFactory.JSR77_BASE_NAME_PROPERTY, "geronimo.test:J2EEServer=geronimo");
     }
 
     public static Test suite() throws Exception {
@@ -529,7 +528,6 @@
             GBeanData configData = new GBeanData(configurationName, Configuration.GBEAN_INFO);
             Environment environment = new Environment();
             environment.setConfigId(configId);
-            environment.getProperties().put(NameFactory.JSR77_BASE_NAME_PROPERTY, "geronimo.test:J2EEServer=geronimo");
             configData.setAttribute("environment", environment);
             configData.setAttribute("moduleType", ConfigurationModuleType.CAR);
 

Modified: geronimo/branches/1.1/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java (original)
+++ geronimo/branches/1.1/modules/j2ee/src/java/org/apache/geronimo/j2ee/management/impl/J2EEServerImpl.java Wed Mar 29 14:16:54 2006
@@ -24,7 +24,8 @@
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.gbean.GBeanQuery;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.kernel.jmx.JMXUtil;
@@ -115,104 +116,35 @@
     }
 
     public String[] getWebManagers() {
-        GBeanQuery query = new GBeanQuery(null, WebManager.class.getName());
-        Set set = kernel.listGBeans(query);
-        if(set.size() == 0) {
-            return null;
-        }
-        String[] results = new String[set.size()];
-        int i=0;
-        for (Iterator it = set.iterator(); it.hasNext();) {
-            ObjectName name = (ObjectName) it.next();
-            results[i++] = name.getCanonicalName();
-        }
-        return results;
+        return getObjectNames(WebManager.class.getName(), false);
     }
 
     public String[] getEJBManagers() {
-        GBeanQuery query = new GBeanQuery(null, EJBManager.class.getName());
-        Set set = kernel.listGBeans(query);
-        if(set.size() == 0) {
-            return null;
-        }
-        String[] results = new String[set.size()];
-        int i=0;
-        for (Iterator it = set.iterator(); it.hasNext();) {
-            ObjectName name = (ObjectName) it.next();
-            results[i++] = name.getCanonicalName();
-        }
-        return results;
+        return getObjectNames(EJBManager.class.getName(), false);
     }
 
     public String[] getJMSManagers() {
-        GBeanQuery query = new GBeanQuery(null, JMSManager.class.getName());
-        Set set = kernel.listGBeans(query);
-        if(set.size() == 0) {
-            return null;
-        }
-        String[] results = new String[set.size()];
-        int i=0;
-        for (Iterator it = set.iterator(); it.hasNext();) {
-            ObjectName name = (ObjectName) it.next();
-            results[i++] = name.getCanonicalName();
-        }
-        return results;
+        return getObjectNames(JMSManager.class.getName(), false);
     }
 
     public String[] getThreadPools() {
-        GBeanQuery query = new GBeanQuery(null, GeronimoExecutor.class.getName());
-        Set set = kernel.listGBeans(query);
-        String[] names = new String[set.size()];
-        int i=0;
-        for (Iterator it = set.iterator(); it.hasNext();) {
-            ObjectName name = (ObjectName) it.next();
-            names[i++] = name.getCanonicalName();
-        }
-        return names;
+        return getObjectNames(GeronimoExecutor.class.getName(), true);
     }
 
     public String[] getRepositories() {
-        GBeanQuery query = new GBeanQuery(null, Repository.class.getName());
-        Set set = kernel.listGBeans(query);
-        String[] names = new String[set.size()];
-        int i=0;
-        for (Iterator it = set.iterator(); it.hasNext();) {
-            ObjectName name = (ObjectName) it.next();
-            names[i++] = name.getCanonicalName();
-        }
-        return names;
+        return getObjectNames(Repository.class.getName(), true);
     }
 
     public String[] getSecurityRealms() {
-        GBeanQuery query = new GBeanQuery(null, "org.apache.geronimo.security.realm.SecurityRealm");
-        Set set = kernel.listGBeans(query);
-        String[] names = new String[set.size()];
-        int i=0;
-        for (Iterator it = set.iterator(); it.hasNext();) {
-            ObjectName name = (ObjectName) it.next();
-            names[i++] = name.getCanonicalName();
-        }
-        return names;
+        return getObjectNames("org.apache.geronimo.security.realm.SecurityRealm", true);
     }
 
     public String getServerInfo() {
-        GBeanQuery query = new GBeanQuery(null, ServerInfo.class.getName());
-        Set set = kernel.listGBeans(query);
-        for (Iterator it = set.iterator(); it.hasNext();) {
-            ObjectName name = (ObjectName) it.next();
-            return name.getCanonicalName();
-        }
-        return null;
+        return getObjectName(ServerInfo.class.getName());
     }
 
     public String getLoginService() {
-        GBeanQuery query = new GBeanQuery(null, "org.apache.geronimo.security.jaas.server.JaasLoginServiceMBean");
-        Set set = kernel.listGBeans(query);
-        for (Iterator it = set.iterator(); it.hasNext();) {
-            ObjectName name = (ObjectName) it.next();
-            return name.getCanonicalName();
-        }
-        return null;
+        return getObjectName("org.apache.geronimo.security.jaas.server.JaasLoginServiceMBean");
     }
 
     public String getServerVendor() {
@@ -221,6 +153,35 @@
 
     public String getServerVersion() {
         return serverInfo.getVersion();
+    }
+
+    private String getObjectName(String type) {
+        Set names = kernel.listGBeans(new AbstractNameQuery(type));
+        if (names.isEmpty()) {
+            return null;
+        }
+        AbstractName name = (AbstractName) names.iterator().next();
+        return name.getObjectName().getCanonicalName();
+    }
+
+    private String[] getObjectNames(String type, boolean returnEmpty) {
+        Set names = kernel.listGBeans(new AbstractNameQuery(type));
+
+        if(names.size() == 0) {
+            if (returnEmpty) {
+                return new String[0];
+            } else {
+                return null;
+            }
+        }
+
+        String[] results = new String[names.size()];
+        int i=0;
+        for (Iterator it = names.iterator(); it.hasNext();) {
+            AbstractName name = (AbstractName) it.next();
+            results[i++] = name.getObjectName().getCanonicalName();
+        }
+        return results;
     }
 
     public static final GBeanInfo GBEAN_INFO;

Modified: geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/DomainTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/DomainTest.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/DomainTest.java (original)
+++ geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/DomainTest.java Wed Mar 29 14:16:54 2006
@@ -19,28 +19,23 @@
 import org.apache.geronimo.management.J2EEDomain;
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 383682 $ $Date$
  */
 public class DomainTest extends Abstract77Test {
     private J2EEDomain domain;
 
     public void testStandardInterface() throws Exception {
-        assertEquals(DOMAIN_DATA.getName().toString(), domain.getObjectName());
-        assertObjectNamesEqual(new String[]{SERVER_DATA.getName().toString()}, domain.getServers());
+        assertEquals(DOMAIN_DATA.getAbstractName().getObjectName().toString(), domain.getObjectName());
+        assertObjectNamesEqual(new String[]{SERVER_DATA.getAbstractName().getObjectName().toString()}, domain.getServers());
     }
 
     public void testStandardAttributes() throws Exception {
-        assertEquals(DOMAIN_DATA.getName().toString(), kernel.getAttribute(DOMAIN_DATA.getAbstractName(), "objectName"));
-        assertObjectNamesEqual(new String[]{SERVER_DATA.getName().toString()}, (String[]) kernel.getAttribute(DOMAIN_DATA.getAbstractName(), "servers"));
+        assertEquals(DOMAIN_DATA.getAbstractName().getObjectName().toString(), kernel.getAttribute(DOMAIN_DATA.getAbstractName(), "objectName"));
+        assertObjectNamesEqual(new String[]{SERVER_DATA.getAbstractName().getObjectName().toString()}, (String[]) kernel.getAttribute(DOMAIN_DATA.getAbstractName(), "servers"));
     }
 
     protected void setUp() throws Exception {
         super.setUp();
-        domain = (J2EEDomain) kernel.getProxyManager().createProxy(DOMAIN_DATA.getAbstractName(), J2EEDomain.class);
-    }
-
-    protected void tearDown() throws Exception {
-        kernel.getProxyManager().destroyProxy(domain);
-        super.tearDown();
+        domain = (J2EEDomain) kernel.getGBean(DOMAIN_DATA.getAbstractName());
     }
 }

Modified: geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java (original)
+++ geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/JVMTest.java Wed Mar 29 14:16:54 2006
@@ -22,7 +22,7 @@
 import org.apache.geronimo.management.JVM;
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 383682 $ $Date$
  */
 public class JVMTest extends Abstract77Test {
     private JVM jvm;
@@ -31,17 +31,17 @@
     private Runtime runtime;
 
     public void testStandardInterface() {
-        assertEquals(JVM_DATA.getName().getCanonicalName(), jvm.getObjectName());
+        assertEquals(JVM_DATA.getAbstractName().getObjectName().getCanonicalName(), jvm.getObjectName());
         assertEquals(System.getProperty("java.version"), jvm.getJavaVersion());
         assertEquals(System.getProperty("java.vendor"), jvm.getJavaVendor());
         assertEquals(node, jvm.getNode());
     }
 
     public void testStandardAttributes() throws Exception {
-        assertEquals(JVM_DATA.getName().getCanonicalName(), kernel.getAttribute(JVM_DATA.getName(), "objectName"));
-        assertEquals(System.getProperty("java.version"), kernel.getAttribute(JVM_DATA.getName(), "javaVersion"));
-        assertEquals(System.getProperty("java.vendor"), kernel.getAttribute(JVM_DATA.getName(), "javaVendor"));
-        assertEquals(node, kernel.getAttribute(JVM_DATA.getName(), "node"));
+        assertEquals(JVM_DATA.getAbstractName().getObjectName().getCanonicalName(), kernel.getAttribute(JVM_DATA.getAbstractName(), "objectName"));
+        assertEquals(System.getProperty("java.version"), kernel.getAttribute(JVM_DATA.getAbstractName().getObjectName(), "javaVersion"));
+        assertEquals(System.getProperty("java.vendor"), kernel.getAttribute(JVM_DATA.getAbstractName().getObjectName(), "javaVendor"));
+        assertEquals(node, kernel.getAttribute(JVM_DATA.getAbstractName().getObjectName(), "node"));
     }
 
     public void testGeronimoInterface() {
@@ -50,12 +50,12 @@
     }
 
     public void testGeronimoAttributes() throws Exception {
-        assertEquals(new Integer(runtime.availableProcessors()), kernel.getAttribute(JVM_DATA.getName(), "availableProcessors"));
+        assertEquals(new Integer(runtime.availableProcessors()), kernel.getAttribute(JVM_DATA.getAbstractName().getObjectName(), "availableProcessors"));
     }
 
     public void testStatistics() throws Exception {
-        assertEquals(Boolean.TRUE, kernel.getAttribute(JVM_DATA.getName(), "statisticsProvider"));
-        JVMStats stats = (JVMStats) kernel.getAttribute(JVM_DATA.getName(), "stats");
+        assertEquals(Boolean.TRUE, kernel.getAttribute(JVM_DATA.getAbstractName().getObjectName(), "statisticsProvider"));
+        JVMStats stats = (JVMStats) kernel.getAttribute(JVM_DATA.getAbstractName().getObjectName(), "stats");
         assertNotNull(stats.getHeapSize());
         assertTrue(stats.getHeapSize().getCurrent() > 0);
         assertNotNull(stats.getHeapSize().getDescription());
@@ -78,15 +78,13 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        jvm = (JVM) kernel.getProxyManager().createProxy(JVM_DATA.getName(), JVM.class);
-        jvmEx = (org.apache.geronimo.management.geronimo.JVM) kernel.getProxyManager().createProxy(JVM_DATA.getName(), org.apache.geronimo.management.geronimo.JVM.class);
+        jvm = (JVM) kernel.getGBean(JVM_DATA.getAbstractName());
+        jvmEx = (org.apache.geronimo.management.geronimo.JVM) kernel.getGBean(JVM_DATA.getAbstractName());
         node = InetAddress.getLocalHost().toString();
         runtime = Runtime.getRuntime();
     }
 
     protected void tearDown() throws Exception {
-        kernel.getProxyManager().destroyProxy(jvm);
-        kernel.getProxyManager().destroyProxy(jvmEx);
         super.tearDown();
     }
 }

Modified: geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java (original)
+++ geronimo/branches/1.1/modules/j2ee/src/test/org/apache/geronimo/j2ee/management/ServerTest.java Wed Mar 29 14:16:54 2006
@@ -21,38 +21,33 @@
 
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 383682 $ $Date$
  */
 public class ServerTest extends Abstract77Test {
     private J2EEServer server;
     private String version;
 
     public void testStandardInterface() throws Exception {
-        assertEquals(SERVER_DATA.getName().toString(), server.getObjectName());
+        assertEquals(SERVER_DATA.getAbstractName().getObjectName().getCanonicalName(), server.getObjectName());
         assertEquals(0, server.getDeployedObjects().length);
         assertEquals(0, server.getResources().length);
-        assertObjectNamesEqual(new String[]{JVM_DATA.getName().toString()}, server.getJavaVMs());
+        assertObjectNamesEqual(new String[]{JVM_DATA.getAbstractName().getObjectName().getCanonicalName()}, server.getJavaVMs());
         assertEquals("The Apache Software Foundation", server.getServerVendor());
         assertEquals(version, server.getServerVersion());
     }
 
     public void testStandardAttributes() throws Exception {
-        assertEquals(SERVER_DATA.getName().toString(), kernel.getAttribute(SERVER_DATA.getName(), "objectName"));
-        assertEquals(0, ((String[]) kernel.getAttribute(SERVER_DATA.getName(), "deployedObjects")).length);
-        assertEquals(0, ((String[]) kernel.getAttribute(SERVER_DATA.getName(), "resources")).length);
-        assertObjectNamesEqual(new String[]{JVM_DATA.getName().toString()}, (String[]) kernel.getAttribute(SERVER_DATA.getName(), "javaVMs"));
-        assertEquals("The Apache Software Foundation", kernel.getAttribute(SERVER_DATA.getName(), "serverVendor"));
-        assertEquals(version, kernel.getAttribute(SERVER_DATA.getName(), "serverVersion"));
+        assertEquals(SERVER_DATA.getAbstractName().getObjectName().getCanonicalName(), kernel.getAttribute(SERVER_DATA.getAbstractName(), "objectName"));
+        assertEquals(0, ((String[]) kernel.getAttribute(SERVER_DATA.getAbstractName(), "deployedObjects")).length);
+        assertEquals(0, ((String[]) kernel.getAttribute(SERVER_DATA.getAbstractName(), "resources")).length);
+        assertObjectNamesEqual(new String[]{JVM_DATA.getAbstractName().getObjectName().getCanonicalName()}, (String[]) kernel.getAttribute(SERVER_DATA.getAbstractName(), "javaVMs"));
+        assertEquals("The Apache Software Foundation", kernel.getAttribute(SERVER_DATA.getAbstractName(), "serverVendor"));
+        assertEquals(version, kernel.getAttribute(SERVER_DATA.getAbstractName(), "serverVersion"));
     }
 
     protected void setUp() throws Exception {
         super.setUp();
-        server = (J2EEServer) kernel.getProxyManager().createProxy(SERVER_DATA.getName(), J2EEServer.class);
-        version = (String) kernel.getAttribute(SERVER_INFO_DATA.getName(), "version");
-    }
-
-    protected void tearDown() throws Exception {
-        kernel.getProxyManager().destroyProxy(server);
-        super.tearDown();
+        server = (J2EEServer) kernel.getGBean(SERVER_DATA.getAbstractName());
+        version = (String) kernel.getAttribute(SERVER_INFO_DATA.getAbstractName(), "version");
     }
 }

Modified: geronimo/branches/1.1/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java (original)
+++ geronimo/branches/1.1/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java Wed Mar 29 14:16:54 2006
@@ -168,7 +168,7 @@
         if (template == null) {
             return null;
         }
-        AbstractName templateName = kernel.getProxyManager().getProxyTarget(template);
+        AbstractName templateName = kernel.getAbstractNameFor(template);
         return kernel.getGBeanData(templateName);
     }
 

Modified: geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java (original)
+++ geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java Wed Mar 29 14:16:54 2006
@@ -88,10 +88,6 @@
  * @version $Rev:385232 $ $Date$
  */
 public class JettyModuleBuilderTest extends TestCase {
-    private String DOMAIN_NAME = "geronimo.test";
-    private String SERVER_NAME = "geronimo";
-    private String BASE_NAME = DOMAIN_NAME + ":J2EEServer=" + SERVER_NAME;
-
     private Naming naming = new Jsr77Naming();
     private Artifact baseId = new Artifact("test", "base", "1", "car");
     private final AbstractName serverName = naming.createRootName(baseId, "Server", "J2EEServer");
@@ -229,7 +225,7 @@
     }
 
     protected void setUp() throws Exception {
-        defaultEnvironment.getProperties().put(NameFactory.JSR77_BASE_NAME_PROPERTY, BASE_NAME);
+        super.setUp();
         cl = this.getClass().getClassLoader();
         kernel = KernelFactory.newInstance().createKernel("test");
         kernel.boot();
@@ -290,6 +286,7 @@
 
     protected void tearDown() throws Exception {
         kernel.shutdown();
+        super.tearDown();
     }
 
 
@@ -330,7 +327,6 @@
             } else {
                 Environment environment = new Environment();
                 environment.setConfigId(configId);
-                environment.getProperties().put(NameFactory.JSR77_BASE_NAME_PROPERTY, "geronimo.test:J2EEServer=geronimo");
                 configData.setAttribute("environment", environment);
                 configData.setAttribute("moduleType", ConfigurationModuleType.WAR);
                 configData.setAttribute("gBeanState", NO_OBJECTS_OS);

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java Wed Mar 29 14:16:54 2006
@@ -165,7 +165,9 @@
         }
     }
 
-    //TODO why not use String.split?
+    // why not use String.split? Because String.split works using regular expressions
+    // and this should be way faster, but write a benchmark it out if you have time.
+    // Also this code is way simpler.
     private static List split(String source, char delim) {
         List parts = new ArrayList();
         for (int index = source.indexOf(delim); index >= 0; index = source.indexOf(delim)) {
@@ -194,13 +196,6 @@
     }
 
     public String toString() {
-//        StringBuffer buf = new StringBuffer("AbstractName:");
-//        for (Iterator iterator = name.entrySet().iterator(); iterator.hasNext();) {
-//            Map.Entry entry = (Map.Entry) iterator.next();
-//            buf.append(",").append(entry.getKey()).append("=").append(entry.getValue());
-//        }
-//        buf.append(",artifact=").append(artifact);
-//        return buf.toString();
         return uri.toString();
     }
 

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanData.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanData.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanData.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanData.java Wed Mar 29 14:16:54 2006
@@ -16,7 +16,6 @@
  */
 package org.apache.geronimo.gbean;
 
-import javax.management.ObjectName;
 import java.io.Externalizable;
 import java.io.IOException;
 import java.io.ObjectInput;
@@ -61,10 +60,6 @@
         references = new HashMap(gbeanData.references);
         dependencies = new HashSet(gbeanData.dependencies);
         abstractName = gbeanData.abstractName;
-    }
-
-    public ObjectName getName() {
-        return abstractName == null? null: abstractName.getObjectName();
     }
 
     public AbstractName getAbstractName() {

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/AbstractGBeanReference.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/AbstractGBeanReference.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/AbstractGBeanReference.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/AbstractGBeanReference.java Wed Mar 29 14:16:54 2006
@@ -113,7 +113,11 @@
             try {
                 String setterName = referenceInfo.getSetterName();
                 Method setterMethod = gbeanInstance.getType().getMethod(setterName, new Class[] {proxyType});
-                setInvoker = new FastMethodInvoker(setterMethod);
+                if (NO_PROXY) {
+                    setInvoker = new ReflectionMethodInvoker(setterMethod);
+                } else {
+                    setInvoker = new FastMethodInvoker(setterMethod);
+                }
             } catch (NoSuchMethodException e) {
                 throw new InvalidConfigurationException("Setter method not found " + getDescription());
             }

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanAttribute.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanAttribute.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanAttribute.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanAttribute.java Wed Mar 29 14:16:54 2006
@@ -238,7 +238,11 @@
                     if (!getterMethod.getReturnType().equals(type)) {
                         throw new InvalidConfigurationException("Getter method of wrong type: " + getterMethod.getReturnType() + " expected " +getDescription());
                     }
-                    getInvoker = new FastMethodInvoker(getterMethod);
+                    if (AbstractGBeanReference.NO_PROXY) {
+                        getInvoker = new ReflectionMethodInvoker(getterMethod);
+                    } else {
+                        getInvoker = new FastMethodInvoker(getterMethod);
+                    }
                 } catch (NoSuchMethodException e) {
                     throw new InvalidConfigurationException("Getter method not found " +getDescription());
                 }
@@ -252,7 +256,11 @@
                 try {
                     String setterName = attributeInfo.getSetterName();
                     Method setterMethod = gbeanInstance.getType().getMethod(setterName, new Class[] {type});
-                    setInvoker = new FastMethodInvoker(setterMethod);
+                    if (AbstractGBeanReference.NO_PROXY) {
+                        setInvoker = new ReflectionMethodInvoker(setterMethod);
+                    } else {
+                        setInvoker = new FastMethodInvoker(setterMethod);
+                    }
                 } catch (NoSuchMethodException e) {
                     throw new InvalidConfigurationException("Setter method not found " + getDescription());
                 }

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstance.java Wed Mar 29 14:16:54 2006
@@ -398,10 +398,7 @@
         // tell everyone we are done
         lifecycleBroadcaster.fireUnloadedEvent();
 
-        if (manageableStore != null) {
-            kernel.getProxyManager().destroyProxy(manageableStore);
-            manageableStore = null;
-        }
+        manageableStore = null;
     }
 
     /**
@@ -732,12 +729,10 @@
 
     private void updateManageableAttribute(GBeanAttribute attribute, Object value) {
         if (manageableStore == null) {
-            Set set = kernel.listGBeans(new AbstractNameQuery(ManageableAttributeStore.class.getName()));
-            if (set.size() == 0) {
+            manageableStore = getManageableAttributeStore();
+            if (manageableStore == null) {
                 return;
             }
-            manageableStore = (ManageableAttributeStore) kernel.getProxyManager().createProxy((AbstractName) set.iterator().next(),
-                    ManageableAttributeStore.class);
         }
         String configName = abstractName.getArtifact().toString();
         if (configName != null) {
@@ -745,6 +740,19 @@
         } else {
             log.error("Unable to identify Configuration for GBean " + abstractName + ".  Manageable attribute " + attribute.getName() + " was not updated in persistent store.");
         }
+    }
+
+    private ManageableAttributeStore getManageableAttributeStore() {
+        Set set = kernel.listGBeans(new AbstractNameQuery(ManageableAttributeStore.class.getName()));
+        for (Iterator iterator = set.iterator(); iterator.hasNext();) {
+            AbstractName abstractName1 = (AbstractName) iterator.next();
+            try {
+                return (ManageableAttributeStore) kernel.getGBean(abstractName1);
+            } catch (GBeanNotFoundException e) {
+                // ignored... gbean was unregistered
+            }
+        }
+        return null;
     }
 
     private GBeanAttribute getAttributeByName(String name) throws NoSuchAttributeException {

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstanceState.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstanceState.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstanceState.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanInstanceState.java Wed Mar 29 14:16:54 2006
@@ -24,12 +24,11 @@
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.management.State;
 
-import javax.management.ObjectName;
 import java.util.Iterator;
 import java.util.Set;
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 386907 $ $Date$
  */
 public class GBeanInstanceState {
     private static final Log log = LogFactory.getLog(GBeanInstanceState.class);
@@ -313,7 +312,7 @@
             // check if all of the mbeans depending on us are stopped
             Set children = dependencyManager.getChildren(abstractName);
             for (Iterator i = children.iterator(); i.hasNext();) {
-                ObjectName child = (ObjectName) i.next();
+                AbstractName child = (AbstractName) i.next();
                 if (kernel.isLoaded(child)) {
                     try {
                         log.trace("Checking if child is stopped: child=" + child);

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanOperation.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanOperation.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanOperation.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanOperation.java Wed Mar 29 14:16:54 2006
@@ -88,7 +88,11 @@
         } else {
             try {
                 Method javaMethod = gbeanInstance.getType().getMethod(operationInfo.getMethodName(), types);
-                methodInvoker = new FastMethodInvoker(javaMethod);
+                if (AbstractGBeanReference.NO_PROXY) {
+                    methodInvoker = new ReflectionMethodInvoker(javaMethod);
+                } else {
+                    methodInvoker = new FastMethodInvoker(javaMethod);
+                }
             } catch (Exception e) {
                 throw new InvalidConfigurationException("Target does not have specified method (declared in a GBeanInfo operation):" +
                         " name=" + operationInfo.getName() +

Added: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/ReflectionMethodInvoker.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/ReflectionMethodInvoker.java?rev=389907&view=auto
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/ReflectionMethodInvoker.java (added)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/ReflectionMethodInvoker.java Wed Mar 29 14:16:54 2006
@@ -0,0 +1,45 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.gbean.runtime;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+
+/**
+ * @version $Rev$ $Date: 2005-12-10 18:48:27 -0800 (Sat, 10 Dec 2005) $
+ */
+public final class ReflectionMethodInvoker implements MethodInvoker {
+    private final Method method;
+
+    public ReflectionMethodInvoker(Method method) {
+        this.method = method;
+    }
+
+    public Object invoke(final Object target, final Object[] arguments) throws Exception {
+        try {
+            return method.invoke(target, arguments);
+        } catch (InvocationTargetException e) {
+            Throwable cause = e.getTargetException();
+            if (cause instanceof Exception) {
+                throw (Exception) cause;
+            } else if (cause instanceof Error) {
+                throw (Error) cause;
+            }
+            throw e;
+        }
+    }
+}



Mime
View raw message