geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r494692 - in /geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx: JMXDeploymentManager.java LocalDeploymentManager.java
Date Wed, 10 Jan 2007 02:55:04 GMT
Author: djencks
Date: Tue Jan  9 18:55:04 2007
New Revision: 494692

URL: http://svn.apache.org/viewvc?view=rev&rev=494692
Log:
GERONIMO-2686 Fix some more problems with trying to use the deployer jar, the ModuleConfigurers
are not available remotely

Modified:
    geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
    geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/LocalDeploymentManager.java

Modified: geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java?view=diff&rev=494692&r1=494691&r2=494692
==============================================================================
--- geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
(original)
+++ geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
Tue Jan  9 18:55:04 2007
@@ -64,27 +64,16 @@
  */
 public abstract class JMXDeploymentManager implements DeploymentManager {
     private static final Log log = LogFactory.getLog(JMXDeploymentManager.class);
-    private static final AbstractNameQuery CONFIGURER_QUERY = new AbstractNameQuery(ModuleConfigurer.class.getName());
 
     protected Kernel kernel;
     private ConfigurationManager configurationManager;
     private CommandContext commandContext;
-    private Map<ModuleType, ModuleConfigurer> moduleConfigurers = new HashMap<ModuleType,
ModuleConfigurer>();
+    protected final Map<ModuleType, ModuleConfigurer> moduleConfigurers = new HashMap<ModuleType,
ModuleConfigurer>();
 
     protected void initialize(Kernel kernel) {
         this.kernel = kernel;
         configurationManager = ConfigurationUtil.getConfigurationManager(kernel);
         commandContext = new CommandContext(true, true, null, null, false);
-        Set configurerNames = kernel.listGBeans(CONFIGURER_QUERY);
-        for (Object configurerName : configurerNames) {
-            AbstractName name = (AbstractName) configurerName;
-            try {
-                ModuleConfigurer configurer = (ModuleConfigurer) kernel.getGBean(name);
-                moduleConfigurers.put(configurer.getModuleType(), configurer);
-            } catch (GBeanNotFoundException e) {
-                log.warn("No gbean found for name returned in query : " + name);
-            }
-        }
     }
 
     public void setAuthentication(String username, String password) {

Modified: geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/LocalDeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/LocalDeploymentManager.java?view=diff&rev=494692&r1=494691&r2=494692
==============================================================================
--- geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/LocalDeploymentManager.java
(original)
+++ geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/LocalDeploymentManager.java
Tue Jan  9 18:55:04 2007
@@ -16,7 +16,15 @@
  */
 package org.apache.geronimo.deployment.plugin.jmx;
 
+import java.util.Set;
+
 import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.deployment.ModuleConfigurer;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * Connects to a kernel in the same VM.
@@ -24,7 +32,20 @@
  * @version $Rev$ $Date$
  */
 public class LocalDeploymentManager extends JMXDeploymentManager {
+    private static final Log log = LogFactory.getLog(LocalDeploymentManager.class);
+    private static final AbstractNameQuery CONFIGURER_QUERY = new AbstractNameQuery(ModuleConfigurer.class.getName());
+
     public LocalDeploymentManager(Kernel kernel) {
         initialize(kernel);
+        Set configurerNames = kernel.listGBeans(CONFIGURER_QUERY);
+        for (Object configurerName : configurerNames) {
+            AbstractName name = (AbstractName) configurerName;
+            try {
+                ModuleConfigurer configurer = (ModuleConfigurer) kernel.getGBean(name);
+                moduleConfigurers.put(configurer.getModuleType(), configurer);
+            } catch (GBeanNotFoundException e) {
+                log.warn("No gbean found for name returned in query : " + name);
+            }
+        }
     }
 }



Mime
View raw message