geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r395740 - /geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java
Date Fri, 21 Apr 2006 00:16:08 GMT
Author: ammulder
Date: Thu Apr 20 17:16:06 2006
New Revision: 395740

URL: http://svn.apache.org/viewcvs?rev=395740&view=rev
Log:
Deployer implements expanded config installer interface

Modified:
    geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java

Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java?rev=395740&r1=395739&r2=395740&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java
(original)
+++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java
Thu Apr 20 17:16:06 2006
@@ -25,6 +25,7 @@
 import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.Set;
+import java.util.Map;
 import javax.enterprise.deploy.shared.CommandType;
 import javax.enterprise.deploy.spi.Target;
 import javax.enterprise.deploy.spi.TargetModuleID;
@@ -43,7 +44,9 @@
 import org.apache.geronimo.system.configuration.ConfigurationList;
 import org.apache.geronimo.system.configuration.DownloadPoller;
 import org.apache.geronimo.system.configuration.DownloadResults;
+import org.apache.geronimo.system.configuration.ConfigurationArchiveData;
 import org.apache.geronimo.system.jmx.KernelDelegate;
+import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
  * Connects to a Kernel in a remote VM (may or many not be on the same machine).
@@ -225,5 +228,46 @@
             }
         }
         return null;
+    }
+
+    public Map getInstalledPlugins() {
+        Set set = kernel.listGBeans(new AbstractNameQuery("org.apache.geronimo.system.configuration.ConfigurationInstaller"));
+        for (Iterator it = set.iterator(); it.hasNext();) {
+            AbstractName name = (AbstractName) it.next();
+            try {
+                return (Map)kernel.invoke(name, "getInstalledPlugins", new Object[0], new
String[0]);
+            } catch (Exception e) {
+                System.err.println("Unable to get installed plugins: "+e.getMessage());
+                e.printStackTrace();
+            }
+        }
+        return null;
+    }
+
+    public ConfigurationArchiveData getPluginMetadata(Artifact configId) {
+        Set set = kernel.listGBeans(new AbstractNameQuery("org.apache.geronimo.system.configuration.ConfigurationInstaller"));
+        for (Iterator it = set.iterator(); it.hasNext();) {
+            AbstractName name = (AbstractName) it.next();
+            try {
+                return (ConfigurationArchiveData)kernel.invoke(name, "getPluginMetadata",
new Object[]{configId}, new String[]{Artifact.class.getName()});
+            } catch (Exception e) {
+                System.err.println("Unable to get plugin metadata: "+e.getMessage());
+                e.printStackTrace();
+            }
+        }
+        return null;
+    }
+
+    public void updatePluginMetadata(ConfigurationArchiveData metadata) {
+        Set set = kernel.listGBeans(new AbstractNameQuery("org.apache.geronimo.system.configuration.ConfigurationInstaller"));
+        for (Iterator it = set.iterator(); it.hasNext();) {
+            AbstractName name = (AbstractName) it.next();
+            try {
+                kernel.invoke(name, "updatePluginMetadata", new Object[]{metadata}, new String[]{ConfigurationArchiveData.class.getName()});
+            } catch (Exception e) {
+                System.err.println("Unable to check on configuration install: "+e.getMessage());
+                e.printStackTrace();
+            }
+        }
     }
 }



Mime
View raw message