geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r378603 - in /geronimo/branches/configid/modules: connector-builder/src/test/org/apache/geronimo/connector/deployment/ jetty-builder/src/test/org/apache/geronimo/jetty/deployment/ jetty/src/java/org/apache/geronimo/jetty/ kernel/src/java/or...
Date Fri, 17 Feb 2006 19:30:16 GMT
Author: djencks
Date: Fri Feb 17 11:30:15 2006
New Revision: 378603

URL: http://svn.apache.org/viewcvs?rev=378603&view=rev
Log:
new1 now builds OK

Modified:
    geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
    geronimo/branches/configid/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
    geronimo/branches/configid/modules/jetty/src/java/org/apache/geronimo/jetty/JettyManagerImpl.java
    geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
    geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManager.java
    geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManagerImpl.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java
    geronimo/branches/configid/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
    geronimo/branches/configid/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java

Modified: geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java?rev=378603&r1=378602&r2=378603&view=diff
==============================================================================
--- geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
(original)
+++ geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
Fri Feb 17 11:30:15 2006
@@ -600,12 +600,10 @@
         public ObjectName loadConfiguration(Artifact configId) throws NoSuchConfigException,
IOException, InvalidConfigException {
             ObjectName configurationObjectName = Configuration.getConfigurationObjectName(configId);
             GBeanData configData = new GBeanData(configurationObjectName, Configuration.GBEAN_INFO);
-            configData.setAttribute("id", configId);
-            Map nameKeys = new HashMap();
-            nameKeys.put("domain", "test");
-            nameKeys.put("J2EEServer", "bar");
-
-            configData.setAttribute("nameKeys", nameKeys);
+            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);
 
             try {

Modified: geronimo/branches/configid/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java?rev=378603&r1=378602&r2=378603&view=diff
==============================================================================
--- geronimo/branches/configid/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
(original)
+++ geronimo/branches/configid/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
Fri Feb 17 11:30:15 2006
@@ -371,11 +371,10 @@
         public ObjectName loadConfiguration(Artifact configId) throws NoSuchConfigException,
IOException, InvalidConfigException {
             ObjectName configurationObjectName = Configuration.getConfigurationObjectName(configId);
             GBeanData configData = new GBeanData(configurationObjectName, Configuration.GBEAN_INFO);
-            configData.setAttribute("id", configId);
-            Map nameKeys = new HashMap();
-            nameKeys.put("domain", "test");
-            nameKeys.put("J2EEServer", "server");
-            configData.setAttribute("nameKeys", nameKeys);
+            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);
 
             try {

Modified: geronimo/branches/configid/modules/jetty/src/java/org/apache/geronimo/jetty/JettyManagerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/jetty/src/java/org/apache/geronimo/jetty/JettyManagerImpl.java?rev=378603&r1=378602&r2=378603&view=diff
==============================================================================
--- geronimo/branches/configid/modules/jetty/src/java/org/apache/geronimo/jetty/JettyManagerImpl.java
(original)
+++ geronimo/branches/configid/modules/jetty/src/java/org/apache/geronimo/jetty/JettyManagerImpl.java
Fri Feb 17 11:30:15 2006
@@ -16,35 +16,35 @@
  */
 package org.apache.geronimo.jetty;
 
-import java.util.Set;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Hashtable;
-import java.net.URISyntaxException;
-import javax.management.ObjectName;
-import javax.management.MalformedObjectNameException;
-import org.apache.geronimo.management.geronimo.WebManager;
-import org.apache.geronimo.gbean.GBeanQuery;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.GBeanNotFoundException;
-import org.apache.geronimo.kernel.config.ConfigurationUtil;
-import org.apache.geronimo.kernel.config.EditableConfigurationManager;
-import org.apache.geronimo.kernel.config.Configuration;
-import org.apache.geronimo.kernel.config.InvalidConfigException;
+import org.apache.geronimo.gbean.GBeanQuery;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.j2ee.management.impl.Util;
+import org.apache.geronimo.jetty.connector.AJP13Connector;
 import org.apache.geronimo.jetty.connector.HTTPConnector;
 import org.apache.geronimo.jetty.connector.HTTPSConnector;
-import org.apache.geronimo.jetty.connector.AJP13Connector;
 import org.apache.geronimo.jetty.connector.JettyConnector;
 import org.apache.geronimo.jetty.requestlog.JettyLogManager;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.config.Configuration;
+import org.apache.geronimo.kernel.config.ConfigurationUtil;
+import org.apache.geronimo.kernel.config.EditableConfigurationManager;
+import org.apache.geronimo.kernel.config.InvalidConfigException;
+import org.apache.geronimo.management.geronimo.WebManager;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
-import org.apache.geronimo.j2ee.management.impl.Util;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
 
 /**
  * Jetty implementation of WebManager.  Knows how to manipulate
@@ -105,9 +105,6 @@
             } catch (InvalidConfigException e) {
                 log.error("Unable to add GBean", e);
                 return null;
-            } catch (URISyntaxException e) {
-                log.error("Should never happen", e);
-                return null;
             } finally {
                 ConfigurationUtil.releaseConfigurationManager(kernel, mgr);
             }
@@ -146,7 +143,7 @@
      * is responsible for.
      */
     public void removeConnector(String objectName) {
-        ObjectName name = null;
+        ObjectName name;
         try {
             name = ObjectName.getInstance(objectName);
         } catch (MalformedObjectNameException e) {
@@ -172,8 +169,6 @@
                     mgr.removeGBeanFromConfiguration(Configuration.getConfigurationID(config),
name);
                 } catch (InvalidConfigException e) {
                     log.error("Unable to add GBean", e);
-                } catch (URISyntaxException e) {
-                    log.error("Should never happen", e);
                 } finally {
                     ConfigurationUtil.releaseConfigurationManager(kernel, mgr);
                 }

Modified: geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java?rev=378603&r1=378602&r2=378603&view=diff
==============================================================================
--- geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
(original)
+++ geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
Fri Feb 17 11:30:15 2006
@@ -596,6 +596,8 @@
         infoFactory.addAttribute("gBeanState", byte[].class, true, false);
         infoFactory.addAttribute("baseURL", URL.class, true, false);
         infoFactory.addAttribute("configurationClassLoader", ClassLoader.class, false);
+        //make id readable for convenience
+        infoFactory.addAttribute("id", Artifact.class, false);
 
         infoFactory.addReference("Repositories", Repository.class, "GBean");
         infoFactory.addReference("ConfigurationStore", ConfigurationStore.class, "GBean");

Modified: geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManager.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManager.java?rev=378603&r1=378602&r2=378603&view=diff
==============================================================================
--- geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManager.java
(original)
+++ geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManager.java
Fri Feb 17 11:30:15 2006
@@ -20,6 +20,7 @@
 import javax.management.ObjectName;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
  * A specialized ConfigurationManager that can change the set of GBeans
@@ -34,7 +35,7 @@
      * @param gbean     The data representing the GBean to add.
      * @param start     If true, the GBean should be started as part of this call.
      */
-    void addGBeanToConfiguration(URI configID, GBeanData gbean, boolean start) throws InvalidConfigException;
+    void addGBeanToConfiguration(Artifact configID, GBeanData gbean, boolean start) throws
InvalidConfigException;
 
     /**
      * Removes a GBean from a configuration.  Note: this may simply mark it to
@@ -43,5 +44,5 @@
      * @param configID  The configuration to remove the GBean from.
      * @param gbean     The ObjectName of the GBean to remove.
      */
-    void removeGBeanFromConfiguration(URI configID, ObjectName gbean) throws InvalidConfigException,
GBeanNotFoundException;
+    void removeGBeanFromConfiguration(Artifact configID, ObjectName gbean) throws InvalidConfigException,
GBeanNotFoundException;
 }

Modified: geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManagerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManagerImpl.java?rev=378603&r1=378602&r2=378603&view=diff
==============================================================================
--- geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManagerImpl.java
(original)
+++ geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableConfigurationManagerImpl.java
Fri Feb 17 11:30:15 2006
@@ -17,10 +17,10 @@
 package org.apache.geronimo.kernel.config;
 
 import java.util.Collection;
-import java.net.URI;
 import javax.management.ObjectName;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
@@ -37,7 +37,7 @@
         super(kernel, stores, attributeStore, configurationList);
     }
 
-    public void addGBeanToConfiguration(URI configID, GBeanData gbean, boolean start) throws
InvalidConfigException {
+    public void addGBeanToConfiguration(Artifact configID, GBeanData gbean, boolean start)
throws InvalidConfigException {
         try {
             ObjectName name = Configuration.getConfigurationObjectName(configID);
             kernel.invoke(name, "addGBean", new Object[]{gbean, start ? Boolean.TRUE : Boolean.FALSE},
new String[]{GBeanData.class.getName(), boolean.class.getName()});
@@ -48,7 +48,7 @@
         attributeStore.addGBean(configID.toString(), gbean);
     }
 
-    public void removeGBeanFromConfiguration(URI configID, ObjectName gbean) throws GBeanNotFoundException,
InvalidConfigException {
+    public void removeGBeanFromConfiguration(Artifact configID, ObjectName gbean) throws
GBeanNotFoundException, InvalidConfigException {
         // Make sure the specified configuration has the specified GBean
         try {
             ObjectName name = Configuration.getConfigurationObjectName(configID);

Modified: geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java?rev=378603&r1=378602&r2=378603&view=diff
==============================================================================
--- geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java
(original)
+++ geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java
Fri Feb 17 11:30:15 2006
@@ -156,7 +156,7 @@
         try {
             Artifact id = configurationData.getId();
             GBeanData config = new GBeanData(Configuration.getConfigurationObjectName(id),
Configuration.GBEAN_INFO);
-            config.setAttribute("id", id);
+//            config.setAttribute("id", id);
             config.setAttribute("type", configurationData.getModuleType());
             //TODO configid this might need further improvmement
 //            Map nameKeys = configurationData.getNameKeys();

Modified: geronimo/branches/configid/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java?rev=378603&r1=378602&r2=378603&view=diff
==============================================================================
--- geronimo/branches/configid/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
(original)
+++ geronimo/branches/configid/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
Fri Feb 17 11:30:15 2006
@@ -509,11 +509,10 @@
         public ObjectName loadConfiguration(Artifact configId) throws NoSuchConfigException,
IOException, InvalidConfigException {
             ObjectName configurationObjectName = Configuration.getConfigurationObjectName(configId);
             GBeanData configData = new GBeanData(configurationObjectName, Configuration.GBEAN_INFO);
-            configData.setAttribute("id", configId);
-            Map nameKeys = new HashMap();
-            nameKeys.put("domain", "test");
-            nameKeys.put("J2EEServer", "server");
-            configData.setAttribute("nameKeys", nameKeys);
+            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);
 
             try {

Modified: geronimo/branches/configid/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java?rev=378603&r1=378602&r2=378603&view=diff
==============================================================================
--- geronimo/branches/configid/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
(original)
+++ geronimo/branches/configid/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
Fri Feb 17 11:30:15 2006
@@ -109,9 +109,6 @@
             } catch (InvalidConfigException e) {
                 log.error("Unable to add GBean", e);
                 return null;
-            } catch (URISyntaxException e) {
-                log.error("Should never happen", e);
-                return null;
             } finally {
                 ConfigurationUtil.releaseConfigurationManager(kernel, mgr);
             }
@@ -174,8 +171,6 @@
                     mgr.removeGBeanFromConfiguration(Configuration.getConfigurationID(config),
name);
                 } catch (InvalidConfigException e) {
                     log.error("Unable to add GBean", e);
-                } catch (URISyntaxException e) {
-                    log.error("Should never happen", e);
                 } finally {
                     ConfigurationUtil.releaseConfigurationManager(kernel, mgr);
                 }



Mime
View raw message