geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r386907 [1/2] - in /geronimo/branches/1.1/modules: jetty-builder/src/java/org/apache/geronimo/jetty/deployment/ jetty-builder/src/test-resources/deployables/war5/WEB-INF/ jetty-builder/src/test-resources/plans/ jetty-builder/src/test/org/ap...
Date Sun, 19 Mar 2006 00:52:42 GMT
Author: djencks
Date: Sat Mar 18 16:52:38 2006
New Revision: 386907

URL: http://svn.apache.org/viewcvs?rev=386907&view=rev
Log:
Remove "enabled" flag from gbeans
Make the bootstrap config register as started
Clean up GBeanDependency
other minor kernel fixes
Fix jetty-builder module.

Modified:
    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-resources/deployables/war5/WEB-INF/geronimo-jetty.xml
    geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan1.xml
    geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan1A.xml
    geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan1B.xml
    geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan2.xml
    geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
    geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/ReferencePatterns.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanCollectionReference.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanDependency.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/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/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/config/SimpleConfigurationManager.java
    geronimo/branches/1.1/modules/system/src/test/org/apache/geronimo/system/configuration/LocalAttributeManagerTest.java

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=386907&r1=386906&r2=386907&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 Sat Mar 18 16:52:38 2006
@@ -45,7 +45,6 @@
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.ConfigurationData;
-import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.Repository;
@@ -91,7 +90,7 @@
 
 import javax.servlet.Servlet;
 import javax.transaction.UserTransaction;
-import javax.management.MalformedObjectNameException;
+
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -137,16 +136,16 @@
     private static final String JETTY_NAMESPACE = JettyWebAppDocument.type.getDocumentElementName().getNamespaceURI();
 
     public JettyModuleBuilder(Environment defaultEnvironment,
-                              Integer defaultSessionTimeoutSeconds,
-                              boolean defaultContextPriorityClassloader,
-                              List defaultWelcomeFiles,
-                              AbstractName jettyContainerName,
-                              Collection defaultServlets,
-                              Collection defaultFilters,
-                              Collection defaultFilterMappings,
-                              Object pojoWebServiceTemplate,
-                              WebServiceBuilder webServiceBuilder,
-                              Kernel kernel) throws GBeanNotFoundException {
+            Integer defaultSessionTimeoutSeconds,
+            boolean defaultContextPriorityClassloader,
+            List defaultWelcomeFiles,
+            AbstractName jettyContainerName,
+            Collection defaultServlets,
+            Collection defaultFilters,
+            Collection defaultFilterMappings,
+            Object pojoWebServiceTemplate,
+            WebServiceBuilder webServiceBuilder,
+            Kernel kernel) throws GBeanNotFoundException {
         super(kernel);
         this.defaultEnvironment = defaultEnvironment;
         this.defaultSessionTimeoutSeconds = (defaultSessionTimeoutSeconds == null) ? new Integer(30 * 60) : defaultSessionTimeoutSeconds;
@@ -237,8 +236,8 @@
         }
         AbstractName moduleName;
         if (earName == null) {
-            earName = Naming.createRootName(environment.getConfigId(), NameFactory.NULL, NameFactory.J2EE_APPLICATION);
-            moduleName = Naming.createChildName(earName, NameFactory.WEB_MODULE, environment.getConfigId().toString());
+            earName = naming.createRootName(environment.getConfigId(), NameFactory.NULL, NameFactory.J2EE_APPLICATION);
+            moduleName = naming.createChildName(earName, environment.getConfigId().toString(), NameFactory.WEB_MODULE);
         } else {
             moduleName = naming.createChildName(earName, targetPath, NameFactory.WEB_MODULE);
         }
@@ -305,7 +304,7 @@
         GerMessageDestinationType[] gerMessageDestinations = gerWebApp.getMessageDestinationArray();
 
         ENCConfigBuilder.registerMessageDestinations(moduleContext.getRefContext(), module.getName(), messageDestinations, gerMessageDestinations);
-        if((webApp.getSecurityConstraintArray().length > 0 || webApp.getSecurityRoleArray().length > 0) &&
+        if ((webApp.getSecurityConstraintArray().length > 0 || webApp.getSecurityRoleArray().length > 0) &&
                 !gerWebApp.isSetSecurityRealmName()) {
             throw new DeploymentException("web.xml includes security elements but Geronimo deployment plan is not provided or does not contain <security-realm-name> element necessary to configure security accordingly.");
         }
@@ -402,8 +401,8 @@
 
             webModuleData.setAttribute("sessionTimeoutSeconds",
                     (webApp.getSessionConfigArray().length == 1 && webApp.getSessionConfigArray(0).getSessionTimeout() != null) ?
-                    new Integer(webApp.getSessionConfigArray(0).getSessionTimeout().getBigIntegerValue().intValue() * 60) :
-                    defaultSessionTimeoutSeconds);
+                            new Integer(webApp.getSessionConfigArray(0).getSessionTimeout().getBigIntegerValue().intValue() * 60) :
+                            defaultSessionTimeoutSeconds);
 
             MimeMappingType[] mimeMappingArray = webApp.getMimeMappingArray();
             Map mimeMappingMap = new HashMap();
@@ -513,8 +512,8 @@
             for (int i = 0; i < servletMappingArray.length; i++) {
                 ServletMappingType servletMappingType = servletMappingArray[i];
                 String servletName = servletMappingType.getServletName().getStringValue().trim();
-                if(!knownServlets.contains(servletName)) {
-                    throw new DeploymentException("Servlet mapping refers to servlet '"+servletName+"' but no such servlet was found!");
+                if (!knownServlets.contains(servletName)) {
+                    throw new DeploymentException("Servlet mapping refers to servlet '" + servletName + "' but no such servlet was found!");
                 }
                 String urlPattern = servletMappingType.getUrlPattern().getStringValue().trim();
                 if (!knownServletMappings.contains(urlPattern)) {
@@ -545,7 +544,9 @@
                     //add a mapping to /*
 
                     GBeanData filterMappingGBeanData = new GBeanData(JettyFilterMapping.GBEAN_INFO);
-                    filterMappingGBeanData.setReferencePattern("Previous", previous);
+                    if (previous != null) {
+                        filterMappingGBeanData.setReferencePattern("Previous", previous);
+                    }
                     filterMappingGBeanData.setReferencePattern("JettyServletRegistration", moduleName);
                     String urlPattern = "/*";
                     filterMappingGBeanData.setAttribute("urlPattern", urlPattern);
@@ -593,7 +594,9 @@
                 FilterMappingType filterMappingType = filterMappingArray[i];
                 String filterName = filterMappingType.getFilterName().getStringValue().trim();
                 GBeanData filterMappingData = new GBeanData(JettyFilterMapping.GBEAN_INFO);
-                filterMappingData.setReferencePattern("Previous", previous);
+                if (previous != null) {
+                    filterMappingData.setReferencePattern("Previous", previous);
+                }
                 filterMappingData.setReferencePattern("JettyServletRegistration", moduleName);
                 AbstractName filterAbstractName = earContext.getNaming().createChildName(moduleName, filterName, NameFactory.WEB_FILTER);
 
@@ -677,7 +680,7 @@
 
             if (jettyWebApp.isSetSecurityRealmName()) {
                 if (earContext.getSecurityConfiguration() == null) {
-                     throw new DeploymentException("You have specified a <security-realm-name> for the webapp " + moduleName + " but no <security> configuration (role mapping) is supplied in the Geronimo plan for the web application (or the Geronimo plan for the EAR if the web app is in an EAR)");
+                    throw new DeploymentException("You have specified a <security-realm-name> for the webapp " + moduleName + " but no <security> configuration (role mapping) is supplied in the Geronimo plan for the web application (or the Geronimo plan for the EAR if the web app is in an EAR)");
                 }
                 String securityRealmName = jettyWebApp.getSecurityRealmName().trim();
                 webModuleData.setAttribute("securityRealmName", securityRealmName);
@@ -725,25 +728,25 @@
     /**
      * Adds the provided servlets, taking into account the load-on-startup ordering.
      *
-     * @param webModuleName     an <code>ObjectName</code> value
-     * @param moduleFile        a <code>JarFile</code> value
-     * @param servletTypes      a <code>ServletType[]</code> value, contains the <code>servlet</code> entries from <code>web.xml</code>.
-     * @param servletMappings   a <code>Map</code> value
-     * @param securityRoles     a <code>Set</code> value
-     * @param rolePermissions   a <code>Map</code> value
-     * @param portMap           a <code>Map</code> value
-     * @param webClassLoader    a <code>ClassLoader</code> value
-     * @param earContext        an <code>EARContext</code> value
-     * @throws DeploymentException          if an error occurs
+     * @param webModuleName   an <code>ObjectName</code> value
+     * @param moduleFile      a <code>JarFile</code> value
+     * @param servletTypes    a <code>ServletType[]</code> value, contains the <code>servlet</code> entries from <code>web.xml</code>.
+     * @param servletMappings a <code>Map</code> value
+     * @param securityRoles   a <code>Set</code> value
+     * @param rolePermissions a <code>Map</code> value
+     * @param portMap         a <code>Map</code> value
+     * @param webClassLoader  a <code>ClassLoader</code> value
+     * @param earContext      an <code>EARContext</code> value
+     * @throws DeploymentException if an error occurs
      */
     private void addServlets(AbstractName webModuleName,
-                             JarFile moduleFile,
-                             ServletType[] servletTypes,
-                             Map servletMappings,
-                             Set securityRoles,
-                             Map rolePermissions, Map portMap,
-                             ClassLoader webClassLoader,
-                             EARContext earContext) throws DeploymentException {
+            JarFile moduleFile,
+            ServletType[] servletTypes,
+            Map servletMappings,
+            Set securityRoles,
+            Map rolePermissions, Map portMap,
+            ClassLoader webClassLoader,
+            EARContext earContext) throws DeploymentException {
 
         // this TreeSet will order the ServletTypes based on whether
         // they have a load-on-startup element and what its value is
@@ -763,28 +766,41 @@
         // o.a.g.jetty.JettyFilterMapping which provided the example
         // of how to do this.
         // http://issues.apache.org/jira/browse/GERONIMO-645
-        ServletType previousServlet = null;
+        AbstractName previousServlet = null;
         for (Iterator servlets = loadOrder.iterator(); servlets.hasNext();) {
             ServletType servletType = (ServletType) servlets.next();
-            addServlet(webModuleName, moduleFile, previousServlet, servletType, servletMappings, securityRoles, rolePermissions, portMap, webClassLoader, earContext);
-            previousServlet = servletType;
+            previousServlet = addServlet(webModuleName, moduleFile, previousServlet, servletType, servletMappings, securityRoles, rolePermissions, portMap, webClassLoader, earContext);
         }
 
         // JACC v1.0 secion B.19
         addUnmappedJSPPermissions(securityRoles, rolePermissions);
     }
 
-    private void addServlet(AbstractName webModuleName,
-                            JarFile moduleFile,
-                            ServletType previousServlet,
-                            ServletType servletType,
-                            Map servletMappings,
-                            Set securityRoles,
-                            Map rolePermissions, Map portMap,
-                            ClassLoader webClassLoader,
-                            EARContext earContext) throws DeploymentException {
+    /**
+     * @param webModuleName
+     * @param moduleFile
+     * @param previousServlet
+     * @param servletType
+     * @param servletMappings
+     * @param securityRoles
+     * @param rolePermissions
+     * @param portMap
+     * @param webClassLoader
+     * @param earContext
+     * @return AbstractName of servlet gbean added
+     * @throws DeploymentException
+     */
+    private AbstractName addServlet(AbstractName webModuleName,
+            JarFile moduleFile,
+            AbstractName previousServlet,
+            ServletType servletType,
+            Map servletMappings,
+            Set securityRoles,
+            Map rolePermissions, Map portMap,
+            ClassLoader webClassLoader,
+            EARContext earContext) throws DeploymentException {
         String servletName = servletType.getServletName().getStringValue().trim();
-        AbstractName servletObjectName = earContext.getNaming().createChildName(webModuleName, servletName, NameFactory.SERVLET);
+        AbstractName servletAbstractName = earContext.getNaming().createChildName(webModuleName, servletName, NameFactory.SERVLET);
         GBeanData servletData;
         if (servletType.isSetServletClass()) {
             String servletClassName = servletType.getServletClass().getStringValue().trim();
@@ -801,11 +817,11 @@
                 throw new DeploymentException("Could not load javax.servlet.Servlet in web classloader", e);
             }
             if (baseServletClass.isAssignableFrom(servletClass)) {
-                servletData = new GBeanData(servletObjectName, JettyServletHolder.GBEAN_INFO);
+                servletData = new GBeanData(servletAbstractName, JettyServletHolder.GBEAN_INFO);
                 servletData.setAttribute("servletClass", servletClassName);
             } else {
                 servletData = new GBeanData(pojoWebServiceTemplate);
-                servletData.setAbstractName(servletObjectName);
+                servletData.setAbstractName(servletAbstractName);
                 //let the web service builder deal with configuring the gbean with the web service stack
                 Object portInfo = portMap.get(servletName);
                 if (portInfo == null) {
@@ -814,7 +830,7 @@
                 webServiceBuilder.configurePOJO(servletData, moduleFile, portInfo, servletClassName, webClassLoader);
             }
         } else if (servletType.isSetJspFile()) {
-            servletData = new GBeanData(servletObjectName, JettyServletHolder.GBEAN_INFO);
+            servletData = new GBeanData(servletAbstractName, JettyServletHolder.GBEAN_INFO);
             servletData.setAttribute("jspFile", servletType.getJspFile().getStringValue().trim());
             //TODO MAKE THIS CONFIGURABLE!!! Jetty uses the servlet mapping set up from the default-web.xml
             servletData.setAttribute("servletClass", "org.apache.jasper.servlet.JspServlet");
@@ -826,9 +842,7 @@
         // preserve the <load-on-startup> ordering.
         // http://issues.apache.org/jira/browse/GERONIMO-645
         if (null != previousServlet) {
-            String name = previousServlet.getServletName().getStringValue().trim();
-            AbstractName oName = earContext.getNaming().createChildName(webModuleName, name, NameFactory.SERVLET);
-            servletData.setReferencePattern("Previous", oName);
+            servletData.setReferencePattern("Previous", previousServlet);
         }
 
         //TODO in init param setter, add classpath if jspFile is not null.
@@ -861,6 +875,7 @@
         } catch (GBeanAlreadyExistsException e) {
             throw new DeploymentException("Could not add servlet gbean to context", e);
         }
+        return servletAbstractName;
     }
 
     private Map buildComponentContext(EARContext earContext, Module webModule, WebAppType webApp, JettyWebAppType jettyWebApp, UserTransaction userTransaction, ClassLoader cl) throws DeploymentException {
@@ -896,17 +911,17 @@
         infoBuilder.addInterface(ModuleBuilder.class);
 
         infoBuilder.setConstructor(new String[]{
-            "defaultEnvironment",
-            "defaultSessionTimeoutSeconds",
-            "defaultContextPriorityClassloader",
-            "defaultWelcomeFiles",
-            "jettyContainerObjectName",
-            "DefaultServlets",
-            "DefaultFilters",
-            "DefaultFilterMappings",
-            "PojoWebServiceTemplate",
-            "WebServiceBuilder",
-            "kernel"});
+                "defaultEnvironment",
+                "defaultSessionTimeoutSeconds",
+                "defaultContextPriorityClassloader",
+                "defaultWelcomeFiles",
+                "jettyContainerObjectName",
+                "DefaultServlets",
+                "DefaultFilters",
+                "DefaultFilterMappings",
+                "PojoWebServiceTemplate",
+                "WebServiceBuilder",
+                "kernel"});
         GBEAN_INFO = infoBuilder.getBeanInfo();
     }
 

Modified: geronimo/branches/1.1/modules/jetty-builder/src/test-resources/deployables/war5/WEB-INF/geronimo-jetty.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/jetty-builder/src/test-resources/deployables/war5/WEB-INF/geronimo-jetty.xml?rev=386907&r1=386906&r2=386907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/jetty-builder/src/test-resources/deployables/war5/WEB-INF/geronimo-jetty.xml (original)
+++ geronimo/branches/1.1/modules/jetty-builder/src/test-resources/deployables/war5/WEB-INF/geronimo-jetty.xml Sat Mar 18 16:52:38 2006
@@ -32,7 +32,7 @@
     <context-priority-classloader>false</context-priority-classloader>
     <resource-ref>
         <ref-name>jdbc/DB1</ref-name>
-        <target-name>DefaultDatabase</target-name>
+        <resource-link>DefaultDatabase</resource-link>
     </resource-ref>
     <security-realm-name>demo-properties-realm</security-realm-name>
     <sec:security>

Modified: geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan1.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan1.xml?rev=386907&r1=386906&r2=386907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan1.xml (original)
+++ geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan1.xml Sat Mar 18 16:52:38 2006
@@ -13,7 +13,7 @@
     <context-priority-classloader>false</context-priority-classloader>
     <resource-ref>
         <ref-name>jdbc/DB1</ref-name>
-        <target-name>DefaultDatabase</target-name>
+        <resource-link>DefaultDatabase</resource-link>
     </resource-ref>
     <security-realm-name>public-properties-realm</security-realm-name>
     <security default-role="UNASSIGNED" doas-current-caller="true">

Modified: geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan1A.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan1A.xml?rev=386907&r1=386906&r2=386907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan1A.xml (original)
+++ geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan1A.xml Sat Mar 18 16:52:38 2006
@@ -39,6 +39,6 @@
     </security>
     <resource-ref>
         <ref-name>jdbc/DB1</ref-name>
-        <target-name>DefaultDatabase</target-name>
+        <resource-link>DefaultDatabase</resource-link>
     </resource-ref>
 </web-app>

Modified: geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan1B.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan1B.xml?rev=386907&r1=386906&r2=386907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan1B.xml (original)
+++ geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan1B.xml Sat Mar 18 16:52:38 2006
@@ -39,7 +39,7 @@
     </security>
     <resource-ref>
         <ref-name>jdbc/DB1</ref-name>
-        <target-name>DefaultDatabase</target-name>
+        <resource-link>DefaultDatabase</resource-link>
     </resource-ref>
     <gbean name="foo" class="org.apache.geronimo.Foo"/>
 </web-app>

Modified: geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan2.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan2.xml?rev=386907&r1=386906&r2=386907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan2.xml (original)
+++ geronimo/branches/1.1/modules/jetty-builder/src/test-resources/plans/plan2.xml Sat Mar 18 16:52:38 2006
@@ -11,7 +11,7 @@
     <context-priority-classloader>false</context-priority-classloader>
     <resource-ref>
         <ref-name>jdbc/DB1</ref-name>
-        <target-name>DefaultDatabase</target-name>
+        <resource-link>DefaultDatabase</resource-link>
     </resource-ref>
     <security-realm-name>public-properties-realm</security-realm-name>
     <security default-role="UNASSIGNED" doas-current-caller="true">

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=386907&r1=386906&r2=386907&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 Sat Mar 18 16:52:38 2006
@@ -21,6 +21,7 @@
 import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinatorGBean;
 import org.apache.geronimo.deployment.DeploymentContext;
 import org.apache.geronimo.deployment.util.UnpackedJarFile;
+import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
@@ -33,38 +34,39 @@
 import org.apache.geronimo.j2ee.deployment.ServiceReferenceBuilder;
 import org.apache.geronimo.j2ee.deployment.UnavailableWebServiceBuilder;
 import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
-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.j2ee.management.impl.J2EEServerImpl;
 import org.apache.geronimo.jetty.JettyContainerImpl;
 import org.apache.geronimo.jetty.connector.HTTPConnector;
+import org.apache.geronimo.kernel.Jsr77Naming;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelFactory;
+import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
-import org.apache.geronimo.kernel.config.KernelConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
+import org.apache.geronimo.kernel.config.ConfigurationUtil;
+import org.apache.geronimo.kernel.config.EditableKernelConfigurationManager;
 import org.apache.geronimo.kernel.config.InvalidConfigException;
 import org.apache.geronimo.kernel.config.NoSuchConfigException;
-import org.apache.geronimo.kernel.jmx.JMXUtil;
+import org.apache.geronimo.kernel.config.ConfigurationResolver;
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
 import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
 import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.kernel.repository.ImportType;
-import org.apache.geronimo.security.SecurityServiceImpl;
 import org.apache.geronimo.system.serverinfo.BasicServerInfo;
 import org.apache.geronimo.transaction.context.TransactionContextManagerGBean;
 import org.apache.geronimo.transaction.manager.TransactionManagerImplGBean;
 
-import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 import javax.naming.Reference;
 import javax.xml.namespace.QName;
+
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.IOException;
@@ -74,6 +76,7 @@
 import java.net.URL;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
@@ -88,30 +91,20 @@
     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");
+
     protected Kernel kernel;
-    private GBeanData container;
-    private ObjectName containerName;
-    private ObjectName connectorName;
-    private GBeanData connector;
-    private GBeanData securityServiceGBean;
-    private ObjectName securityServiceName;
-    private ObjectName serverInfoName;
-    private GBeanData serverInfoGBean;
-    private ObjectName tmName;
-    private ObjectName ctcName;
-    private GBeanData tm;
-    private GBeanData ctc;
-    private ObjectName tcmName;
-    private GBeanData tcm;
+    private AbstractName ctcName;
+    private AbstractName tcmName;
     private ClassLoader cl;
-    private J2eeContext moduleContext = new J2eeContextImpl(DOMAIN_NAME, SERVER_NAME, "null", NameFactory.WEB_MODULE, "jettyTest", null, null);
     private JettyModuleBuilder builder;
     private File basedir = new File(System.getProperty("basedir", "."));
-    private String PARENT_ARTIFACT_ID = "geronimo/Foo/1/car";
-    private String ARTIFACT_ID = "foo/bar/1/car";
-    private Artifact parentId = Artifact.create(PARENT_ARTIFACT_ID);
+    private Artifact webModuleArtifact = new Artifact("foo", "bar", "1", "car");
     private Environment defaultEnvironment = new Environment();
     private ConfigurationManager configurationManager;
+    private ConfigurationStore configStore;
 
     public void testDeployWar4() throws Exception {
         File outputPath = new File(basedir, "target/test-resources/deployables/war4");
@@ -121,54 +114,51 @@
         File path = new File(basedir, "src/test-resources/deployables/war4");
         UnpackedJarFile jarFile = new UnpackedJarFile(path);
         Module module = builder.createModule(null, jarFile, kernel.getNaming());
-        EARContext earContext = createEARContext(outputPath, defaultEnvironment);
+        Repository repository = null;
+
+        AbstractName moduleName = module.getModuleName();
+        EARContext earContext = createEARContext(outputPath, defaultEnvironment, repository, configStore, moduleName);
         module.setEarContext(earContext);
-        ObjectName serverName = earContext.getServerName();
-        GBeanData server = new GBeanData(serverName, J2EEServerImpl.GBEAN_INFO);
-        start(server);
         builder.initContext(earContext, module, cl);
         builder.addGBeans(earContext, module, cl, null);
+        ConfigurationData configurationData = earContext.getConfigurationData();
         earContext.close();
         module.close();
 
-        ConfigurationStore configurationStore = new MockConfigStore(outputPath.toURL());
-        Configuration configuration = configurationManager.loadConfiguration(earContext.getConfigurationData(), configurationStore);
+        Configuration configuration = configurationManager.loadConfiguration(configurationData);
         configurationManager.startConfiguration(configuration);
 
-        assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(ObjectName.getInstance(BASE_NAME + ",J2EEApplication=null,j2eeType=WebModule,name=" + ARTIFACT_ID)));
-        Set names = kernel.listGBeans(ObjectName.getInstance(DOMAIN_NAME + ":J2EEApplication=null,WebModule=" + ARTIFACT_ID + ",*"));
-        System.out.println("Object names: " + names);
+        assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(moduleName));
+        Set names = configuration.findGBeans(new AbstractNameQuery(moduleName.getArtifact(), Collections.EMPTY_MAP));
+        System.out.println("names: " + names);
         for (Iterator iterator = names.iterator(); iterator.hasNext();) {
-            ObjectName objectName = (ObjectName) iterator.next();
+            AbstractName objectName = (AbstractName) iterator.next();
             assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(objectName));
         }
-        GBeanData filterMapping2Data = kernel.getGBeanData(ObjectName.getInstance(BASE_NAME + ",J2EEApplication=null,Servlet=Servlet1,WebFilter=Filter2,WebModule=" + ARTIFACT_ID + ",j2eeType=WebFilterMapping"));
 
         configurationManager.stopConfiguration(configuration);
         configurationManager.unloadConfiguration(configuration);
 
-
-        //what is this testing?
-        configuration = configurationManager.loadConfiguration(earContext.getConfigurationData(), configurationStore);
-        configurationManager.startConfiguration(configuration);
-        configurationManager.stopConfiguration(configuration);
-        configurationManager.unloadConfiguration(configuration);
     }
 
-    private EARContext createEARContext(File outputPath, Environment environment) throws MalformedObjectNameException, DeploymentException {
-        EARContext earContext = new EARContext(outputPath,
+    private EARContext createEARContext(File outputPath, Environment environment, Repository repository, ConfigurationStore configStore, AbstractName moduleName) throws DeploymentException {
+        return new EARContext(outputPath,
                 environment,
                 ConfigurationModuleType.WAR,
-                serverName, moduleContext.getJ2eeApplicationName(),
-                tcmName,
-                ctcName,
+                naming,
+                repository,
+                configStore,
+                new AbstractNameQuery(serverName),
+                moduleName,
+                new AbstractNameQuery(tcmName),
+                new AbstractNameQuery(ctcName),
                 null,
                 null,
                 null,
                 new RefContext(new EJBReferenceBuilder() {
 
 
-                    public Reference createCORBAReference(Configuration configuration, AbstractNameQuery containerNameQuery, URI nsCorbaloc, String objectName, String home) throws DeploymentException {
+                    public Reference createCORBAReference(Configuration configuration, AbstractNameQuery containerNameQuery, URI nsCorbaloc, String objectName, String home) {
                         return null;
                     }
 
@@ -176,104 +166,92 @@
                         return null;
                     }
 
-                    public Reference createEJBRemoteRef(String requiredModule, String optionalModule, String name, Artifact targetConfigId, AbstractNameQuery query, boolean isSession, String home, String remote, Configuration configuration) throws DeploymentException {
+                    public Reference createEJBRemoteRef(String requiredModule, String optionalModule, String name, Artifact targetConfigId, AbstractNameQuery query, boolean isSession, String home, String remote, Configuration configuration) {
                         return null;
                     }
 
-                    public Reference createEJBLocalRef(String requiredModule, String optionalModule, String name, Artifact targetConfigId, AbstractNameQuery query, boolean isSession, String localHome, String local, Configuration configuration) throws DeploymentException {
+                    public Reference createEJBLocalRef(String requiredModule, String optionalModule, String name, Artifact targetConfigId, AbstractNameQuery query, boolean isSession, String localHome, String local, Configuration configuration) {
                         return null;
                     }
 
                 },
-                new ResourceReferenceBuilder() {
-
-                    public Reference createResourceRef(AbstractNameQuery containerId, Class iface, Configuration configuration) throws DeploymentException {
-                        return null;
-                    }
-
-                    public Reference createAdminObjectRef(AbstractNameQuery containerId, Class iface, Configuration configuration) throws DeploymentException {
-                        return null;
-                    }
-
-                    public ObjectName locateResourceName(ObjectName query) throws DeploymentException {
-                        return null;
-                    }
-
-                    public GBeanData locateActivationSpecInfo(AbstractNameQuery nameQuery, String messageListenerInterface, Configuration configuration) throws DeploymentException {
-                        return null;
-                    }
-
-                    public GBeanData locateResourceAdapterGBeanData(GBeanData resourceAdapterModuleData) throws DeploymentException {
-                        return null;
-                    }
-
-                    public GBeanData locateAdminObjectInfo(GBeanData resourceAdapterModuleData, String adminObjectInterfaceName) throws DeploymentException {
-                        return null;
-                    }
+                        new ResourceReferenceBuilder() {
 
-                    public GBeanData locateConnectionFactoryInfo(GBeanData resourceAdapterModuleData, String connectionFactoryInterfaceName) throws DeploymentException {
-                        return null;
-                    }
-                },
-                new ServiceReferenceBuilder() {
-                    //it could return a Service or a Reference, we don't care
-                    public Object createService(Class serviceInterface, URI wsdlURI, URI jaxrpcMappingURI, QName serviceQName, Map portComponentRefMap, List handlerInfos, Object serviceRefType, DeploymentContext deploymentContext, Module module, ClassLoader classLoader) throws DeploymentException {
-                        return null;
-                    }
-                }));
-                return earContext;
+                            public Reference createResourceRef(AbstractNameQuery containerId, Class iface, Configuration configuration) {
+                                return null;
+                            }
+
+                            public Reference createAdminObjectRef(AbstractNameQuery containerId, Class iface, Configuration configuration) {
+                                return null;
+                            }
+
+                            public ObjectName locateResourceName(ObjectName query) {
+                                return null;
+                            }
+
+                            public GBeanData locateActivationSpecInfo(AbstractNameQuery nameQuery, String messageListenerInterface, Configuration configuration) {
+                                return null;
+                            }
+
+                            public GBeanData locateResourceAdapterGBeanData(GBeanData resourceAdapterModuleData) {
+                                return null;
+                            }
+
+                            public GBeanData locateAdminObjectInfo(GBeanData resourceAdapterModuleData, String adminObjectInterfaceName) {
+                                return null;
+                            }
+
+                            public GBeanData locateConnectionFactoryInfo(GBeanData resourceAdapterModuleData, String connectionFactoryInterfaceName) {
+                                return null;
+                            }
+                        },
+                        new ServiceReferenceBuilder() {
+                            //it could return a Service or a Reference, we don't care
+                            public Object createService(Class serviceInterface, URI wsdlURI, URI jaxrpcMappingURI, QName serviceQName, Map portComponentRefMap, List handlerInfos, Object serviceRefType, DeploymentContext deploymentContext, Module module, ClassLoader classLoader) {
+                                return null;
+                            }
+                        }));
     }
 
     private void recursiveDelete(File path) {
         //does not delete top level dir passed in
         File[] listing = path.listFiles();
-        for (int i = 0; i < ((listing == null) ? 0 : listing.length); i++) {
-            File file = listing[i];
-            if (file.isDirectory()) {
-                recursiveDelete(file);
+        if (listing != null) {
+            for (int i = 0; i < listing.length; i++) {
+                File file = listing[i];
+                if (file.isDirectory()) {
+                    recursiveDelete(file);
+                }
+                file.delete();
             }
-            file.delete();
         }
     }
 
     protected void setUp() throws Exception {
         defaultEnvironment.getProperties().put(NameFactory.JSR77_BASE_NAME_PROPERTY, BASE_NAME);
         cl = this.getClass().getClassLoader();
-        containerName = NameFactory.getWebComponentName(null, null, null, null, "jettyContainer", "WebResource", moduleContext);
-        connectorName = NameFactory.getWebComponentName(null, null, null, null, "jettyConnector", "WebResource", moduleContext);
-        //        webModuleName = NameFactory.getWebComponentName(null, null, null, null, NameFactory.WEB_MODULE, "WebResource", moduleContext);
-
-        tmName = NameFactory.getComponentName(null, null, null, null, null, "TransactionManager", NameFactory.TRANSACTION_MANAGER, moduleContext);
-        tcmName = NameFactory.getComponentName(null, null, null, null, null, "TransactionContextManager", NameFactory.TRANSACTION_CONTEXT_MANAGER, moduleContext);
-        ctcName = new ObjectName("geronimo.test:role=ConnectionTrackingCoordinator");
-
-        kernel = KernelFactory.newInstance().createKernel("foo");
+        kernel = KernelFactory.newInstance().createKernel("test");
         kernel.boot();
 
-        GBeanData store = new GBeanData(JMXUtil.getObjectName("foo:j2eeType=ConfigurationStore,name=mock"), MockConfigStore.GBEAN_INFO);
-        kernel.loadGBean(store, this.getClass().getClassLoader());
-        kernel.startGBean(store.getName());
-
-        GBeanData artifactManager = new GBeanData(JMXUtil.getObjectName("foo:name=ArtifactManager"), DefaultArtifactManager.GBEAN_INFO);
-        kernel.loadGBean(artifactManager, this.getClass().getClassLoader());
-        kernel.startGBean(artifactManager.getName());
-
-        GBeanData artifactResolver = new GBeanData(JMXUtil.getObjectName("foo:name=ArtifactResolver"), DefaultArtifactResolver.GBEAN_INFO);
-        artifactResolver.setReferencePattern("ArtifactManager", artifactManager.getName());
-        kernel.loadGBean(artifactResolver, this.getClass().getClassLoader());
-        kernel.startGBean(artifactResolver.getName());
-
-        ObjectName configurationManagerName = new ObjectName(":j2eeType=ConfigurationManager,name=Basic");
-        GBeanData configurationManagerData = new GBeanData(configurationManagerName, KernelConfigurationManager.GBEAN_INFO);
-        configurationManagerData.setReferencePattern("Stores", store.getName());
-        configurationManagerData.setReferencePattern("ArtifactManager", artifactManager.getName());
-        configurationManagerData.setReferencePattern("ArtifactResolver", artifactResolver.getName());
-        kernel.loadGBean(configurationManagerData, getClass().getClassLoader());
-        kernel.startGBean(configurationManagerName);
-        configurationManager = (ConfigurationManager) kernel.getProxyManager().createProxy(configurationManagerName, ConfigurationManager.class);
+        ConfigurationData bootstrap = new ConfigurationData(baseId, naming);
+
+        bootstrap.addGBean("ServerInfo", BasicServerInfo.GBEAN_INFO).setAttribute("baseDirectory", ".");
+
+        AbstractName configStoreName = bootstrap.addGBean("MockConfigurationStore", MockConfigStore.GBEAN_INFO).getAbstractName();
+
+        GBeanData artifactManagerData = bootstrap.addGBean("ArtifactManager", DefaultArtifactManager.GBEAN_INFO);
+
+        GBeanData artifactResolverData = bootstrap.addGBean("ArtifactResolver", DefaultArtifactResolver.GBEAN_INFO);
+        artifactResolverData.setReferencePattern("ArtifactManager", artifactManagerData.getAbstractName());
 
-        configurationManager.loadConfiguration(parentId);
-        configurationManager.startConfiguration(parentId);
+        GBeanData configurationManagerData = bootstrap.addGBean("ConfigurationManager", EditableKernelConfigurationManager.GBEAN_INFO);
+        configurationManagerData.setReferencePattern("ArtifactManager", artifactManagerData.getAbstractName());
+        configurationManagerData.setReferencePattern("ArtifactResolver", artifactResolverData.getAbstractName());
+        configurationManagerData.setReferencePattern("Stores", configStoreName);
+        bootstrap.addGBean(configurationManagerData);
+
+        GBeanData serverData = new GBeanData(serverName, J2EEServerImpl.GBEAN_INFO);
+        bootstrap.addGBean(serverData);
 
         Collection defaultServlets = new HashSet();
         Collection defaultFilters = new HashSet();
@@ -281,74 +259,41 @@
         Object pojoWebServiceTemplate = null;
         WebServiceBuilder webServiceBuilder = new UnavailableWebServiceBuilder();
 
-        serverInfoName = new ObjectName("geronimo.system:name=ServerInfo");
-        serverInfoGBean = new GBeanData(serverInfoName, BasicServerInfo.GBEAN_INFO);
-        serverInfoGBean.setAttribute("baseDirectory", ".");
-        start(serverInfoGBean);
-
-        //install the policy configuration factory
-        securityServiceName = new ObjectName("foo:j2eeType=SecurityService");
-        securityServiceGBean = new GBeanData(securityServiceName, SecurityServiceImpl.GBEAN_INFO);
-        securityServiceGBean.setReferencePattern("ServerInfo", serverInfoName);
-        securityServiceGBean.setAttribute("policyConfigurationFactory", "org.apache.geronimo.security.jacc.GeronimoPolicyConfigurationFactory");
-        securityServiceGBean.setAttribute("policyProvider", "org.apache.geronimo.security.jacc.GeronimoPolicy");
-        start(securityServiceGBean);
-
-        defaultEnvironment.addDependency(parentId, ImportType.ALL);
-        Artifact artifact = Artifact.create("foo/bar/1/car");
-        defaultEnvironment.setConfigId(artifact);
-        builder = new JettyModuleBuilder(defaultEnvironment, new Integer(1800), false, Collections.EMPTY_LIST, containerName, defaultServlets, defaultFilters, defaultFilterMappings, pojoWebServiceTemplate, webServiceBuilder, kernel);
-
-        container = new GBeanData(containerName, JettyContainerImpl.GBEAN_INFO);
+        GBeanData containerData = bootstrap.addGBean("JettyContainer", JettyContainerImpl.GBEAN_INFO);
+        AbstractName containerName = containerData.getAbstractName();
 
-        connector = new GBeanData(connectorName, HTTPConnector.GBEAN_INFO);
+        GBeanData connector = bootstrap.addGBean("JettyConnector", HTTPConnector.GBEAN_INFO);
         connector.setAttribute("port", new Integer(5678));
         connector.setAttribute("maxThreads", new Integer(50));
         connector.setAttribute("minThreads", new Integer(10));
         connector.setReferencePattern("JettyContainer", containerName);
 
-        start(container);
-        start(connector);
-
-        tm = new GBeanData(tmName, TransactionManagerImplGBean.GBEAN_INFO);
-        Set patterns = new HashSet();
-        patterns.add(ObjectName.getInstance("geronimo.server:j2eeType=JCAManagedConnectionFactory,*"));
+        GBeanData tm = bootstrap.addGBean("TransactionManager", TransactionManagerImplGBean.GBEAN_INFO);
         tm.setAttribute("defaultTransactionTimeoutSeconds", new Integer(10));
-        tm.setReferencePatterns("ResourceManagers", patterns);
-        start(tm);
-        tcm = new GBeanData(tcmName, TransactionContextManagerGBean.GBEAN_INFO);
-        tcm.setReferencePattern("TransactionManager", tmName);
-        start(tcm);
-        ctc = new GBeanData(ctcName, ConnectionTrackingCoordinatorGBean.GBEAN_INFO);
-        start(ctc);
 
+        GBeanData tcm = bootstrap.addGBean("TransactionContextManager", TransactionContextManagerGBean.GBEAN_INFO);
+        tcm.setReferencePattern("TransactionManager", tm.getAbstractName());
+        tcmName = tcm.getAbstractName();
+        ctcName = bootstrap.addGBean("ConnectionTrackingCoordinator", ConnectionTrackingCoordinatorGBean.GBEAN_INFO).getAbstractName();
+
+        ConfigurationUtil.loadBootstrapConfiguration(kernel, bootstrap, getClass().getClassLoader());
+
+        configurationManager = ConfigurationUtil.getEditableConfigurationManager(kernel);
+        configStore = (ConfigurationStore) kernel.getGBean(configStoreName);
+        configStore.install(bootstrap);
 
+        defaultEnvironment.addDependency(baseId, ImportType.ALL);
+        defaultEnvironment.setConfigId(webModuleArtifact);
+        builder = new JettyModuleBuilder(defaultEnvironment, new Integer(1800), false, Collections.EMPTY_LIST, containerName, defaultServlets, defaultFilters, defaultFilterMappings, pojoWebServiceTemplate, webServiceBuilder, kernel);
     }
 
     protected void tearDown() throws Exception {
-        stop(ctcName);
-        stop(tmName);
-        stop(serverInfoName);
-        stop(securityServiceName);
-        stop(connectorName);
-        stop(containerName);
         kernel.shutdown();
     }
 
-    private void start(GBeanData gbeanData) throws Exception {
-        kernel.loadGBean(gbeanData, cl);
-        kernel.startGBean(gbeanData.getName());
-        if (kernel.getGBeanState(gbeanData.getName()) != State.RUNNING_INDEX) {
-            fail("gbean not started: " + gbeanData.getName());
-        }
-    }
-
-    private void stop(ObjectName name) throws Exception {
-        kernel.stopGBean(name);
-        kernel.unloadGBean(name);
-    }
 
     public static class MockConfigStore implements ConfigurationStore {
+        private Map configs = new HashMap();
 
         URL baseURL;
 
@@ -360,20 +305,35 @@
         }
 
         public void install(ConfigurationData configurationData) throws IOException, InvalidConfigException {
+            configs.put(configurationData.getId(), configurationData);
         }
 
         public void uninstall(Artifact configID) throws NoSuchConfigException, IOException {
+            configs.remove(configID);
         }
 
         public GBeanData loadConfiguration(Artifact configId) throws NoSuchConfigException, IOException, InvalidConfigException {
-            ObjectName configurationObjectName = Configuration.getConfigurationObjectName(configId);
+            AbstractName configurationObjectName = Configuration.getConfigurationAbstractName(configId);
             GBeanData configData = new GBeanData(configurationObjectName, 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("gBeanState", NO_OBJECTS_OS);
-
+            if (configs.containsKey(configId)) {
+                ConfigurationData configurationData = (ConfigurationData) configs.get(configId);
+                configData.setAttribute("moduleType", configurationData.getModuleType());
+                Environment environment = configurationData.getEnvironment();
+                configData.setAttribute("environment", environment);
+                configData.setAttribute("gBeanState", Configuration.storeGBeans(configurationData.getGBeans()));
+                configData.setAttribute("classPath", configurationData.getClassPath());
+
+                ConfigurationResolver configurationResolver = new ConfigurationResolver(configurationData.getEnvironment().getConfigId(), this, Collections.EMPTY_SET, new DefaultArtifactResolver(null, Collections.EMPTY_SET));
+                configData.setAttribute("configurationResolver", configurationResolver);
+
+            } 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);
+            }
             return configData;
         }
 
@@ -404,7 +364,6 @@
         static {
             GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(MockConfigStore.class, NameFactory.CONFIGURATION_STORE);
             infoBuilder.addInterface(ConfigurationStore.class);
-//            infoBuilder.setConstructor(new String[] {"kernel"});
             GBEAN_INFO = infoBuilder.getBeanInfo();
 
             ByteArrayOutputStream baos = new ByteArrayOutputStream();

Modified: geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java?rev=386907&r1=386906&r2=386907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java (original)
+++ geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java Sat Mar 18 16:52:38 2006
@@ -5,8 +5,12 @@
 import org.apache.geronimo.deployment.xbeans.ArtifactType;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
+import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
-import org.apache.geronimo.kernel.jmx.JMXUtil;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.Jsr77Naming;
+import org.apache.geronimo.kernel.Naming;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.schema.SchemaConversionUtils;
 import org.apache.geronimo.web.deployment.GenericToSpecificPlanConverter;
@@ -19,7 +23,6 @@
 import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlObject;
 
-import javax.management.ObjectName;
 import javax.xml.namespace.QName;
 import java.io.File;
 import java.net.URL;
@@ -33,9 +36,12 @@
 public class PlanParsingTest extends TestCase {
     private ClassLoader classLoader = this.getClass().getClassLoader();
 
-    ObjectName jettyContainerObjectName = JMXUtil.getObjectName("test:type=JettyContainer");
-    ObjectName pojoWebServiceTemplate = null;
-    WebServiceBuilder webServiceBuilder = null;
+    private Naming naming = new Jsr77Naming();
+    private Artifact baseId = new Artifact("test", "base", "1", "car");
+    private AbstractName baseRootName = naming.createRootName(baseId, "root", NameFactory.SERVICE_MODULE);
+    private AbstractName jettyContainerObjectName = naming.createChildName(baseRootName, "jettyContainer", NameFactory.GERONIMO_SERVICE);
+    private AbstractName pojoWebServiceTemplate = null;
+    private WebServiceBuilder webServiceBuilder = null;
     private Environment defaultEnvironment = new Environment();
     private JettyModuleBuilder builder;
 
@@ -108,7 +114,7 @@
         webApp.setContextPriorityClassloader(false);
         GerResourceRefType ref = webApp.addNewResourceRef();
         ref.setRefName("ref");
-        ref.setTargetName("target");
+        ref.setResourceLink("target");
 
         SchemaConversionUtils.validateDD(webApp);
         System.out.println(webApp.toString());

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/ReferencePatterns.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/ReferencePatterns.java?rev=386907&r1=386906&r2=386907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/ReferencePatterns.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/ReferencePatterns.java Sat Mar 18 16:52:38 2006
@@ -17,12 +17,11 @@
 
 package org.apache.geronimo.gbean;
 
-import java.util.Set;
+import java.io.Serializable;
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
-import java.util.Collections;
-import java.io.Serializable;
-import javax.management.ObjectName;
+import java.util.Set;
 
 /**
  * @version $Rev:$ $Date:$
@@ -43,9 +42,6 @@
             } else if (pattern instanceof AbstractNameQuery) {
                 AbstractNameQuery nameQuery = (AbstractNameQuery) pattern;
                 this.patterns.add(nameQuery);
-            } else if (pattern instanceof ObjectName) {
-                ObjectName objectName = (ObjectName) pattern;
-                this.patterns.add(objectName);
             } else {
                 throw new IllegalArgumentException("Unknown pattern type: " + pattern);
             }
@@ -59,20 +55,23 @@
     }
 
     public ReferencePatterns(AbstractName abstractName) {
+        if (abstractName == null) {
+            throw new IllegalArgumentException("parameter abstractName is null");
+        }
         this.abstractName = abstractName;
         this.patterns = null;
     }
 
     public Set getPatterns() {
         if (patterns == null) {
-            throw new IllegalStateException("This is resolved");
+            throw new IllegalStateException("This is resolved to: " + abstractName);
         }
         return patterns;
     }
 
     public AbstractName getAbstractName() {
         if (abstractName == null) {
-            throw new IllegalStateException("This is not resolved");
+            throw new IllegalStateException("This is not resolved with patterns: " + patterns);
         }
         return abstractName;
     }

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanCollectionReference.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanCollectionReference.java?rev=386907&r1=386906&r2=386907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanCollectionReference.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanCollectionReference.java Sat Mar 18 16:52:38 2006
@@ -21,6 +21,7 @@
 import org.apache.geronimo.gbean.GReferenceInfo;
 import org.apache.geronimo.gbean.InvalidConfigurationException;
 import org.apache.geronimo.gbean.ReferencePatterns;
+import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.lifecycle.LifecycleAdapter;
 import org.apache.geronimo.kernel.lifecycle.LifecycleListener;
@@ -31,7 +32,7 @@
 import java.util.Set;
 
 /**
- * @version $Rev: 384141 $ $Date$
+ * @version $Rev:386515 $ $Date$
  */
 public class GBeanCollectionReference extends AbstractGBeanReference {
     /**
@@ -55,13 +56,23 @@
     private final LifecycleListener listener;
 
     public GBeanCollectionReference(GBeanInstance gbeanInstance, GReferenceInfo referenceInfo, Kernel kernel, ReferencePatterns referencePatterns) throws InvalidConfigurationException {
-        super(gbeanInstance, referenceInfo, kernel, !(referencePatterns == null || referencePatterns.getPatterns().isEmpty()));
+        super(gbeanInstance, referenceInfo, kernel, hasTargets(referencePatterns));
         listener = createLifecycleListener();
         if (referencePatterns != null) {
-            setPatterns(referencePatterns.getPatterns());
+            setReferencePatterns(referencePatterns);
         }
     }
 
+    private static boolean hasTargets(ReferencePatterns referencePatterns) {
+        if (referencePatterns == null) {
+            return false;
+        }
+        if (referencePatterns.isResolved()) {
+            return true;
+        }
+        return !referencePatterns.getPatterns().isEmpty();
+    }
+
     public synchronized boolean start() {
         // We only need to start if there are patterns and we don't already have a proxy
         if (!patterns.isEmpty() && getProxy() == null) {
@@ -95,49 +106,40 @@
 
     protected LifecycleListener createLifecycleListener() {
         return new LifecycleAdapter() {
-                    public void running(AbstractName abstractName) {
-                        addTarget(abstractName);
-                    }
-
-                    public void stopping(AbstractName abstractName) {
-                        removeTarget(abstractName);
-                    }
-
-                    public void stopped(AbstractName abstractName) {
-                        removeTarget(abstractName);
-                    }
-
-                    public void failed(AbstractName abstractName) {
-                        removeTarget(abstractName);
-                    }
-
-                    public void unloaded(AbstractName abstractName) {
-                        removeTarget(abstractName);
-                    }
-                };
+            public void running(AbstractName abstractName) {
+                addTarget(abstractName);
+            }
+
+            public void stopping(AbstractName abstractName) {
+                removeTarget(abstractName);
+            }
+
+            public void stopped(AbstractName abstractName) {
+                removeTarget(abstractName);
+            }
+
+            public void failed(AbstractName abstractName) {
+                removeTarget(abstractName);
+            }
+
+            public void unloaded(AbstractName abstractName) {
+                removeTarget(abstractName);
+            }
+        };
     }
 
     public final synchronized Set getPatterns() {
         return patterns;
     }
 
-    public final synchronized void setPatterns(Set patterns) {
+    public final synchronized void setReferencePatterns(ReferencePatterns referencePatterns) {
         if (isOnline) {
             throw new IllegalStateException("Pattern set can not be modified while online");
         }
-
-        if (patterns == null || patterns.isEmpty() || (patterns.size() == 1 && patterns.iterator().next() == null)) {
-            this.patterns = Collections.EMPTY_SET;
+        if (referencePatterns.isResolved()) {
+            this.patterns = Collections.unmodifiableSet(Collections.singleton(new AbstractNameQuery(referencePatterns.getAbstractName())));
         } else {
-            patterns = new HashSet(patterns);
-            for (Iterator iterator = this.patterns.iterator(); iterator.hasNext();) {
-                if (iterator.next() == null) {
-                    iterator.remove();
-                    //there can be at most one null value in a set.
-                    break;
-                }
-            }
-            this.patterns = Collections.unmodifiableSet(patterns);
+            this.patterns = Collections.unmodifiableSet(referencePatterns.getPatterns());
         }
     }
 

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanDependency.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanDependency.java?rev=386907&r1=386906&r2=386907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanDependency.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/runtime/GBeanDependency.java Sat Mar 18 16:52:38 2006
@@ -33,7 +33,7 @@
 public final class GBeanDependency {
 
 
-    private static final Log log = LogFactory.getLog(GBeanSingleReference.class);
+    private static final Log log = LogFactory.getLog(GBeanDependency.class);
 
     /**
      * The GBeanInstance to which this reference belongs.
@@ -55,10 +55,6 @@
      */
     private final Kernel kernel;
 
-    /**
-     * Is the GBean waitng for me to start?
-     */
-//    private boolean waitingForMe = false;
     private boolean targetRunning = false;
     private boolean dependencyRegistered = false;
 
@@ -82,15 +78,6 @@
             kernel.getDependencyManager().addDependency(abstractName, targetName);
             dependencyRegistered = true;
         }
-        // We only need to start if there are targetName and we don't already have a proxy
-//        if (waitingForMe) {
-//            if (isRunning(kernel, targetName)) {
-//                AbstractName abstractName = gbeanInstance.getAbstractName();
-//                kernel.getDependencyManager().addDependency(abstractName, targetName);
-//                waitingForMe = false;
-//            }
-//        }
-
         return targetRunning;
     }
 
@@ -101,10 +88,6 @@
             kernel.getDependencyManager().removeDependency(abstractName, targetName);
             dependencyRegistered = false;
         }
-//        waitingForMe = true;
-//        AbstractName abstractName = gbeanInstance.getAbstractName();
-//
-//            kernel.getDependencyManager().removeDependency(abstractName, targetName);
     }
 
     public final synchronized void offline() {
@@ -113,7 +96,6 @@
 
         kernel.getLifecycleMonitor().removeLifecycleListener(listener);
         targetRunning = false;
-//        waitingForMe = true;
     }
 
     private synchronized void attemptFullStart() {
@@ -154,14 +136,10 @@
             targetRunning = true;
             GBeanInstance gbeanInstance1 = gbeanInstance;
             if (gbeanInstance1.getStateInstance() == State.RUNNING) {
-                log.error("Illegal state: two or more targets are running for a single valued reference: " + getDescription() +
-                        ", currentTarget=" + targetName +
-                        ", newTarget=" + abstractName);
-//                gbeanInstance1.referenceFailed();
-            } //else if (waitingForMe) {
-                // the gbean was waiting for me and not there is now just one target
-                attemptFullStart();
-//            }
+                log.error("Illegal state: two or more targets are running for a dependency: " + getDescription() +
+                        ",\n    newTarget=" + abstractName);
+            }
+            attemptFullStart();
         }
     }
 
@@ -172,7 +150,7 @@
             if (gbeanInstance1.getStateInstance() == State.RUNNING) {
                 // we no longer have a valid target, which is an illegal state so we need to fail
                 log.error("Illegal state: current target for a single valued reference stopped: " + getDescription() +
-                        ", currentTarget=" + abstractName);
+                        ",\n    stopped Target=" + abstractName);
                 gbeanInstance1.referenceFailed();
             }
         }
@@ -200,7 +178,7 @@
 
     protected final String getDescription() {
         return "\n    GBeanInstance: " + gbeanInstance.getName() +
-                "\n    Pattern Name: " + targetName;
+                "\n    Target Name: " + targetName;
     }
 
     public boolean equals(Object o) {

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=386907&r1=386906&r2=386907&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 Sat Mar 18 16:52:38 2006
@@ -45,7 +45,7 @@
 /**
  * A GBeanInstance is a J2EE Management Managed Object, and is standard base for Geronimo services.
  *
- * @version $Rev: 384351 $ $Date$
+ * @version $Rev:385718 $ $Date$
  */
 public final class GBeanInstance implements StateManageable {
     private static final Log log = LogFactory.getLog(GBeanInstance.class);
@@ -177,11 +177,6 @@
     private long startTime;
 
     /**
-     * Is this gbean enabled?  A disabled gbean can not be started.
-     */
-    private boolean enabled = true;
-
-    /**
      * This is used to signal the creating thread that it should
      * fail when it returns from usercode.  This is set when a
      * reference has gone offline during construction.
@@ -347,13 +342,9 @@
                 Map.Entry entry = (Map.Entry) iterator.next();
                 String attributeName = (String) entry.getKey();
                 Object attributeValue = entry.getValue();
-                if ("gbeanEnabled".equals(attributeName)) {
-                    enabled = ((Boolean) attributeValue).booleanValue();
-                } else {
                     if (entry.getValue() != null) {
                         setAttribute(attributeName, attributeValue, false);
                     }
-                }
             }
 
         } catch (Exception e) {
@@ -455,24 +446,6 @@
         return abstractName;
     }
 
-    /**
-     * Is this gbean enabled.  A disabled gbean can not be started.
-     *
-     * @return true if the gbean is enabled and can be started
-     */
-    public synchronized final boolean isEnabled() {
-        return enabled;
-    }
-
-    /**
-     * Changes the enabled status.
-     *
-     * @param enabled the new enabled flag
-     */
-    public synchronized final void setEnabled(boolean enabled) {
-        this.enabled = enabled;
-    }
-
     public synchronized final long getStartTime() {
         return startTime;
     }
@@ -525,9 +498,6 @@
             if (dead) {
                 throw new IllegalStateException("A dead GBean can not be started: abstractName=" + abstractName);
             }
-            if (!enabled) {
-                throw new IllegalStateException("A disabled GBean can not be started: abstractName=" + abstractName);
-            }
         }
         gbeanInstanceState.start();
     }
@@ -541,9 +511,6 @@
         synchronized (this) {
             if (dead) {
                 throw new IllegalStateException("A dead GBean can not be started: abstractName=" + abstractName);
-            }
-            if (!enabled) {
-                throw new IllegalStateException("A disabled GBean can not be started: abstractName=" + abstractName);
             }
         }
         gbeanInstanceState.startRecursive();

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=386907&r1=386906&r2=386907&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 Sat Mar 18 16:52:38 2006
@@ -129,9 +129,7 @@
         for (Iterator iterator = dependents.iterator(); iterator.hasNext();) {
             AbstractName dependent = (AbstractName) iterator.next();
             try {
-                if (kernel.isGBeanEnabled(dependent)) {
-                    kernel.startRecursiveGBean(dependent);
-                }
+                kernel.startRecursiveGBean(dependent);
             } catch (GBeanNotFoundException e) {
                 // this is ok the gbean died before we could start it
             } catch (Exception e) {

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java?rev=386907&r1=386906&r2=386907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java Sat Mar 18 16:52:38 2006
@@ -32,7 +32,7 @@
 import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
- * @version $Rev: 386505 $ $Date$
+ * @version $Rev:386515 $ $Date$
  */
 public interface Kernel {
     /**
@@ -196,29 +196,6 @@
     long getGBeanStartTime(String shortName) throws GBeanNotFoundException;
     long getGBeanStartTime(Class type) throws GBeanNotFoundException;
     long getGBeanStartTime(String shortName, Class type) throws GBeanNotFoundException;
-
-    /**
-     * Is the specified GBean enabled?
-     * @param name the name if the GBean
-     * @return true if the gbean is enabled
-     * @throws GBeanNotFoundException if the GBean could not be found
-     * @deprecated Use attribute store instead of disabling gbeans
-     */
-    boolean isGBeanEnabled(ObjectName name) throws GBeanNotFoundException;
-    /** @deprecated Use attribute store instead of disabling gbeans */
-    boolean isGBeanEnabled(AbstractName name) throws GBeanNotFoundException;
-
-    /**
-     * Sets the eneabled status of the specified GBean.  A disabled gbean can not be started, and
-     * will not be started via startRecursive.
-     * @param name the name if the GBean
-     * @param enabled the new enabled status
-     * @throws GBeanNotFoundException if the GBean could not be found
-     * @deprecated Use attribute store instead of disabling gbeans
-     */
-    void setGBeanEnabled(ObjectName name, boolean enabled) throws GBeanNotFoundException;
-    /** @deprecated Use attribute store instead of disabling gbeans */
-    void setGBeanEnabled(AbstractName name, boolean enabled) throws GBeanNotFoundException;
 
     /**
      * Gets the ClassLoader used to register the specified GBean

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java?rev=386907&r1=386906&r2=386907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java Sat Mar 18 16:52:38 2006
@@ -30,7 +30,7 @@
 import org.apache.geronimo.kernel.proxy.ProxyManager;
 
 /**
- * @version $Rev: 385487 $ $Date$
+ * @version $Rev:386515 $ $Date$
  */
 public class KernelGBean implements Kernel{
     private final Kernel kernel;
@@ -233,22 +233,6 @@
 
     public long getGBeanStartTime(String shortName, Class type) throws GBeanNotFoundException {
         return kernel.getGBeanStartTime(shortName, type);
-    }
-
-    public boolean isGBeanEnabled(ObjectName name) throws GBeanNotFoundException {
-        return kernel.isGBeanEnabled(name);
-    }
-
-    public boolean isGBeanEnabled(AbstractName name) throws GBeanNotFoundException {
-        return kernel.isGBeanEnabled(name);
-    }
-
-    public void setGBeanEnabled(ObjectName name, boolean enabled) throws GBeanNotFoundException {
-        kernel.setGBeanEnabled(name, enabled);
-    }
-
-    public void setGBeanEnabled(AbstractName name, boolean enabled) throws GBeanNotFoundException {
-        kernel.setGBeanEnabled(name, enabled);
     }
 
     public ClassLoader getClassLoaderFor(ObjectName name) throws GBeanNotFoundException {

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java?rev=386907&r1=386906&r2=386907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java Sat Mar 18 16:52:38 2006
@@ -531,26 +531,6 @@
         return gbeanInstance.getStartTime();
     }
 
-    public boolean isGBeanEnabled(ObjectName name) throws GBeanNotFoundException {
-        GBeanInstance gbeanInstance = registry.getGBeanInstance(createGBeanName(name));
-        return gbeanInstance.isEnabled();
-    }
-
-    public boolean isGBeanEnabled(AbstractName name) throws GBeanNotFoundException {
-        GBeanInstance gbeanInstance = registry.getGBeanInstance(name);
-        return gbeanInstance.isEnabled();
-    }
-
-    public void setGBeanEnabled(ObjectName name, boolean enabled) throws GBeanNotFoundException {
-        GBeanInstance gbeanInstance = registry.getGBeanInstance(createGBeanName(name));
-        gbeanInstance.setEnabled(enabled);
-    }
-
-    public void setGBeanEnabled(AbstractName name, boolean enabled) throws GBeanNotFoundException {
-        GBeanInstance gbeanInstance = registry.getGBeanInstance(name);
-        gbeanInstance.setEnabled(enabled);
-    }
-
     public Set listGBeans(ObjectName pattern) {
         String domain = (pattern == null || pattern.isDomainPattern()) ? null : pattern.getDomain();
         if (domain != null && domain.length() == 0) {

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java?rev=386907&r1=386906&r2=386907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java Sat Mar 18 16:52:38 2006
@@ -110,7 +110,7 @@
     }
 
     public static AbstractName getConfigurationAbstractName(Artifact configId) throws InvalidConfigException {
-        return new AbstractName(configId, Collections.EMPTY_MAP, getConfigurationObjectName(configId));
+        return new AbstractName(configId, Collections.singletonMap("configurationName", configId.toString()), getConfigurationObjectName(configId));
     }
 
     public static boolean isConfigurationObjectName(ObjectName name) {



Mime
View raw message