geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwo...@apache.org
Subject svn commit: r1076232 - in /geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin: ./ eba/ jmx/
Date Wed, 02 Mar 2011 14:28:09 GMT
Author: rwonly
Date: Wed Mar  2 14:28:08 2011
New Revision: 1076232

URL: http://svn.apache.org/viewvc?rev=1076232&view=rev
Log:
GERONIMO-5838 Support EBA module type in DeploymentManager.getAvailableModules(ModuleType,
Target[])


Added:
    geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/eba/
    geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/eba/EBADeploymentManager.java
  (with props)
Modified:
    geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/GeronimoDeploymentManager.java
    geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/ExtendedDeploymentManager.java
    geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java

Modified: geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/GeronimoDeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/GeronimoDeploymentManager.java?rev=1076232&r1=1076231&r2=1076232&view=diff
==============================================================================
--- geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/GeronimoDeploymentManager.java
(original)
+++ geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/GeronimoDeploymentManager.java
Wed Mar  2 14:28:08 2011
@@ -20,6 +20,7 @@ import java.net.URL;
 
 import javax.enterprise.deploy.spi.DeploymentManager;
 
+import org.apache.geronimo.deployment.plugin.eba.EBADeploymentManager;
 import org.apache.geronimo.system.plugin.PluginInstaller;
 import org.apache.geronimo.system.plugin.ServerArchiver;
 
@@ -28,7 +29,7 @@ import org.apache.geronimo.system.plugin
  *
  * @version $Rev$ $Date$
  */
-public interface GeronimoDeploymentManager extends DeploymentManager, PluginInstaller, ServerArchiver
{
+public interface GeronimoDeploymentManager extends DeploymentManager, PluginInstaller, ServerArchiver,
EBADeploymentManager {
 
     public <T> T getImplementation(Class<T> clazz);
     public URL[] getRepositories();

Added: geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/eba/EBADeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/eba/EBADeploymentManager.java?rev=1076232&view=auto
==============================================================================
--- geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/eba/EBADeploymentManager.java
(added)
+++ geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/eba/EBADeploymentManager.java
Wed Mar  2 14:28:08 2011
@@ -0,0 +1,23 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.geronimo.deployment.plugin.eba;
+
+
+public interface EBADeploymentManager {
+    public String[] getAvailableEBAModuleIds();
+}

Propchange: geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/eba/EBADeploymentManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/ExtendedDeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/ExtendedDeploymentManager.java?rev=1076232&r1=1076231&r2=1076232&view=diff
==============================================================================
--- geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/ExtendedDeploymentManager.java
(original)
+++ geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/ExtendedDeploymentManager.java
Wed Mar  2 14:28:08 2011
@@ -25,6 +25,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import javax.enterprise.deploy.spi.exceptions.TargetException;
 import javax.security.auth.login.FailedLoginException;
 
 import org.apache.geronimo.deployment.plugin.GeronimoDeploymentManager;
@@ -33,6 +34,8 @@ import org.apache.geronimo.gbean.Abstrac
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.InvalidGBeanException;
+import org.apache.geronimo.kernel.config.ConfigurationInfo;
+import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.config.NoSuchStoreException;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Dependency;
@@ -251,5 +254,41 @@ public abstract class ExtendedDeployment
             kernel.getProxyManager().destroyProxy(archiver);
         }
     }
-  
+
+    public String[] getAvailableEBAModuleIds(){
+        
+        List<AbstractName> stores = configurationManager.listStores();
+        
+        if (stores.isEmpty()) {
+            return null;
+        }
+        
+        ArrayList<String> result = new ArrayList<String>();
+        
+        for (AbstractName store : stores) {
+            
+            List infos;
+            try {
+                infos = configurationManager.listConfigurations(store);
+                for (Object info : infos) {
+                    ConfigurationInfo configInfo = (ConfigurationInfo) info;
+                    
+                    if (ConfigurationModuleType.EBA.equals(configInfo.getType())) {
+                        String name = configInfo.getConfigID().toString();
+                        
+                        result.add(name);
+                    }
+                }
+                
+            } catch (NoSuchStoreException e) {
+                e.printStackTrace();
+            }
+
+        }
+
+        return result.size() == 0 ? null : result.toArray(new String[result.size()]);
+        
+
+    }
+    
 }

Modified: geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java?rev=1076232&r1=1076231&r2=1076232&view=diff
==============================================================================
--- geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
(original)
+++ geronimo/server/branches/3.0-M2/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
Wed Mar  2 14:28:08 2011
@@ -61,7 +61,7 @@ import org.apache.geronimo.kernel.manage
 public abstract class JMXDeploymentManager implements DeploymentManager {
 
     protected Kernel kernel;
-    private ConfigurationManager configurationManager;
+    protected ConfigurationManager configurationManager;
     protected CommandContext commandContext;
     private final Collection<ModuleConfigurer> moduleConfigurers;
 



Mime
View raw message