You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by de...@apache.org on 2010/08/29 20:06:32 UTC

svn commit: r990612 [7/8] - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.jee.v22.jaxbmodel/ org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/...

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/GeronimoV20ServerInfo.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/GeronimoV20ServerInfo.java?rev=990612&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/GeronimoV20ServerInfo.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/GeronimoV20ServerInfo.java Sun Aug 29 18:06:29 2010
@@ -0,0 +1,468 @@
+/*
+ * 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.st.v20.core;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+
+import javax.management.MBeanServerConnection;
+
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GAttributeInfo;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.jee.deployment.Dependency;
+import org.apache.geronimo.jee.naming.Pattern;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.InternalKernelException;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.NoSuchAttributeException;
+import org.apache.geronimo.kernel.NoSuchOperationException;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate;
+import org.apache.geronimo.st.v21.core.IGeronimoServerInfo;
+import org.apache.geronimo.st.v21.core.internal.Trace;
+import org.apache.geronimo.system.jmx.KernelDelegate;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerCore;
+
+/**
+ * @version $Rev: 952535 $ $Date: 2010-06-08 12:40:16 +0800 (Tue, 08 Jun 2010) $
+ */
+public class GeronimoV20ServerInfo implements IGeronimoServerInfo{
+    static final long serialVersionUID = 1L;
+
+    private ArrayList<Kernel> kernels;
+
+    private ArrayList<Pattern> deployedEJBs;
+    private ArrayList<String> securityRealms;
+    private ArrayList<Pattern> jmsConnectionFactories;
+    private ArrayList<Pattern> jmsDestinations;
+    private ArrayList<Pattern> jdbcConnectionPools;
+    private ArrayList<Pattern> javaMailResources;
+    private ArrayList<org.apache.geronimo.jee.deployment.Pattern> credentialStores;
+    private HashMap<org.apache.geronimo.jee.deployment.Pattern,HashMap<String,ArrayList<String>>> credentialStoreAttributes;
+    private ArrayList<Dependency> commonLibs;
+
+
+    private static GeronimoV20ServerInfo instance = new GeronimoV20ServerInfo();
+
+    public static GeronimoV20ServerInfo getInstance() {
+        return instance;
+    }
+
+    public ArrayList<Pattern> getDeployedEjbs() {
+        return deployedEJBs;
+    }
+
+    public ArrayList<String> getSecurityRealms() {
+        return securityRealms;
+    }
+
+    public ArrayList<Pattern> getJmsConnectionFactories() {
+        return jmsConnectionFactories;
+    }
+
+    public ArrayList<Pattern> getJmsDestinations() {
+        return jmsDestinations;
+    }
+
+    public ArrayList<Pattern> getJdbcConnectionPools() {
+        return jdbcConnectionPools;
+    }
+
+    public ArrayList<Pattern> getJavaMailSessions() {
+        return javaMailResources;
+    }
+
+    public ArrayList<org.apache.geronimo.jee.deployment.Pattern> getDeployedCredentialStores() {
+        return credentialStores;
+    }
+    
+    public HashMap<org.apache.geronimo.jee.deployment.Pattern,HashMap<String,ArrayList<String>>> getDeployedCredentialStoreAttributes() {
+        return credentialStoreAttributes;
+    }
+
+    public ArrayList<Dependency> getCommonLibs() {
+        return commonLibs;
+    }
+
+    public void updateInfo() {
+        Job job = new Job("Getting Dynamic Information from Server"){
+            protected IStatus run(IProgressMonitor arg0) {
+                updateKernels();
+                updateDeployedEJBs();
+                updateSecurityRealms();
+                updateJmsConnectionFactories();
+                updateJmsDestinations();
+                updateJdbcConnectionPools();
+                updateJavaMailSessions();
+                updateDeployedCredentialStores();
+                updateCommonLibs();
+                return Status.OK_STATUS;
+            }
+        };
+        job.setPriority(Job.SHORT);
+        job.schedule();
+    }
+
+    private void updateKernels() {
+        kernels = new ArrayList<Kernel>();
+        IServer[] servers = ServerCore.getServers();
+        for (int i = 0; i < servers.length; i++) {
+            if (servers[i].getServerState() == IServer.STATE_STARTED) {
+                try {
+                    GeronimoServerBehaviourDelegate delegate = (GeronimoServerBehaviourDelegate) servers[i]
+                            .getAdapter(GeronimoServerBehaviourDelegate.class);
+                    if (delegate != null) {
+                        MBeanServerConnection connection = delegate
+                                .getServerConnection();
+                        if (connection != null) {
+                            kernels.add(new KernelDelegate(connection));
+                        }
+                    }
+                } catch (SecurityException e) {
+                } catch (Exception e) {
+                    Trace.trace(Trace.WARNING, "Kernel connection failed. "
+                            + e.getMessage());
+                }
+            }
+        }
+    }
+
+    private void updateDeployedEJBs() {
+        deployedEJBs = new ArrayList<Pattern>();
+        ArrayList<Pattern> statelessSessionBeans = getByType("StatelessSessionBean");
+        ArrayList<Pattern> statefulSessionBeans = getByType("StatefulSessionBean");
+        ArrayList<Pattern> messageDrivenBeans = getByType("MessageDrivenBean");
+        ArrayList<Pattern> entityBeans = getByType("EntityBean");
+        deployedEJBs.addAll(statelessSessionBeans);
+        deployedEJBs.addAll(statefulSessionBeans);
+        deployedEJBs.addAll(messageDrivenBeans);
+        deployedEJBs.addAll(entityBeans);
+    }
+
+    private void updateSecurityRealms() {
+        securityRealms = new ArrayList<String>();
+        Map map = Collections.singletonMap("j2eeType", "SecurityRealm");
+        AbstractNameQuery query = new AbstractNameQuery(null, map,
+                Collections.EMPTY_SET);
+        for (int i = 0; i < kernels.size(); i++) {
+            Set beans = kernels.get(i).listGBeans(query);
+            for (Iterator it = beans.iterator(); it.hasNext();) {
+                AbstractName abstractName = (AbstractName) it.next();
+                String name = (String) abstractName.getName().get("name");
+                if (!securityRealms.contains(name)) {
+                    securityRealms.add(name);
+                }
+            }
+        }
+    }
+
+    private void updateJmsConnectionFactories() {
+        String[] requiredInterfaces = new String[] {
+                "javax.jms.ConnectionFactory",
+                "javax.jms.QueueConnectionFactory",
+                "javax.jms.TopicConnectionFactory", };
+        String attribute = "implementedInterfaces";
+        jmsConnectionFactories = getByTypeAttributeValues(
+                "JCAManagedConnectionFactory", attribute, requiredInterfaces);
+    }
+
+    private void updateJmsDestinations() {
+        String[] requiredInterfaces = new String[] { "javax.jms.Queue",
+                "javax.jms.Topic" };
+        String attribute = "adminObjectInterface";
+        jmsDestinations = getByTypeAttributeValues("JCAAdminObject", attribute,
+                requiredInterfaces);
+    }
+
+    private void updateJdbcConnectionPools() {
+        String[] acceptedValues = new String[] { "javax.sql.DataSource" };
+        String attribute = "connectionFactoryInterface";
+        jdbcConnectionPools = getByTypeAttributeValues(
+                "JCAManagedConnectionFactory", attribute, acceptedValues);
+
+    }
+
+    private void updateJavaMailSessions() {
+        javaMailResources = getByType("JavaMailResource");
+    }
+
+    private void updateDeployedCredentialStores() {
+        credentialStores = new ArrayList<org.apache.geronimo.jee.deployment.Pattern>();
+        credentialStoreAttributes = new HashMap<org.apache.geronimo.jee.deployment.Pattern,HashMap<String,ArrayList<String>>> ();
+        Map map = Collections.singletonMap("j2eeType", "GBean");
+        AbstractNameQuery query = new AbstractNameQuery(null, map,
+                Collections.EMPTY_SET);
+        for (int i = 0; i < kernels.size(); i++) {
+        	Kernel kernel = (Kernel)kernels.get(i);
+            Set beans = kernel.listGBeans(query);
+            for (Iterator it = beans.iterator(); it.hasNext();) {
+                AbstractName abstractName = (AbstractName) it.next();
+                try {
+                    GBeanInfo info = kernel.getGBeanInfo(abstractName);
+                    GAttributeInfo attribInfo = info
+                            .getAttribute("credentialStore");
+                    if (attribInfo != null) {
+                        Artifact artifact = abstractName.getArtifact();
+                        Object name = abstractName.getName().get("name");
+                        org.apache.geronimo.jee.deployment.Pattern pattern = new org.apache.geronimo.jee.deployment.Pattern();
+                        pattern.setArtifactId(artifact.getArtifactId());
+                        pattern.setGroupId(artifact.getGroupId());
+                        pattern.setType(artifact.getType());
+                        pattern.setVersion(artifact.getVersion().toString());
+                        pattern.setCustomFoo((String) name);
+                        if (!credentialStores.contains(pattern)) {
+                            credentialStores.add(pattern);
+                        }
+                        
+                      //update attributes of credentialStore
+                    	Map attributeMap = (Map)kernel.getAttribute(abstractName, "credentialStore");
+                    	if (attributeMap!=null){
+                    		HashMap<String,ArrayList<String>> realmMap = new HashMap<String,ArrayList<String>>();
+                    		for (Object obj:attributeMap.keySet()){
+                    			String realmName = (String)obj;
+                    			Map idMap = (Map)attributeMap.get(obj);
+                    			ArrayList<String> idList = new ArrayList<String>();
+                    			idList.addAll(idMap.keySet());                    			
+                    			
+                    			realmMap.put(realmName, idList);
+                    		}               		
+                    		credentialStoreAttributes.put(pattern, realmMap);
+                    	}
+                    }
+                } catch (GBeanNotFoundException e) {
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+    
+
+    private void updateCommonLibs() {
+        List<Object> artifacts = null;
+        commonLibs = new ArrayList<Dependency>();
+        Map map = Collections.singletonMap("j2eeType", "Repository");
+        AbstractNameQuery query = new AbstractNameQuery(null, map,
+                Collections.EMPTY_SET);
+        for (int i = 0; i < kernels.size(); i++) {
+            Set beans = kernels.get(i).listGBeans(query);
+            for (Iterator it = beans.iterator(); it.hasNext();) {
+                AbstractName abstractName = (AbstractName) it.next();
+                try {
+                    GBeanInfo info = kernels.get(i).getGBeanInfo(abstractName);
+                    Object value = kernels.get(i).invoke(abstractName, "list");
+                    if (value instanceof TreeSet) {
+                        artifacts = Arrays.asList(((TreeSet) value).toArray());
+                    }
+                } catch (GBeanNotFoundException e) {
+                    Trace.trace(Trace.WARNING, "GBean Not Found. "
+                            + e.getMessage());
+                } catch (NoSuchOperationException e) {
+                    Trace.trace(Trace.WARNING, "The operation cant invoked. "
+                            + e.getMessage());
+                } catch (InternalKernelException e) {
+                    throw e;
+                } catch (Exception e) {
+                    Trace.trace(Trace.WARNING, "Kernel connection failed.  "
+                            + e.getMessage());
+                }
+
+            }
+        }
+        if (artifacts != null) {
+            for (int i = 0; i < artifacts.size(); i++) {
+                Dependency dependency = new Dependency();
+                dependency.setArtifactId(((Artifact) artifacts.get(i))
+                        .getArtifactId());
+                dependency.setGroupId(((Artifact) artifacts.get(i))
+                        .getGroupId());
+                dependency.setVersion(((Artifact) artifacts.get(i))
+                        .getVersion().toString());
+                dependency.setType(((Artifact) artifacts.get(i)).getType());
+                if (!commonLibs.contains(dependency)) {
+                    commonLibs.add(dependency);
+                }
+            }
+        }
+    }
+
+    private ArrayList<Pattern> getByTypeAttributeValues(String type,
+            String attribute, String[] acceptedValues) {
+        ArrayList<Pattern> result = new ArrayList<Pattern>();
+        Map map = Collections.singletonMap("j2eeType", type);
+        AbstractNameQuery query = new AbstractNameQuery(null, map,
+                Collections.EMPTY_SET);
+        for (int i = 0; i < kernels.size(); i++) {
+            Set beans = kernels.get(i).listGBeans(query);
+            for (Iterator it = beans.iterator(); it.hasNext();) {
+                AbstractName abstractName = (AbstractName) it.next();
+                try {
+                    Object value = kernels.get(i).getAttribute(abstractName,
+                            attribute);
+                    if (value != null) {
+                        if (value instanceof String[]) {
+                            List<String> interfaces = Arrays
+                                    .asList((String[]) value);
+                            for (int j = 0; j < acceptedValues.length; j++) {
+                                if (interfaces.contains(acceptedValues[j])) {
+                                    Pattern pattern = new Pattern();
+                                    Artifact artifact = abstractName
+                                            .getArtifact();
+                                    pattern.setArtifactId(artifact
+                                            .getArtifactId());
+                                    pattern.setGroupId(artifact.getGroupId());
+                                    pattern.setVersion(artifact.getVersion()
+                                            .toString());
+                                    pattern.setName((String) abstractName
+                                            .getName().get("name"));
+                                    if (!result.contains(pattern)) {
+                                        result.add(pattern);
+                                    }
+                                    break;
+                                }
+                            }
+                        }
+                        if (value instanceof String) {
+                            String interfaces = (String) value;
+                            for (int j = 0; j < acceptedValues.length; j++) {
+                                if (interfaces.contains(acceptedValues[j])) {
+                                    Pattern pattern = new Pattern();
+                                    Artifact artifact = abstractName
+                                            .getArtifact();
+                                    pattern.setArtifactId(artifact
+                                            .getArtifactId());
+                                    pattern.setGroupId(artifact.getGroupId());
+                                    pattern.setVersion(artifact.getVersion()
+                                            .toString());
+                                    pattern.setName((String) abstractName
+                                            .getName().get("name"));
+                                    if (!result.contains(pattern)) {
+                                        result.add(pattern);
+                                    }
+                                    break;
+                                }
+                            }
+                        }
+                    }
+                } catch (GBeanNotFoundException e) {
+                } catch (NoSuchAttributeException e) {
+                } catch (Exception e) {
+                    Trace.trace(Trace.WARNING, "Kernel connection failed. "
+                            + e.getMessage());
+                }
+            }
+        }
+        return result;
+    }
+
+    private ArrayList<Pattern> getByType(String type) {
+        ArrayList<Pattern> result = new ArrayList<Pattern>();
+        Map map = Collections.singletonMap("j2eeType", type);
+        AbstractNameQuery query = new AbstractNameQuery(null, map,
+                Collections.EMPTY_SET);
+        for (int i = 0; i < kernels.size(); i++) {
+            Set beans = kernels.get(i).listGBeans(query);
+            for (Iterator it = beans.iterator(); it.hasNext();) {
+                AbstractName abstractName = (AbstractName) it.next();
+                Pattern pattern = new Pattern();
+                Artifact artifact = abstractName.getArtifact();
+                pattern.setArtifactId(artifact.getArtifactId());
+                pattern.setGroupId(artifact.getGroupId());
+                pattern.setVersion(artifact.getVersion().toString());
+                pattern.setName((String) abstractName.getName().get("name"));
+                if (!result.contains(pattern)) {
+                    result.add(pattern);
+                }
+            }
+        }
+        return result;
+    }
+
+    protected void printNamingPatternList(List<Pattern> patternList) {
+        for (int i = 0; i < patternList.size(); i++) {
+            Pattern pattern = patternList.get(i);
+            System.out.println("ArtifactID:" + pattern.getArtifactId()
+                    + " GroupID:" + pattern.getGroupId() + " Module:"
+                    + pattern.getModule() + " Version:" + pattern.getVersion()
+                    + " Name:" + pattern.getName());
+        }
+    }
+
+    protected void printDeploymentPatternList(
+            List<org.apache.geronimo.jee.deployment.Pattern> patternList) {
+        for (int i = 0; i < patternList.size(); i++) {
+            org.apache.geronimo.jee.deployment.Pattern pattern = patternList
+                    .get(i);
+            System.out.println("ArtifactID:" + pattern.getArtifactId()
+                    + " GroupID:" + pattern.getGroupId() + " Module:"
+                    + pattern.getVersion() + " Version:" + pattern.getType()
+                    + " Name:" + pattern.getCustomFoo());
+        }
+    }
+
+    protected void printDependencies(List<Dependency> dependencyList) {
+        for (int i = 0; i < dependencyList.size(); i++) {
+            Dependency dependency = dependencyList.get(i);
+            System.out.println("ArtifactID:" + dependency.getArtifactId()
+                    + " GroupID:" + dependency.getGroupId() + " Type:"
+                    + dependency.getType() + " Version:"
+                    + dependency.getVersion());
+        }
+    }
+
+    public void printServerInfo() {
+        System.out.println("EJB Modules: \n");
+        List<Pattern> ejbModules = getDeployedEjbs();
+        printNamingPatternList(ejbModules);
+        System.out.println("\n\nSecurity Realms: \n");
+        List<String> securityRealms = getSecurityRealms();
+        System.out.println(securityRealms.toString());
+        System.out.println("\n\nJMS Connection Factories: \n");
+        List<Pattern> jmsConnectionFactories = getJmsConnectionFactories();
+        printNamingPatternList(jmsConnectionFactories);
+        System.out.println("\n\nJMS Destinations: \n");
+        List<Pattern> jmsDestinations = getJmsDestinations();
+        printNamingPatternList(jmsDestinations);
+        System.out.println("\n\nJDBC Connection Pools: \n");
+        List<Pattern> jdbcConnectionPools = getJdbcConnectionPools();
+        printNamingPatternList(jdbcConnectionPools);
+        System.out.println("\n\nJava Mail Resources: \n");
+        List<Pattern> javaMailResources = getJavaMailSessions();
+        printNamingPatternList(javaMailResources);
+        System.out.println("\n\nCredential Stores: \n");
+        List<org.apache.geronimo.jee.deployment.Pattern> credentialStores = getDeployedCredentialStores();
+        printDeploymentPatternList(credentialStores);
+        System.out.println("\n\nCommon Libs: \n");
+        List<Dependency> dependencies = getCommonLibs();
+        printDependencies(dependencies);
+    }
+
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/GeronimoV20VersionHandler.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/GeronimoV20VersionHandler.java?rev=990612&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/GeronimoV20VersionHandler.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/GeronimoV20VersionHandler.java Sun Aug 29 18:06:29 2010
@@ -0,0 +1,46 @@
+/*
+ * 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.st.v20.core;
+
+import javax.enterprise.deploy.spi.TargetModuleID;
+
+import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
+import org.apache.geronimo.st.v21.core.GeronimoV21Utils;
+import org.apache.geronimo.st.core.IGeronimoVersionHandler;
+import org.eclipse.wst.server.core.IModule;
+
+/**
+ * @version $Rev: 513891 $ $Date: 2007-03-02 14:09:25 -0500 (Fri, 02 Mar 2007) $
+ */
+public class GeronimoV20VersionHandler implements IGeronimoVersionHandler {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.core.IGeronimoVersionHandler#getConfigID(org.eclipse.wst.server.core.IModule)
+	 */
+	public String getConfigID(IModule module) throws Exception {
+		return GeronimoV21Utils.getConfigId(module);
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.st.core.IGeronimoVersionHandler#createTargetModuleId(java.lang.String)
+	 */
+	public TargetModuleID createTargetModuleId(String configId) {
+		return new TargetModuleIDImpl(null, configId);
+	}
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/internal/Trace.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/internal/Trace.java?rev=990612&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/internal/Trace.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/src/main/java/org/apache/geronimo/st/v20/core/internal/Trace.java Sun Aug 29 18:06:29 2010
@@ -0,0 +1,113 @@
+/*
+ * 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.st.v20.core.internal;
+
+import org.apache.geronimo.st.v20.core.Activator;
+
+/**
+ * Helper class to route trace output.
+ *
+ * @version $Rev: 589873 $ $Date: 2007-10-29 17:48:35 -0400 (Mon, 29 Oct 2007) $
+ */
+public class Trace {
+
+    /**
+     * Finest trace event.
+     */
+    public static byte INFO = 0;
+
+    /**
+     * Warning trace event.
+     */
+    public static byte WARNING = 1;
+
+    /**
+     * Severe trace event.
+     */
+    public static byte SEVERE = 2;
+
+    /**
+     * Trace constructor comment.
+     */
+    private Trace() {
+        super();
+    }
+
+    /**
+     * Trace the given text.
+     * 
+     * @param level
+     *            the trace level
+     * @param s
+     *            a message
+     */
+    public static void trace(byte level, String s) {
+        trace(level, s, null);
+    }
+
+    /**
+     * Trace the given message and exception.
+     * 
+     * @param level
+     *            the trace level
+     * @param s
+     *            a message
+     * @param t
+     *            a throwable
+     */
+    public static void trace(byte level, String s, Throwable t) {
+    	if (Activator.getDefault() == null
+				|| !Activator.getDefault().isDebugging())
+			return;
+
+        System.out.println(Activator.PLUGIN_ID + ":  " + s);
+        if (t != null)
+            t.printStackTrace();
+        
+    }
+
+    /**
+     * Trace the given message 
+     * 
+     * @param tracePoint
+     *            The trace point (e.g., "Exit", "Entry", "Constructor", etc....
+     *            
+     * @param classDotMethod
+     *            The class name + method name (e.g., "Class.method()")
+     *            
+     * @param parms
+     *            Method parameter(s) if the trace point is an "Entry"
+     *            or
+     *            Return value if the trace point is an "Exit"
+     */
+    public static void tracePoint(String tracePoint, String classDotMethod) {
+        trace(Trace.INFO, tracePoint + ": " + classDotMethod + "()" );
+    }   
+    public static void tracePoint(String tracePoint, String classDotMethod, Object... parms) {
+        if ( parms == null ) {
+            trace(Trace.INFO, tracePoint + ": " + classDotMethod + "( null )" );
+        }
+        else {
+            trace(Trace.INFO, tracePoint + ": " + classDotMethod + "(" );
+            for ( int ii=0; ii<parms.length; ii++) {
+                Object parm = parms[ii];
+                trace(Trace.INFO, "    parm" + (ii+1) + "=[" + (parm == null ? null : parm.toString()) + "]" );
+            }
+            trace(Trace.INFO, ")" );
+        }
+    }   
+}

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.ui/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.ui/META-INF/MANIFEST.MF?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.ui/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.ui/META-INF/MANIFEST.MF Sun Aug 29 18:06:29 2010
@@ -3,9 +3,8 @@ Bundle-ManifestVersion: 2
 Bundle-Name: Geronimo Server Tools V20 UI Plug-in
 Bundle-SymbolicName: org.apache.geronimo.st.v20.ui;singleton:=true
 Bundle-Version: 3.0.0
-Bundle-Activator: org.apache.geronimo.st.v21.ui.Activator
 Require-Bundle: org.apache.geronimo.runtime.common,
- org.apache.geronimo.st.v21.core,
+ org.apache.geronimo.st.v20.core,
  org.apache.geronimo.st.ui,
  org.apache.geronimo.st.v21.ui,
  org.apache.geronimo.jee.v21.jaxbmodel,

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.ui/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.ui/plugin.xml?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.ui/plugin.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.ui/plugin.xml Sun Aug 29 18:06:29 2010
@@ -32,7 +32,7 @@
      -->
     <extension point="org.eclipse.wst.common.project.facet.ui.wizardPages">
   		<wizard-pages action="geronimo.plan.install.v20">
-    		<page class="org.apache.geronimo.st.ui.wizards.FacetInstallPage"/>
+    		<page class="org.apache.geronimo.st.v21.ui.wizards.FacetInstallPage"/>
   		</wizard-pages>
 	</extension>  
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/plugin.xml?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/plugin.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/plugin.xml Sun Aug 29 18:06:29 2010
@@ -20,7 +20,7 @@
 <!-- $Rev: 589873 $ $Date: 2007-10-29 17:48:35 -0400 (Mon, 29 Oct 2007) $ -->
 
 <plugin>
-
+    <extension-point id="geronimoinfo" name="Geronimo Server Info" schema="schema/geronimoinfo.exsd"/>
 
     <!-- 
      | 
@@ -138,5 +138,13 @@
         </default-facets>
     </extension>
     
+   <extension
+          point="org.apache.geronimo.st.v21.core.geronimoinfo">
+       <provider
+             class="org.apache.geronimo.st.v21.core.GeronimoV21ServerInfo"
+             versions="2.1">
+       </provider>
+    </extension>
+
 
 </plugin>

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/schema/geronimoinfo.exsd
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/schema/geronimoinfo.exsd?rev=990612&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/schema/geronimoinfo.exsd (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/schema/geronimoinfo.exsd Sun Aug 29 18:06:29 2010
@@ -0,0 +1,106 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.apache.geronimo.st.v21.core" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appInfo>
+         <meta.schema plugin="org.apache.geronimo.st.v21.core" id="geronimoinfo" name="Geronimo Server Info"/>
+      </appInfo>
+      <documentation>
+         [Enter description of this extension point.]
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appInfo>
+            <meta.element />
+         </appInfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="provider"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appInfo>
+                  <meta.attribute translatable="true"/>
+               </appInfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="provider">
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="versions" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="since"/>
+      </appInfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="examples"/>
+      </appInfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="apiinfo"/>
+      </appInfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appInfo>
+         <meta.section type="implementation"/>
+      </appInfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+
+</schema>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServer.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServer.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServer.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServer.java Sun Aug 29 18:06:29 2010
@@ -206,8 +206,10 @@ public class GeronimoServer extends Gero
         return getAttribute(PROPERTY_NOT_REDEPLOY_JSP_FILES,false);
     }
 
+    @Override
     public IGeronimoServerPluginManager getServerPluginManager() {
         return new GeronimoServerV21PluginManager(this.getServer());
     }
 
+
 }
\ No newline at end of file

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerInfoManager.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerInfoManager.java?rev=990612&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerInfoManager.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerInfoManager.java Sun Aug 29 18:06:29 2010
@@ -0,0 +1,74 @@
+/*
+ * 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.st.v21.core;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.geronimo.st.v21.core.internal.Trace;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+
+/**
+ * @version $Rev: 956478 $ $Date: 2010-06-21 15:47:59 +0800 (Mon, 21 Jun 2010) $
+ */
+public class GeronimoServerInfoManager {
+	
+	private static Map<String, IGeronimoServerInfo> providers = new HashMap<String, IGeronimoServerInfo>();
+
+	static {
+		loadExtensionPoints();
+	}
+
+	private static synchronized void loadExtensionPoints() {
+		Trace.tracePoint("ENTRY", "GeronimoServerInfo.loadExtensionPoints");
+
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		IConfigurationElement[] cf = registry.getConfigurationElementsFor(
+				Activator.PLUGIN_ID, "geronimoinfo");
+		for (int i = 0; i < cf.length; i++) {
+			IConfigurationElement element = cf[i];
+			if ("provider".equals(element.getName())) {
+				try {
+					IGeronimoServerInfo provider = (IGeronimoServerInfo) element
+							.createExecutableExtension("class");
+					String versions = element.getAttribute("versions");
+					String[] versionArray = versions.split(",");
+					for (int j = 0; j < versionArray.length; j++) {
+						providers.put(versionArray[j], provider);
+					}
+				} catch (CoreException e) {
+					Trace.tracePoint("CoreException",
+							"GeronimoServerInfo.loadExtensionPoints");
+					e.printStackTrace();
+				}
+			}
+		}
+
+		Trace.tracePoint("EXIT", "GeronimoServerInfo.loadExtensionPoints");
+	}
+	 
+
+    public static IGeronimoServerInfo getProvider(String version) {
+        return providers.get(version);
+    }
+
+  
+
+}

Copied: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21ServerInfo.java (from r990310, geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerInfo.java)
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21ServerInfo.java?p2=geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21ServerInfo.java&p1=geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerInfo.java&r1=990310&r2=990612&rev=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerInfo.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21ServerInfo.java Sun Aug 29 18:06:29 2010
@@ -53,8 +53,7 @@ import org.eclipse.wst.server.core.Serve
 /**
  * @version $Rev$ $Date$
  */
-public class GeronimoServerInfo {
-    static final long serialVersionUID = 1L;
+public class GeronimoV21ServerInfo implements IGeronimoServerInfo{
 
     private ArrayList<Kernel> kernels;
 
@@ -69,12 +68,12 @@ public class GeronimoServerInfo {
     private ArrayList<Dependency> commonLibs;
 
     // singleton class
-    private GeronimoServerInfo() {
+    private GeronimoV21ServerInfo() {
     }
 
-    private static GeronimoServerInfo instance = new GeronimoServerInfo();
+    private static GeronimoV21ServerInfo instance = new GeronimoV21ServerInfo();
 
-    public static GeronimoServerInfo getInstance() {
+    public static GeronimoV21ServerInfo getInstance() {
         return instance;
     }
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java Sun Aug 29 18:06:29 2010
@@ -20,7 +20,6 @@ import javax.xml.bind.JAXBElement;
 
 import org.apache.geronimo.jaxbmodel.common.operations.JAXBUtils;
 import org.apache.geronimo.jee.application.Application;
-import org.apache.geronimo.jee.applicationclient.ApplicationClient;
 import org.apache.geronimo.jee.connector.Connector;
 import org.apache.geronimo.jee.deployment.Artifact;
 import org.apache.geronimo.jee.deployment.Environment;

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/IGeronimoServerInfo.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/IGeronimoServerInfo.java?rev=990612&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/IGeronimoServerInfo.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/IGeronimoServerInfo.java Sun Aug 29 18:06:29 2010
@@ -0,0 +1,52 @@
+/*
+ * 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.st.v21.core;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import org.apache.geronimo.jee.deployment.Dependency;
+import org.apache.geronimo.jee.naming.Pattern;
+
+/**
+ * @version $Rev: 952535 $ $Date: 2010-06-08 12:40:16 +0800 (Tue, 08 Jun 2010) $
+ */
+public interface IGeronimoServerInfo {
+    
+    public ArrayList<String> getSecurityRealms();
+
+    public ArrayList<Pattern> getJmsConnectionFactories() ;
+
+    public ArrayList<Pattern> getJmsDestinations();
+
+    public ArrayList<Pattern> getJdbcConnectionPools();
+    
+    public ArrayList<Pattern> getDeployedEjbs();
+
+    public ArrayList<Pattern> getJavaMailSessions();
+    
+    public ArrayList<Dependency> getCommonLibs();
+
+    public ArrayList<org.apache.geronimo.jee.deployment.Pattern> getDeployedCredentialStores() ;
+    
+    public HashMap<org.apache.geronimo.jee.deployment.Pattern,HashMap<String,ArrayList<String>>> getDeployedCredentialStoreAttributes();
+
+    public void updateInfo();
+
+    public void printServerInfo() ;
+    
+}

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/GeronimoServerV21PluginManager.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/GeronimoServerV21PluginManager.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/GeronimoServerV21PluginManager.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/operations/GeronimoServerV21PluginManager.java Sun Aug 29 18:06:29 2010
@@ -20,9 +20,9 @@ import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
@@ -44,7 +44,6 @@ import javax.xml.bind.JAXBElement;
 import org.apache.geronimo.deployment.plugin.jmx.RemoteDeploymentManager;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
-import org.apache.geronimo.jaxbmodel.common.operations.JAXBUtils;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.ConfigurationData;
 import org.apache.geronimo.kernel.config.ConfigurationInfo;
@@ -216,9 +215,11 @@ public class GeronimoServerV21PluginMana
 
     // mimics org.apache.geronimo.system.plugin.PluginInstallerGBean.updatePluginMetadata
     // but puts the metadata in our local directory
-    public void savePluginXML (String configId, PluginType metadata) {
-        Trace.tracePoint("Entry", "GeronimoServerPluginManager.savePluginXML", configId, metadata);
+    public void savePluginXML (String configId, Object pluginMetaData) {
+        Trace.tracePoint("Entry", "GeronimoServerPluginManager.savePluginXML", configId, pluginMetaData);
 
+        PluginType metadata = (PluginType) pluginMetaData;
+        
         Artifact artifact = Artifact.create(configId);
         File dir = new File (getArtifactLocation(artifact));
 
@@ -346,9 +347,11 @@ public class GeronimoServerV21PluginMana
         Trace.tracePoint("Exit", "GeronimoServerPluginManager.writeToZip");
     }
 
-    public void updatePluginList (String localRepoDir, PluginType metadata) throws Exception {
-        Trace.tracePoint("Entry", "GeronimoServerPluginManager.updatePluginList", localRepoDir, metadata);
+    public void updatePluginList (String localRepoDir, Object data) throws Exception {
+        Trace.tracePoint("Entry", "GeronimoServerPluginManager.updatePluginList", localRepoDir, data);
 
+        PluginType metadata = (PluginType) data;
+        
         PluginListType pluginList = readPluginList(localRepoDir);
         File listFile = new File (localRepoDir, "geronimo-plugins.xml");
 
@@ -501,10 +504,11 @@ public class GeronimoServerV21PluginMana
     }
 
     public ArtifactType toArtifactType(String configId) {
-        return toArtifactType (Artifact.create(configId));
+        return (ArtifactType) toArtifactType (Artifact.create(configId));
     }
 
-    public ArtifactType toArtifactType(Artifact id) {
+    public ArtifactType toArtifactType(Object artifactId) {
+        Artifact id = (Artifact) artifactId;
         ArtifactType artifact = new ArtifactType();
         artifact.setGroupId(id.getGroupId());
         artifact.setArtifactId(id.getArtifactId());
@@ -513,11 +517,14 @@ public class GeronimoServerV21PluginMana
         return artifact;
     }
 
-    public Artifact toArtifact(ArtifactType id) {
+    public Artifact toArtifact(Object artifactTypeId) {
+        ArtifactType id = (ArtifactType) artifactTypeId;
         return new Artifact (id.getGroupId(), id.getArtifactId(), id.getVersion(), id.getType());
     }
 
-    public void addGeronimoDependencies(ConfigurationData data, List<DependencyType> deps, boolean includeVersion) {
+    public void addGeronimoDependencies(Object configuData, List depList, boolean includeVersion) {
+        List<DependencyType> deps = (List<DependencyType>) depList;
+        ConfigurationData data = (ConfigurationData) configuData;
         processDependencyList(data.getEnvironment().getDependencies(), deps, includeVersion);
         Map<String, ConfigurationData> children = data.getChildConfigurations();
         for (ConfigurationData child : children.values()) {
@@ -527,7 +534,7 @@ public class GeronimoServerV21PluginMana
 
     private void processDependencyList(List<Dependency> real, List<DependencyType> deps, boolean includeVersion) {
         for (Dependency dep : real) {
-            DependencyType dependency = toDependencyType(dep, includeVersion);
+            DependencyType dependency = (DependencyType) toDependencyType(dep, includeVersion);
             if (!deps.contains(dependency)) {
                 deps.add(dependency);
             }
@@ -535,10 +542,11 @@ public class GeronimoServerV21PluginMana
     }
 
     public DependencyType toDependencyType(String configId) {
-        return toDependencyType(new Dependency(Artifact.create(configId), ImportType.ALL), true);
+        return (DependencyType) toDependencyType(new Dependency(Artifact.create(configId), ImportType.ALL), true);
     }
 
-    public DependencyType toDependencyType(Dependency dep, boolean includeVersion) {
+    public DependencyType toDependencyType(Object dependencyObject, boolean includeVersion) {
+        Dependency dep = (Dependency) dependencyObject;
         Artifact id = dep.getArtifact();
         DependencyType dependency = new DependencyType();
         dependency.setGroupId(id.getGroupId());
@@ -550,8 +558,11 @@ public class GeronimoServerV21PluginMana
         return dependency;
     }
 
-    public boolean validatePlugin (PluginType plugin) {
-        Trace.tracePoint("Entry", "GeronimoServerPluginManager.validatePlugin", plugin);
+    public boolean validatePlugin (Object pluginObject) {
+        Trace.tracePoint("Entry", "GeronimoServerPluginManager.validatePlugin", pluginObject);
+        
+        PluginType plugin = (PluginType) pluginObject;
+        
         boolean valid = true;
         try {
             pluginInstaller.validatePlugin(plugin);
@@ -565,9 +576,10 @@ public class GeronimoServerV21PluginMana
 
     // mimics org.apache.geronimo.system.plugin.PluginInstallerGbean.install
     // but uses our local directory to get the plugins
-    public ArrayList<String> installPlugins (String localRepoDir, List<PluginType> pluginList) {
+    public ArrayList<String> installPlugins (String localRepoDir, List plugins) {
         Trace.tracePoint("Entry", "GeronimoServerPluginManager.installPlugins", localRepoDir, pluginList);
         ArrayList<String> eventLog = new ArrayList<String>();
+        List<PluginType> pluginList = (List<PluginType>)plugins;
 
         //List<Artifact> downloadedArtifacts = new ArrayList<Artifact>();
         try {
@@ -760,4 +772,5 @@ public class GeronimoServerV21PluginMana
         }
         Trace.tracePoint("Exit", "GeronimoServerPluginManager.writeToRepository");
     }
+
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/plugin.xml?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/plugin.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/plugin.xml Sun Aug 29 18:06:29 2010
@@ -32,15 +32,15 @@
      -->
     <extension point="org.eclipse.wst.common.project.facet.ui.wizardPages">
         <wizard-pages action="geronimo.plan.install.v21">
-            <page class="org.apache.geronimo.st.ui.wizards.FacetInstallPage"/>
+            <page class="org.apache.geronimo.st.v21.ui.wizards.FacetInstallPage"/>
         </wizard-pages>
     </extension>
 
     <extension point="org.eclipse.wst.server.ui.editorPages">
         <page id="org.eclipse.wst.server.editor.plugins" order="10"
               name="%serverEditorPluginPage"
-              typeIds="org.apache.geronimo.server.1*,
-                       org.apache.geronimo.server.2*"
+              typeIds="org.apache.geronimo.server.21,
+                       org.apache.geronimo.server.22"
               insertionIds="org.eclipse.wst.server.editor.plugins"
               class="org.apache.geronimo.st.v21.ui.pages.ServerPluginPage"/>
     </extension>
@@ -48,19 +48,10 @@
     <extension point="org.eclipse.wst.server.ui.editorPageSections">
         <section id="org.apache.server.geronimo.plugins" order="10"
             insertionId="org.eclipse.wst.server.editor.plugins"
-            typeIds="org.apache.geronimo.server.1*,
-                     org.apache.geronimo.server.2*"
+            typeIds="org.apache.geronimo.server.21,
+                     org.apache.geronimo.server.22"
             class="org.apache.geronimo.st.v21.ui.sections.ServerPluginSection">
         </section>
     </extension>
     
-    <extension point="org.eclipse.debug.core.statusHandlers">
-        <statusHandler
-            id="com.example.ExampleIdentifier"
-            class="com.example.ExampleStatusHandler"
-            plugin="com.example.ExamplePluginId"
-            code="123">
-        </statusHandler>
-    </extension>
-
 </plugin>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java Sun Aug 29 18:06:29 2010
@@ -25,7 +25,7 @@ import org.apache.geronimo.jaxbmodel.com
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
 import org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader;
-import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v21.core.GeronimoV21ServerInfo;
 import org.apache.geronimo.st.v21.core.GeronimoV21Utils;
 import org.apache.geronimo.st.v21.ui.pages.AppClientGeneralPage;
 import org.apache.geronimo.st.v21.ui.pages.AppClientSecurityPage;
@@ -128,6 +128,6 @@ public class GeronimoFormContentLoader e
     }
 
     public void triggerGeronimoServerInfoUpdate() {
-        GeronimoServerInfo.getInstance().updateInfo();
+        GeronimoV21ServerInfo.getInstance().updateInfo();
     }
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientGeneralPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientGeneralPage.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientGeneralPage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientGeneralPage.java Sun Aug 29 18:06:29 2010
@@ -18,7 +18,7 @@ package org.apache.geronimo.st.v21.ui.pa
 
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
-import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfoManager;
 import org.apache.geronimo.st.v21.ui.sections.AppClientClientGeneralSection;
 import org.apache.geronimo.st.v21.ui.sections.AppClientServerGeneralSection;
 import org.eclipse.ui.forms.IManagedForm;
@@ -54,7 +54,7 @@ public class AppClientGeneralPage extend
 
 	@Override
 	protected void triggerGeronimoServerInfoUpdate() {
-		GeronimoServerInfo.getInstance().updateInfo();
+		GeronimoServerInfoManager.getProvider(getRuntimeVersion()).updateInfo();
 	}
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientSecurityPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientSecurityPage.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientSecurityPage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientSecurityPage.java Sun Aug 29 18:06:29 2010
@@ -18,7 +18,7 @@ package org.apache.geronimo.st.v21.ui.pa
 
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
-import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfoManager;
 import org.apache.geronimo.st.v21.ui.sections.AppClientSecuritySection;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.ui.forms.IManagedForm;
@@ -64,7 +64,7 @@ public class AppClientSecurityPage exten
 
     @Override
     protected void triggerGeronimoServerInfoUpdate() {
-        GeronimoServerInfo.getInstance().updateInfo();
+        GeronimoServerInfoManager.getProvider(getRuntimeVersion()).updateInfo();
     }
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppGeneralPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppGeneralPage.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppGeneralPage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppGeneralPage.java Sun Aug 29 18:06:29 2010
@@ -18,7 +18,7 @@ package org.apache.geronimo.st.v21.ui.pa
 
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
-import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfoManager;
 import org.apache.geronimo.st.v21.ui.sections.AppGeneralSection;
 import org.eclipse.ui.forms.IManagedForm;
 import org.eclipse.ui.forms.editor.FormEditor;
@@ -52,7 +52,7 @@ public class AppGeneralPage extends Abst
 
 	@Override
 	protected void triggerGeronimoServerInfoUpdate() {
-		GeronimoServerInfo.getInstance().updateInfo();
+		GeronimoServerInfoManager.getProvider(getRuntimeVersion()).updateInfo();
 	}
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorOverviewPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorOverviewPage.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorOverviewPage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorOverviewPage.java Sun Aug 29 18:06:29 2010
@@ -18,7 +18,7 @@ package org.apache.geronimo.st.v21.ui.pa
 
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
-import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfoManager;
 import org.apache.geronimo.st.v21.ui.sections.ConnectorGeneralSection;
 import org.eclipse.ui.forms.IManagedForm;
 import org.eclipse.ui.forms.editor.FormEditor;
@@ -52,7 +52,7 @@ public class ConnectorOverviewPage exten
 
 	@Override
 	protected void triggerGeronimoServerInfoUpdate() {
-		GeronimoServerInfo.getInstance().updateInfo();
+		GeronimoServerInfoManager.getProvider(getRuntimeVersion()).updateInfo();
 	}
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorPage.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorPage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorPage.java Sun Aug 29 18:06:29 2010
@@ -17,13 +17,10 @@
 package org.apache.geronimo.st.v21.ui.pages;
 
 import org.apache.geronimo.jee.application.Application;
-import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
 import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
-
-import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfoManager;
 import org.apache.geronimo.st.v21.ui.sections.DBPoolSection;
-
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.ui.forms.IManagedForm;
 import org.eclipse.ui.forms.editor.FormEditor;
@@ -59,7 +56,7 @@ public class ConnectorPage extends Abstr
 
 	@Override
 	protected void triggerGeronimoServerInfoUpdate() {
-		GeronimoServerInfo.getInstance().updateInfo();
+		GeronimoServerInfoManager.getProvider(getRuntimeVersion()).updateInfo();
 	}
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPage.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPage.java Sun Aug 29 18:06:29 2010
@@ -23,7 +23,7 @@ import org.apache.geronimo.jee.jaxbmodel
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
 import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
-import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfoManager;
 import org.apache.geronimo.st.v21.ui.sections.AdminObjectSection;
 import org.apache.geronimo.st.v21.ui.sections.ClassFilterSection;
 import org.apache.geronimo.st.v21.ui.sections.DependencySection;
@@ -49,7 +49,7 @@ public class DeploymentPage extends Abst
      * @see org.apache.geronimo.ui.pages.AbstractGeronimoFormPage#fillBody(org.eclipse.ui.forms.IManagedForm)
      */
     protected void fillBody(IManagedForm managedForm) {
-        managedForm.addPart(new DependencySection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan()), body, toolkit, getStyle()));
+        managedForm.addPart(new DependencySection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan()), body, toolkit, getStyle(),getRuntimeVersion()));
         managedForm.addPart(new GBeanSection(getDeploymentPlan(), JAXBModelUtils.getGbeans(getDeploymentPlan()), body, toolkit, getStyle()));
         managedForm.addPart(new ClassFilterSection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan()), body, toolkit, getStyle(), true, true));
         managedForm.addPart(new ClassFilterSection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan()), body, toolkit, getStyle(), true, false));
@@ -64,7 +64,7 @@ public class DeploymentPage extends Abst
             managedForm.addPart(new AdminObjectSection(getDeploymentPlan(), body, toolkit, getStyle(), connector.getAdminobject()));
         }
         if (ApplicationClient.class.isInstance(getDeploymentPlan().getValue())) {
-            managedForm.addPart(new DependencySection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan(), false), body, toolkit, getStyle(), false));
+            managedForm.addPart(new DependencySection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan(), false), body, toolkit, getStyle(), false, getRuntimeVersion()));
             managedForm.addPart(new ClassFilterSection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan(), false), body, toolkit, getStyle(), false, true));
             managedForm.addPart(new ClassFilterSection(getDeploymentPlan(), JAXBModelUtils.getEnvironment(getDeploymentPlan(), false), body, toolkit, getStyle(), false, false));
         }
@@ -88,7 +88,7 @@ public class DeploymentPage extends Abst
 
     @Override
     protected void triggerGeronimoServerInfoUpdate() {
-        GeronimoServerInfo.getInstance().updateInfo();
+        GeronimoServerInfoManager.getProvider(getRuntimeVersion()).updateInfo();
     }
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/EjbOverviewPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/EjbOverviewPage.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/EjbOverviewPage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/EjbOverviewPage.java Sun Aug 29 18:06:29 2010
@@ -17,7 +17,7 @@
 package org.apache.geronimo.st.v21.ui.pages;
 
 import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
-import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfoManager;
 import org.apache.geronimo.st.v21.ui.sections.OpenEjbJarCMPSection;
 import org.apache.geronimo.st.v21.ui.sections.OpenEjbJarGeneralSection;
 import org.eclipse.ui.forms.IManagedForm;
@@ -44,6 +44,6 @@ public class EjbOverviewPage extends Abs
 
     @Override
     protected void triggerGeronimoServerInfoUpdate() {
-        GeronimoServerInfo.getInstance().updateInfo();
+        GeronimoServerInfoManager.getProvider(getRuntimeVersion()).updateInfo();
     }
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/NamingFormPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/NamingFormPage.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/NamingFormPage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/NamingFormPage.java Sun Aug 29 18:06:29 2010
@@ -22,7 +22,7 @@ import org.apache.geronimo.jee.web.WebAp
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
 import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
-import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfoManager;
 import org.apache.geronimo.st.v21.ui.sections.EjbLocalRefSection;
 import org.apache.geronimo.st.v21.ui.sections.EjbRefSection;
 import org.apache.geronimo.st.v21.ui.sections.EjbRelationSection;
@@ -98,6 +98,6 @@ public class NamingFormPage extends Abst
 
     @Override
     protected void triggerGeronimoServerInfoUpdate() {
-        GeronimoServerInfo.getInstance().updateInfo();
+        GeronimoServerInfoManager.getProvider(getRuntimeVersion()).updateInfo();
     }
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/SecurityPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/SecurityPage.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/SecurityPage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/SecurityPage.java Sun Aug 29 18:06:29 2010
@@ -19,7 +19,7 @@ package org.apache.geronimo.st.v21.ui.pa
 import org.apache.geronimo.jee.jaxbmodel.operations.JAXBModelUtils;
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
-import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfoManager;
 import org.apache.geronimo.st.v21.ui.sections.SecurityAdvancedSection;
 import org.apache.geronimo.st.v21.ui.sections.SecurityRealmSection;
 import org.apache.geronimo.st.v21.ui.sections.SecurityRoleMappingSection;
@@ -43,8 +43,8 @@ public class SecurityPage extends Abstra
      */
     protected void fillBody(IManagedForm managedForm) {
     	managedForm.addPart(new SecurityRealmSection(getDeploymentPlan(),JAXBModelUtils.getGbeans(getDeploymentPlan()), body, toolkit, getStyle()));	
-        managedForm.addPart(new SecurityRoleMappingSection(getDeploymentPlan(), getDeploymentDescriptor(), body, toolkit, getStyle()));
-        managedForm.addPart(new SecurityAdvancedSection(getDeploymentPlan(), body, toolkit, getStyle()));
+        managedForm.addPart(new SecurityRoleMappingSection(getDeploymentPlan(), getDeploymentDescriptor(), body, toolkit, getStyle(),getRuntimeVersion()));
+        managedForm.addPart(new SecurityAdvancedSection(getDeploymentPlan(), body, toolkit, getStyle(),getRuntimeVersion()));
     }
 
     /*
@@ -69,7 +69,7 @@ public class SecurityPage extends Abstra
 
     @Override
     protected void triggerGeronimoServerInfoUpdate() {
-        GeronimoServerInfo.getInstance().updateInfo();
+        GeronimoServerInfoManager.getProvider(getRuntimeVersion()).updateInfo();
     }
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ServerPluginPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ServerPluginPage.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ServerPluginPage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ServerPluginPage.java Sun Aug 29 18:06:29 2010
@@ -26,8 +26,9 @@ import org.eclipse.swt.widgets.Composite
 import org.eclipse.ui.IEditorInput;
 import org.eclipse.ui.IEditorSite;
 import org.eclipse.ui.forms.ManagedForm;
-import org.eclipse.ui.forms.widgets.*;
-import org.eclipse.wst.server.ui.editor.*;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.wst.server.ui.editor.ServerEditorPart;
 import org.eclipse.wst.server.ui.internal.ImageResource;
 
 /**

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/WebGeneralPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/WebGeneralPage.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/WebGeneralPage.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/WebGeneralPage.java Sun Aug 29 18:06:29 2010
@@ -18,7 +18,7 @@ package org.apache.geronimo.st.v21.ui.pa
 
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
-import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfoManager;
 import org.apache.geronimo.st.v21.ui.sections.WebContainerSection;
 import org.apache.geronimo.st.v21.ui.sections.WebGeneralSection;
 import org.eclipse.ui.forms.IManagedForm;
@@ -54,6 +54,6 @@ public class WebGeneralPage extends Abst
 
     @Override
     protected void triggerGeronimoServerInfoUpdate() {
-        GeronimoServerInfo.getInstance().updateInfo();
+        GeronimoServerInfoManager.getProvider(getRuntimeVersion()).updateInfo();
     }
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/DependencySection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/DependencySection.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/DependencySection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/DependencySection.java Sun Aug 29 18:06:29 2010
@@ -41,18 +41,21 @@ public class DependencySection extends A
 
     boolean isServerEnvironment;
     protected Environment environment;
+    private String runtimeVersionNumber;
 
-    public DependencySection(JAXBElement plan, Environment environment, Composite parent, FormToolkit toolkit, int style) {
-        this(plan, environment, parent, toolkit, style, true);
+    public DependencySection(JAXBElement plan, Environment environment, Composite parent, FormToolkit toolkit, int style,String runtimeVersion) {
+        this(plan, environment, parent, toolkit, style, true, runtimeVersion);
     }
 
-    public DependencySection(JAXBElement plan, Environment environment, Composite parent, FormToolkit toolkit, int style, boolean isServerEnvironment) {
+    public DependencySection(JAXBElement plan, Environment environment, Composite parent, FormToolkit toolkit, int style, boolean isServerEnvironment,String runtimeVersion) {
         super(plan, parent, toolkit, style);
         this.environment = environment;
         this.isServerEnvironment = isServerEnvironment; 
         this.COLUMN_NAMES = new String[] {
                 CommonMessages.groupId, CommonMessages.artifactId, CommonMessages.version, CommonMessages.artifactType
         };
+        
+        runtimeVersionNumber = runtimeVersion;
         createClient();
         getSection().setExpanded(false);
     }
@@ -139,4 +142,8 @@ public class DependencySection extends A
             }
         };
     }
+    
+    public String getRuntimeVersion(){
+        return runtimeVersionNumber;
+    }
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/SecurityAdvancedSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/SecurityAdvancedSection.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/SecurityAdvancedSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/SecurityAdvancedSection.java Sun Aug 29 18:06:29 2010
@@ -33,7 +33,7 @@ import org.apache.geronimo.jee.security.
 import org.apache.geronimo.jee.security.SubjectInfo;
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
-import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfoManager;
 import org.apache.geronimo.st.v21.ui.wizards.SecurityRunAsSubjectWizard;
 import org.eclipse.jface.viewers.IBaseLabelProvider;
 import org.eclipse.jface.viewers.IContentProvider;
@@ -71,10 +71,13 @@ public class SecurityAdvancedSection ext
 
     protected Button useContextHandler;
     
+    protected String runtimeVersionNumber;
+    
     private HashMap<Pattern,HashMap<String,ArrayList<String>>> credentialStoreAttributes;
 
-    public SecurityAdvancedSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style) {
+    public SecurityAdvancedSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, String runtimeVersion) {
         super(plan, parent, toolkit, style);
+        runtimeVersionNumber=runtimeVersion;
         createClient();
     }
 
@@ -394,7 +397,7 @@ public class SecurityAdvancedSection ext
             credentialStoreRef.add(""); //users will select this empty string to unset credentialStoreRef
         }
         
-        List<Pattern> deployedCredentialStores = GeronimoServerInfo.getInstance().getDeployedCredentialStores();
+        List<Pattern> deployedCredentialStores = GeronimoServerInfoManager.getProvider(runtimeVersionNumber).getDeployedCredentialStores();
         Pattern pattern = new Pattern();
         pattern.setCustomFoo(credentialStoreRefName);
         if (deployedCredentialStores.contains(pattern)) {
@@ -407,7 +410,7 @@ public class SecurityAdvancedSection ext
             credentialStoreRef.add(credentialStoreName);
             credentialStoreList.put(credentialStoreName, deployedCredentialStores.get(i));
         }
-        credentialStoreAttributes = GeronimoServerInfo.getInstance().getDeployedCredentialStoreAttributes();
+        credentialStoreAttributes = GeronimoServerInfoManager.getProvider(runtimeVersionNumber).getDeployedCredentialStoreAttributes();
         credentialStoreRef.select(0);
     }
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/SecurityRoleMappingSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/SecurityRoleMappingSection.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/SecurityRoleMappingSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/SecurityRoleMappingSection.java Sun Aug 29 18:06:29 2010
@@ -53,6 +53,8 @@ import org.eclipse.ui.forms.widgets.Form
  * @version $Rev$ $Date$
  */
 public class SecurityRoleMappingSection extends AbstractTreeSection {
+    
+    private String runtimeVersionNumber;
 
     public SecurityRoleMappingSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style) {
         super(plan, parent, toolkit, style);
@@ -60,8 +62,11 @@ public class SecurityRoleMappingSection 
     }
 
     public SecurityRoleMappingSection(JAXBElement plan, AbstractDeploymentDescriptor descriptor, Composite parent,
-            FormToolkit toolkit, int style) {
+            FormToolkit toolkit, int style,String runtimeVersion) {
         super(plan, descriptor, parent, toolkit, style);
+        
+        runtimeVersionNumber = runtimeVersion;
+        
         createClient();
     }
 
@@ -291,4 +296,8 @@ public class SecurityRoleMappingSection 
             }
         };
     }
+    
+    public String getRuntimeVersion(){
+        return runtimeVersionNumber;
+    }
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/DependencyWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/DependencyWizard.java?rev=990612&r1=990611&r2=990612&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/DependencyWizard.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/DependencyWizard.java Sun Aug 29 18:06:29 2010
@@ -18,13 +18,14 @@ package org.apache.geronimo.st.v21.ui.wi
 
 import java.util.List;
 
-import org.apache.geronimo.jee.deployment.Dependency;
 import org.apache.geronimo.jaxbmodel.common.operations.JAXBObjectFactory;
+import org.apache.geronimo.jee.deployment.Dependency;
+import org.apache.geronimo.jee.jaxbmodel.operations.JAXBObjectFactoryImpl;
 import org.apache.geronimo.st.ui.CommonMessages;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
-import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
-import org.apache.geronimo.jee.jaxbmodel.operations.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfoManager;
+import org.apache.geronimo.st.v21.ui.sections.DependencySection;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Composite;
@@ -110,7 +111,8 @@ public class DependencyWizard extends Ab
         }
 
         public void populateTable() {
-            List<Dependency> serverList = GeronimoServerInfo.getInstance().getCommonLibs();
+            String runtimeVersion  = ((DependencySection)(DependencyWizard.this.section)).getRuntimeVersion();
+            List<Dependency> serverList = GeronimoServerInfoManager.getProvider(runtimeVersion).getCommonLibs();
             List<Dependency> alreadyAddedDependencies = (List<Dependency>) section.getObjectContainer();
             serverList.removeAll(alreadyAddedDependencies);
             for (int i = 0; i < serverList.size(); ++i) {