geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r385659 [2/2] - in /geronimo/branches/1.1: modules/client-builder/src/java/org/apache/geronimo/client/builder/ modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ modules/j2ee-builder/src/java/org/apache/geronimo/j2...
Date Mon, 13 Mar 2006 21:07:32 GMT
Modified: geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java?rev=385659&r1=385658&r2=385659&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
(original)
+++ geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
Mon Mar 13 13:07:27 2006
@@ -38,6 +38,7 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
+import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
@@ -188,23 +189,9 @@
 
     public static AbstractName addGBeanData(GbeanType gbean, AbstractName moduleName, ClassLoader
cl, DeploymentContext context) throws DeploymentException {
         GBeanInfo gBeanInfo = GBeanInfo.getGBeanInfo(gbean.getClass1(), cl);
-        AbstractName abstractName;
-//        if (gbean.isSetGbeanName()) {
-//            try {
-//                abstractName = ObjectName.getInstance(gbean.getGbeanName());
-//                nameMap.putAll(abstractName.getKeyPropertyList());
-//            } catch (MalformedObjectNameException e) {
-//                throw new DeploymentException("Invalid ObjectName: " + gbean.getName(),
e);
-//            }
-//        } else {
-            String namePart = gbean.getName();
-            String j2eeType = gBeanInfo.getJ2eeType();
-            //todo investigate using the module type from the j2eecontext.
-            abstractName = NameFactory.getChildName(moduleName, j2eeType, namePart, gBeanInfo.getInterfaces());
-//                nameMap.put("name", namePart);
-//                nameMap.put("type", j2eeType);
-//        }
-//        AbstractName abstractName = new AbstractName(context.getConfigID(), nameMap, gBeanInfo.getInterfaces(),
abstractName);
+        String namePart = gbean.getName();
+        String j2eeType = gBeanInfo.getJ2eeType();
+        AbstractName abstractName = Naming.createChildName(moduleName, j2eeType, namePart);
         GBeanBuilder builder = new GBeanBuilder(abstractName, gBeanInfo, cl, context, moduleName,
xmlAttributeBuilderMap, xmlReferenceBuilderMap);
 
         // set up attributes

Modified: geronimo/branches/1.1/modules/service-builder/src/test/org/apache/geronimo/deployment/service/ServiceConfigBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/service-builder/src/test/org/apache/geronimo/deployment/service/ServiceConfigBuilderTest.java?rev=385659&r1=385658&r2=385659&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/service-builder/src/test/org/apache/geronimo/deployment/service/ServiceConfigBuilderTest.java
(original)
+++ geronimo/branches/1.1/modules/service-builder/src/test/org/apache/geronimo/deployment/service/ServiceConfigBuilderTest.java
Mon Mar 13 13:07:27 2006
@@ -26,13 +26,13 @@
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.ReferenceCollection;
 import org.apache.geronimo.gbean.ReferenceCollectionListener;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationResolver;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.Naming;
 
 import javax.management.ObjectName;
 import java.io.File;
@@ -74,7 +74,7 @@
                     null,
                     new ConfigurationResolver(environment.getConfigId(), outFile, Collections.singleton(new
MockRepository())));
             DeploymentContext context = new DeploymentContext(configuration, outFile);
-            AbstractName j2eeContext = NameFactory.buildModuleName(environment.getProperties(),
environment.getConfigId(), ConfigurationModuleType.SERVICE, null);
+            AbstractName j2eeContext = Naming.createRootName(environment.getConfigId(), environment.getConfigId().toString(),
"Configuration");
 
             GbeanType[] gbeans = plan.getGbeanArray();
             ServiceConfigBuilder.addGBeans(gbeans, cl, j2eeContext, context);

Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java?rev=385659&r1=385658&r2=385659&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java
(original)
+++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java
Mon Mar 13 13:07:27 2006
@@ -21,6 +21,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.common.GeronimoEnvironment;
 import org.apache.geronimo.gbean.GBeanQuery;
+import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelFactory;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
@@ -30,7 +31,6 @@
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.system.serverinfo.DirectoryUtils;
 
-import javax.management.ObjectName;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
@@ -41,7 +41,7 @@
 import java.util.Set;
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 384141 $ $Date$
  */
 public class Daemon {
     private final static String ARGUMENT_NO_PROGRESS = "--quiet";
@@ -226,10 +226,6 @@
 
             ClassLoader classLoader = Daemon.class.getClassLoader();
 
-            // create a mbean server
-//            MBeanServer mbeanServer = MBeanServerFactory.createMBeanServer("geronimo");
-//            String mbeanServerId = (String) mbeanServer.getAttribute(new ObjectName("JMImplementation:type=MBeanServerDelegate"),
"MBeanServerId");
-
             // create the kernel
             final Kernel kernel = KernelFactory.newInstance().createKernel("geronimo");
 
@@ -251,14 +247,6 @@
                 }
             });
 
-            // add the jmx bridge
-            //now it's in the plan
-//            ObjectName mbeanServerKernelBridgeName = new ObjectName("geronimo.boot:role=MBeanServerKernelBridge");
-//            GBeanData mbeanServerKernelBridge = new GBeanData(mbeanServerKernelBridgeName,
MBeanServerKernelBridge.GBEAN_INFO);
-//            mbeanServerKernelBridge.setAttribute("mbeanServerId", mbeanServerId);
-//            kernel.loadGBean(mbeanServerKernelBridge, classLoader);
-//            kernel.startGBean(mbeanServerKernelBridgeName);
-
             // load this configuration
             InputStream in = classLoader.getResourceAsStream("META-INF/config.ser");
             ConfigurationUtil.loadBootstrapConfiguration(kernel, in, classLoader);
@@ -271,7 +259,7 @@
                 // --override wasn't used (nothing explicit), see what was running before
                 Set configLists = kernel.listGBeans(query);
                 for (Iterator i = configLists.iterator(); i.hasNext();) {
-                    ObjectName configListName = (ObjectName) i.next();
+                    AbstractName configListName = (AbstractName) i.next();
                     try {
                         configs.addAll((List) kernel.invoke(configListName, "restore"));
                     } catch (IOException e) {
@@ -318,7 +306,7 @@
             // Tell every persistent configuration list that the kernel is now fully started
             Set configLists = kernel.listGBeans(query);
             for (Iterator i = configLists.iterator(); i.hasNext();) {
-                ObjectName configListName = (ObjectName) i.next();
+                AbstractName configListName = (AbstractName) i.next();
                 kernel.setAttribute(configListName, "kernelFullyStarted", Boolean.TRUE);
             }
 

Modified: geronimo/branches/1.1/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=385659&r1=385658&r2=385659&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/branches/1.1/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Mon Mar 13 13:07:27 2006
@@ -38,6 +38,7 @@
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.StoredObject;
+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;
@@ -91,7 +92,7 @@
 
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 385487 $ $Date$
  */
 public class TomcatModuleBuilder extends AbstractWebModuleBuilder {
 
@@ -191,7 +192,7 @@
                 throw new DeploymentException("Could not construct standalone web module
name", e);
             }
         } else {
-            moduleName = NameFactory.getChildName(earName, NameFactory.WEB_MODULE, targetPath,
null);
+            moduleName = Naming.createChildName(earName, NameFactory.WEB_MODULE, targetPath);
         }
 
         return new WebModule(standAlone, moduleName, environment, moduleFile, targetPath,
webApp, tomcatWebApp, specDD, contextRoot, portMap, TOMCAT_NAMESPACE);
@@ -333,24 +334,24 @@
             }
             if (tomcatWebApp.isSetTomcatRealm()) {
                 String tomcatRealm = tomcatWebApp.getTomcatRealm().trim();
-                AbstractName realmName = NameFactory.getChildName(moduleName, RealmGBean.GBEAN_INFO.getJ2eeType(),
tomcatRealm, null);
+                AbstractName realmName = Naming.createChildName(moduleName, RealmGBean.GBEAN_INFO.getJ2eeType(),
tomcatRealm);
                 webModuleData.setReferencePattern("TomcatRealm", realmName);
             }
             if (tomcatWebApp.isSetValveChain()) {
                 String valveChain = tomcatWebApp.getValveChain().trim();
-                AbstractName valveName = NameFactory.getChildName(moduleName, ValveGBean.J2EE_TYPE,
valveChain, null);
+                AbstractName valveName = Naming.createChildName(moduleName, ValveGBean.J2EE_TYPE,
valveChain);
                 webModuleData.setReferencePattern("TomcatValveChain", valveName);
             }
 
             if (tomcatWebApp.isSetCluster()) {
                 String cluster = tomcatWebApp.getCluster().trim();
-                AbstractName clusterName = NameFactory.getChildName(moduleName, CatalinaClusterGBean.J2EE_TYPE,
cluster, null);
+                AbstractName clusterName =Naming.createChildName(moduleName, CatalinaClusterGBean.J2EE_TYPE,
cluster);
                 webModuleData.setReferencePattern("Cluster", clusterName);
             }
 
             if (tomcatWebApp.isSetManager()) {
                 String manager = tomcatWebApp.getManager().trim();
-                AbstractName managerName = NameFactory.getChildName(moduleName, ManagerGBean.J2EE_TYPE,
manager, null);
+                AbstractName managerName = Naming.createChildName(moduleName, ManagerGBean.J2EE_TYPE,
manager);
                 webModuleData.setReferencePattern("Manager", managerName);
             }
             Map portMap = webModule.getPortMap();

Modified: geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java?rev=385659&r1=385658&r2=385659&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
(original)
+++ geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
Mon Mar 13 13:07:27 2006
@@ -26,6 +26,7 @@
 import org.apache.geronimo.gbean.ReferencePatterns;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
 import org.apache.geronimo.kernel.config.EditableConfigurationManager;
 import org.apache.geronimo.kernel.config.InvalidConfigException;
@@ -42,7 +43,7 @@
  * Tomcat implementation of the WebManager management API.  Knows how to
  * manipulate other Tomcat objects for management purposes.
  *
- * @version $Rev$ $Date$
+ * @version $Rev: 385487 $ $Date$
  */
 public class TomcatManagerImpl implements WebManager {
     private final static Log log = LogFactory.getLog(TomcatManagerImpl.class);
@@ -69,7 +70,7 @@
      * @return The ObjectName of the new connector.
      */
     public AbstractName addConnector(AbstractName containerName, String uniqueName, String
protocol, String host, int port) {
-        AbstractName name = NameFactory.getChildName(containerName, NameFactory.GERONIMO_SERVICE,
"TomcatWebConnector-" + protocol + "-" + uniqueName, null);
+        AbstractName name = Naming.createChildName(containerName, NameFactory.GERONIMO_SERVICE,
"TomcatWebConnector-" + protocol + "-" + uniqueName);
         GBeanData connector;
         if(protocol.equals(PROTOCOL_HTTP)) {
             connector = new GBeanData(name, ConnectorGBean.GBEAN_INFO);

Modified: geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java?rev=385659&r1=385658&r2=385659&view=diff
==============================================================================
--- geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java
(original)
+++ geronimo/branches/1.1/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java
Mon Mar 13 13:07:27 2006
@@ -25,13 +25,13 @@
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelFactory;
 import org.apache.geronimo.kernel.KernelRegistry;
+import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationManagerImpl;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
 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.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.log4j.BasicConfigurator;
 
 import javax.management.MalformedObjectNameException;
@@ -48,7 +48,7 @@
  * JellyBean that builds a Geronimo Configuration using the local Mavem
  * infrastructure.
  *
- * @version $Rev$ $Date$
+ * @version $Rev: 385487 $ $Date$
  */
 public class PackageBuilder {
 
@@ -105,12 +105,12 @@
             throw (IllegalArgumentException)new IllegalArgumentException("Could not construct
a fixed object name").initCause(e);
         }
         AbstractName rootName = new AbstractName(artifact, nameMap, objectName);
-        REPOSITORY_NAME = NameFactory.getChildName(rootName, "Repository", "Repository",
null);
-        ARTIFACT_MANAGER_NAME = NameFactory.getChildName(rootName, "ArtifactManager", "ArtifactManager",
null);
-        ARTIFACT_RESOLVER_NAME = NameFactory.getChildName(rootName, "ArtifactResolver", "ArtifactResolver",
null);
-        CONFIGSTORE_NAME = NameFactory.getChildName(rootName, "ConfigurationStore", "PackageBuilderConfigStore",
null);
-        CONFIGMANAGER_NAME = NameFactory.getChildName(rootName, "ConfigurationManager", "ConfigurationManager",
null);
-        ATTRIBUTESTORE_NAME = NameFactory.getChildName(rootName, "ManagedAttributeStore",
"ManagedAttributeStore", null);
+        REPOSITORY_NAME = Naming.createChildName(rootName, "Repository", "Repository");
+        ARTIFACT_MANAGER_NAME = Naming.createChildName(rootName, "ArtifactManager", "ArtifactManager");
+        ARTIFACT_RESOLVER_NAME = Naming.createChildName(rootName, "ArtifactResolver", "ArtifactResolver");
+        CONFIGSTORE_NAME = Naming.createChildName(rootName, "ConfigurationStore", "PackageBuilderConfigStore");
+        CONFIGMANAGER_NAME = Naming.createChildName(rootName, "ConfigurationManager", "ConfigurationManager");
+        ATTRIBUTESTORE_NAME = Naming.createChildName(rootName, "ManagedAttributeStore", "ManagedAttributeStore");
     }
 
     private String repositoryClass;



Mime
View raw message