geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r389907 [2/3] - in /geronimo/branches/1.1: applications/console-core/src/java/org/apache/geronimo/console/util/ applications/console-standard/src/java/org/apache/geronimo/console/configmanager/ applications/console-standard/src/java/org/apa...
Date Wed, 29 Mar 2006 22:17:01 GMT
Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java Wed Mar 29 14:16:54 2006
@@ -23,7 +23,6 @@
 
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.GBeanQuery;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.kernel.jmx.JMXUtil;
@@ -88,7 +87,6 @@
      * @param name the name to check
      * @return true if there is a gbean registered under the specified name; false otherwise
      */
-    boolean isLoaded(ObjectName name);
     boolean isLoaded(AbstractName name);
     boolean isLoaded(String shortName);
     boolean isLoaded(Class type);
@@ -115,7 +113,6 @@
      * @throws InternalKernelException if there GBean is not state manageable or if there is a general error
      * @throws IllegalStateException If the gbean is disabled
      */
-    void startGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
     void startGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
     void startGBean(String shortName) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
     void startGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
@@ -129,7 +126,6 @@
      * @throws InternalKernelException if there GBean is not state manageable or if there is a general error
      * @throws IllegalStateException If the gbean is disabled
      */
-    void startRecursiveGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
     void startRecursiveGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
     void startRecursiveGBean(String shortName) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
     void startRecursiveGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
@@ -153,7 +149,6 @@
      * @throws InternalKernelException if there GBean is not state manageable or if there is a general error
      * @throws IllegalStateException If the gbean is disabled
      */
-    void stopGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
     void stopGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
     void stopGBean(String shortName) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
     void stopGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
@@ -167,7 +162,6 @@
      * @throws GBeanNotFoundException if the GBean could not be found
      * @throws InternalKernelException if there GBean is a problem while unloading the GBean
      */
-    void unloadGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
     void unloadGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
     void unloadGBean(String shortName) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
     void unloadGBean(Class type) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
@@ -179,7 +173,6 @@
      * @return the state of the GBean
      * @throws GBeanNotFoundException if the GBean could not be found
      */
-    int getGBeanState(ObjectName name) throws GBeanNotFoundException;
     int getGBeanState(AbstractName name) throws GBeanNotFoundException;
     int getGBeanState(String shortName) throws GBeanNotFoundException;
     int getGBeanState(Class type) throws GBeanNotFoundException;
@@ -191,7 +184,6 @@
      * @return the start time of the GBean or 0 if not running
      * @throws GBeanNotFoundException if the GBean could not be found
      */
-    long getGBeanStartTime(ObjectName name) throws GBeanNotFoundException;
     long getGBeanStartTime(AbstractName name) throws GBeanNotFoundException;
     long getGBeanStartTime(String shortName) throws GBeanNotFoundException;
     long getGBeanStartTime(Class type) throws GBeanNotFoundException;
@@ -203,7 +195,6 @@
      * @return the class loader associated with the specified GBean
      * @throws GBeanNotFoundException if the specified GBean is not registered with the kernel
      */
-    ClassLoader getClassLoaderFor(ObjectName name) throws GBeanNotFoundException;
     ClassLoader getClassLoaderFor(AbstractName name) throws GBeanNotFoundException;
     ClassLoader getClassLoaderFor(String shortName) throws GBeanNotFoundException;
     ClassLoader getClassLoaderFor(Class type) throws GBeanNotFoundException;
@@ -215,7 +206,6 @@
      * @return the info for that instance
      * @throws GBeanNotFoundException if there is no instance with the supplied name
      */
-    GBeanInfo getGBeanInfo(ObjectName name) throws GBeanNotFoundException;
     GBeanInfo getGBeanInfo(AbstractName name) throws GBeanNotFoundException;
     GBeanInfo getGBeanInfo(String shortName) throws GBeanNotFoundException;
     GBeanInfo getGBeanInfo(Class type) throws GBeanNotFoundException;
@@ -227,63 +217,56 @@
      * @return the info for that instance
      * @throws GBeanNotFoundException if there is no instance with the supplied name
      */
-    GBeanData getGBeanData(ObjectName name) throws GBeanNotFoundException, InternalKernelException;
     GBeanData getGBeanData(AbstractName name) throws GBeanNotFoundException, InternalKernelException;
     GBeanData getGBeanData(String shortName) throws GBeanNotFoundException, InternalKernelException;
     GBeanData getGBeanData(Class type) throws GBeanNotFoundException, InternalKernelException;
     GBeanData getGBeanData(String shortName, Class type) throws GBeanNotFoundException, InternalKernelException;
 
     /**
-     * Returns a Set of all GBeans matching the object name pattern
-     * @return a List of javax.management.ObjectName of matching GBeans registered with this kernel
+     * Gets the AbstractNames of all GBeans matching the abstractNameQuery.
+     * @param abstractNameQuery the query to execute
+     * @return the AbstractNames of all matching GBeans
      */
-    Set listGBeans(ObjectName pattern);
+    Set listGBeans(AbstractNameQuery abstractNameQuery);
 
     /**
      * Returns a Set of all GBeans matching the set of object name pattern
-     * @return a List of javax.management.ObjectName of matching GBeans registered with this kernel
-     */
-    Set listGBeans(Set patterns);
-
-    /**
-     * Returns a Set of all GBeans matching any of the specified criteria
-     * @return a List of javax.management.ObjectName of matching GBeans registered with this kernel
+     * @param abstractNameQueries the queries to execute
+     * @return a List of AbstractNameName of matching GBeans registered with this kernel
      */
-    Set listGBeans(GBeanQuery query);
+    Set listGBeans(Set abstractNameQueries);
 
     /**
      * Gets the value of an attribute on the specified gbean
-     * @param objectName the name of the gbean from which the attribute will be retrieved
+     * @param name the name of the gbean from which the attribute will be retrieved
      * @param attributeName the name of the attribute to fetch
      * @return the value of the attribute
      * @throws GBeanNotFoundException if there is not a gbean under the specified name
      * @throws NoSuchAttributeException if the gbean does not contain the specified attribute
      * @throws Exception if the gbean throws an exception from the getter
      */
-    Object getAttribute(ObjectName objectName, String attributeName) throws GBeanNotFoundException, NoSuchAttributeException, Exception;
-    Object getAttribute(AbstractName abstractName, String attributeName) throws GBeanNotFoundException, NoSuchAttributeException, Exception;
+    Object getAttribute(AbstractName name, String attributeName) throws GBeanNotFoundException, NoSuchAttributeException, Exception;
     Object getAttribute(String shortName, String attributeName) throws GBeanNotFoundException, NoSuchAttributeException, Exception;
     Object getAttribute(Class type, String attributeName) throws GBeanNotFoundException, NoSuchAttributeException, Exception;
     Object getAttribute(String shortName, Class type, String attributeName) throws GBeanNotFoundException, NoSuchAttributeException, Exception;
 
     /**
      * Sets the value of an attribute on the specified gbean
-     * @param objectName the name of the gbean from in which the new attribute value will be set
+     * @param name the name of the gbean from in which the new attribute value will be set
      * @param attributeName the name of the attribute to set
      * @param attributeValue the new value of the attribute
      * @throws GBeanNotFoundException if there is not a gbean under the specified name
      * @throws NoSuchAttributeException if the gbean does not contain the specified attribute
      * @throws Exception if the gbean throws an exception from the setter
      */
-    void setAttribute(ObjectName objectName, String attributeName, Object attributeValue) throws GBeanNotFoundException, NoSuchAttributeException, Exception;
-    void setAttribute(AbstractName abstractName, String attributeName, Object attributeValue) throws GBeanNotFoundException, NoSuchAttributeException, Exception;
+    void setAttribute(AbstractName name, String attributeName, Object attributeValue) throws GBeanNotFoundException, NoSuchAttributeException, Exception;
     void setAttribute(String shortName, String attributeName, Object attributeValue) throws GBeanNotFoundException, NoSuchAttributeException, Exception;
     void setAttribute(Class type, String attributeName, Object attributeValue) throws GBeanNotFoundException, NoSuchAttributeException, Exception;
     void setAttribute(String shortName, Class type, String attributeName, Object attributeValue) throws GBeanNotFoundException, NoSuchAttributeException, Exception;
 
     /**
      * Invokes a no-argument method on the specified GBean
-     * @param objectName the name of the gbean from in which the new attribute value will be set
+     * @param name the name of the gbean from in which the new attribute value will be set
      * @param methodName the name of the method to invoke
      * @return the return value of the method or null if the specified method does not return a value
      * @throws GBeanNotFoundException if there is not a gbean under the specified name
@@ -291,15 +274,14 @@
      * @throws InternalKernelException if an error occurs within the kernel itself
      * @throws Exception if the method throws an exception
      */
-    Object invoke(ObjectName objectName, String methodName) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
-    Object invoke(AbstractName abstractName, String methodName) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
+    Object invoke(AbstractName name, String methodName) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
     Object invoke(String shortName, String methodName) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
     Object invoke(Class type, String methodName) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
     Object invoke(String shortName, Class type, String methodName) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
 
     /**
      * Invokes a method on the specified GBean with the specified arguments
-     * @param objectName the name of the gbean from in which the new attribute value will be set
+     * @param name the name of the gbean from in which the new attribute value will be set
      * @param methodName the name of the method to invoke
      * @param args the arguments to pass to the method
      * @param types the types of the arguments; the types are used to determine the signature of the mehod that should be invoked
@@ -309,8 +291,7 @@
      * @throws InternalKernelException if an error occurs within the kernel itself
      * @throws Exception if the method throws an exception
      */
-    Object invoke(ObjectName objectName, String methodName, Object[] args, String[] types) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
-    Object invoke(AbstractName abstractName, String methodName, Object[] args, String[] types) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
+    Object invoke(AbstractName name, String methodName, Object[] args, String[] types) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
     Object invoke(String shortName, String methodName, Object[] args, String[] types) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
     Object invoke(Class type, String methodName, Object[] args, String[] types) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
     Object invoke(String shortName, Class type, String methodName, Object[] args, String[] types) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
@@ -363,5 +344,56 @@
      */
     boolean isRunning();
 
-    Set listGBeans(AbstractNameQuery refInfoQuery);
+    /**
+     * @deprecated Use AbstractName version instead
+     */
+    boolean isLoaded(ObjectName name);
+    /**
+     * @deprecated Use AbstractName version instead
+     */
+    Object getGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
+    /**
+     * @deprecated Use AbstractName version instead
+     */
+    void startGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
+    /**
+     * @deprecated Use AbstractName version instead
+     */
+    void stopGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException;
+    /**
+     * @deprecated Use AbstractName version instead
+     */
+    int getGBeanState(ObjectName name) throws GBeanNotFoundException;
+    /**
+     * @deprecated Use AbstractName version instead
+     */
+    ClassLoader getClassLoaderFor(ObjectName name) throws GBeanNotFoundException;
+    /**
+     * @deprecated Use AbstractName version instead
+     */
+    GBeanInfo getGBeanInfo(ObjectName name) throws GBeanNotFoundException;
+    /**
+     * @deprecated Use AbstractName version instead
+     */
+    GBeanData getGBeanData(ObjectName name) throws GBeanNotFoundException, InternalKernelException;
+    /**
+     * @deprecated Use AbstractNameQuery version instead
+     */
+    Set listGBeans(ObjectName pattern);
+    /**
+     * @deprecated Use AbstractName version instead
+     */
+    Object getAttribute(ObjectName name, String attributeName) throws GBeanNotFoundException, NoSuchAttributeException, Exception;
+    /**
+     * @deprecated Use AbstractName version instead
+     */
+    void setAttribute(ObjectName name, String attributeName, Object attributeValue) throws GBeanNotFoundException, NoSuchAttributeException, Exception;
+    /**
+     * @deprecated Use AbstractName version instead
+     */
+    Object invoke(ObjectName name, String methodName) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
+    /**
+     * @deprecated Use AbstractName version instead
+     */
+    Object invoke(ObjectName name, String methodName, Object[] args, String[] types) throws GBeanNotFoundException, NoSuchOperationException, InternalKernelException, Exception;
 }

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java Wed Mar 29 14:16:54 2006
@@ -23,7 +23,6 @@
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.gbean.GBeanQuery;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.kernel.lifecycle.LifecycleMonitor;
@@ -83,6 +82,10 @@
         return kernel.isLoaded(shortName, type);
     }
 
+    public Object getGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
+        return kernel.getGBean(name);
+    }
+
     public Object getGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
         return kernel.getGBean(name);
     }
@@ -119,10 +122,6 @@
         kernel.startGBean(shortName, type);
     }
 
-    public void startRecursiveGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
-        kernel.startRecursiveGBean(name);
-    }
-
     public void startRecursiveGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
         kernel.startRecursiveGBean(name);
     }
@@ -175,10 +174,6 @@
         kernel.stopGBean(shortName, type);
     }
 
-    public void unloadGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
-        kernel.unloadGBean(name);
-    }
-
     public void unloadGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
         kernel.unloadGBean(name);
     }
@@ -215,10 +210,6 @@
         return kernel.getGBeanState(shortName, type);
     }
 
-    public long getGBeanStartTime(ObjectName name) throws GBeanNotFoundException {
-        return kernel.getGBeanStartTime(name);
-    }
-
     public long getGBeanStartTime(AbstractName name) throws GBeanNotFoundException {
         return kernel.getGBeanStartTime(name);
     }
@@ -301,10 +292,6 @@
 
     public Set listGBeans(Set patterns) {
         return kernel.listGBeans(patterns);
-    }
-
-    public Set listGBeans(GBeanQuery query) {
-        return kernel.listGBeans(query);
     }
 
     public Object getAttribute(ObjectName objectName, String attributeName) throws GBeanNotFoundException, NoSuchAttributeException, Exception {

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java Wed Mar 29 14:16:54 2006
@@ -30,7 +30,6 @@
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanName;
-import org.apache.geronimo.gbean.GBeanQuery;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.runtime.GBeanInstance;
@@ -301,6 +300,14 @@
         return gbeanInstance.getTarget();
     }
 
+    public Object getGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException  {
+        GBeanInstance gbeanInstance = registry.getGBeanInstance(createGBeanName(name));
+        if (gbeanInstance.getState() != State.RUNNING_INDEX) {
+            throw new IllegalStateException("GBean is not running: " + name);
+        }
+        return gbeanInstance.getTarget();
+    }
+
     public Object getGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException  {
         GBeanInstance gbeanInstance = registry.getGBeanInstance(name);
         if (gbeanInstance.getState() != State.RUNNING_INDEX) {
@@ -385,11 +392,6 @@
         gbeanInstance.start();
     }
 
-    public void startRecursiveGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
-        GBeanInstance gbeanInstance = registry.getGBeanInstance(createGBeanName(name));
-        gbeanInstance.startRecursive();
-    }
-
     public void startRecursiveGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
         GBeanInstance gbeanInstance = registry.getGBeanInstance(name);
         gbeanInstance.startRecursive();
@@ -457,13 +459,6 @@
         gbeanInstance.stop();
     }
 
-    public void unloadGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
-        GBeanName gbeanName = createGBeanName(name);
-        GBeanInstance gbeanInstance = registry.getGBeanInstance(gbeanName);
-        gbeanInstance.die();
-        registry.unregister(gbeanName);
-    }
-
     public void unloadGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
         GBeanInstance gbeanInstance = registry.getGBeanInstance(name);
         gbeanInstance.die();
@@ -508,11 +503,6 @@
         return gbeanInstance.getState();
     }
 
-    public long getGBeanStartTime(ObjectName name) throws GBeanNotFoundException {
-        GBeanInstance gbeanInstance = registry.getGBeanInstance(createGBeanName(name));
-        return gbeanInstance.getStartTime();
-    }
-
     public long getGBeanStartTime(AbstractName name) throws GBeanNotFoundException {
         GBeanInstance gbeanInstance = registry.getGBeanInstance(name);
         return gbeanInstance.getStartTime();
@@ -605,22 +595,6 @@
             } catch (GBeanNotFoundException e) {}
         }
         return gbeans;
-    }
-
-    /**
-     * Returns a Set of all GBeans matching the specified criteria
-     *
-     * @return a List of javax.management.ObjectName of matching GBeans registered with this kernel
-     */
-    public Set listGBeans(GBeanQuery query) {
-        Set results = new HashSet();
-        if(query.getGBeanNames() != null && query.getGBeanNames().length > 0) {
-            results.addAll(listGBeans(query.getGBeanNames()));
-        }
-        if(query.getInterfaces() != null && query.getInterfaces().length > 0) {
-            results.addAll(listGBeansByInterface(query.getInterfaces()));
-        }
-        return results;
     }
 
     public AbstractName getAbstractNameFor(Object service) {

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/ProxyMethodInterceptor.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/ProxyMethodInterceptor.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/ProxyMethodInterceptor.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/ProxyMethodInterceptor.java Wed Mar 29 14:16:54 2006
@@ -33,7 +33,6 @@
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.proxy.DeadProxyException;
 import org.apache.geronimo.kernel.proxy.GeronimoManagedBean;
-import org.apache.geronimo.kernel.proxy.ProxyManager;
 
 import java.beans.Introspector;
 import java.lang.reflect.Method;
@@ -43,7 +42,7 @@
 import java.util.Set;
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 385487 $ $Date$
  */
 public class ProxyMethodInterceptor implements MethodInterceptor {
     /**
@@ -108,7 +107,7 @@
 
         // handle equals, hashCode and toString directly here
         try {
-            invokers[getSuperIndex(proxyType, proxyType.getMethod("equals", new Class[]{Object.class}))] = new EqualsInvoke(kernel.getProxyManager());
+            invokers[getSuperIndex(proxyType, proxyType.getMethod("equals", new Class[]{Object.class}))] = new EqualsInvoke(kernel);
             invokers[getSuperIndex(proxyType, proxyType.getMethod("hashCode", null))] = new HashCodeInvoke();
             invokers[getSuperIndex(proxyType, proxyType.getMethod("toString", null))] = new ToStringInvoke(proxyType.getName());
             if(GeronimoManagedBean.class.isAssignableFrom(proxyType)) {
@@ -294,14 +293,14 @@
     }
 
     static final class EqualsInvoke implements ProxyInvoker {
-        private final ProxyManager proxyManager;
+        private final Kernel kernel;
 
-        public EqualsInvoke(ProxyManager proxyManager) {
-            this.proxyManager = proxyManager;
+        public EqualsInvoke(Kernel kernel) {
+            this.kernel = kernel;
         }
 
         public Object invoke(AbstractName abstractName, Object[] arguments) throws Throwable {
-            AbstractName proxyTarget = proxyManager.getProxyTarget(arguments[0]);
+            AbstractName proxyTarget = kernel.getAbstractNameFor(arguments[0]);
             return Boolean.valueOf(abstractName.equals(proxyTarget));
         }
     }
@@ -402,7 +401,7 @@
 
         public Object invoke(AbstractName abstractName, Object[] arguments) throws Throwable {
             GBeanData gBeanData = kernel.getGBeanData(abstractName);
-            return gBeanData.getName().getCanonicalName();
+            return gBeanData.getAbstractName().getObjectName().getCanonicalName();
         }
     }
 }

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java Wed Mar 29 14:16:54 2006
@@ -54,7 +54,6 @@
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.ObjectInputStreamExt;
 import org.apache.geronimo.kernel.Naming;
-import org.apache.geronimo.kernel.jmx.JMXUtil;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Dependency;
 import org.apache.geronimo.kernel.repository.Environment;
@@ -94,21 +93,6 @@
     private static final Log log = LogFactory.getLog(Configuration.class);
     public static final Object JSR77_BASE_NAME_PROPERTY = "org.apache.geronimo.name.javax.management.j2ee.BaseName";
 
-    /**
-     * @deprecated Use artifact version of this method
-     */
-    public static ObjectName getConfigurationObjectName(URI configId) throws MalformedObjectNameException {
-        return new ObjectName("geronimo.config:name=" + ObjectName.quote(configId.toString()));
-    }
-
-    public static ObjectName getConfigurationObjectName(Artifact configId) throws InvalidConfigException {
-        try {
-            return new ObjectName("geronimo.config:name=" + ObjectName.quote(configId.toString()));
-        } catch (MalformedObjectNameException e) {
-            throw new InvalidConfigException("Could not construct object name for configuration", e);
-        }
-    }
-
     public static AbstractName getConfigurationAbstractName(Artifact configId) throws InvalidConfigException {
         return new AbstractName(configId, Collections.singletonMap("configurationName", configId.toString()), getConfigurationObjectName(configId));
     }
@@ -126,6 +110,14 @@
         }
     }
 
+    private static ObjectName getConfigurationObjectName(Artifact configId) throws InvalidConfigException {
+        try {
+            return new ObjectName("geronimo.config:name=" + ObjectName.quote(configId.toString()));
+        } catch (MalformedObjectNameException e) {
+            throw new InvalidConfigException("Could not construct object name for configuration", e);
+        }
+    }
+
     /**
      * The artifact id for this configuration.
      */
@@ -377,11 +369,6 @@
         return abstractName;
     }
 
-    public ObjectName getBaseName() {
-        String baseNameString = (String) environment.getProperties().get(JSR77_BASE_NAME_PROPERTY);
-        return JMXUtil.getObjectName(baseNameString);
-    }
-
     /**
      * Gets the parent configurations used for class loading.
      * @return the parents of this configuration used for class loading
@@ -487,7 +474,7 @@
         gbean.setAbstractName(abstractName);
 
         if (gbeans.containsKey(abstractName)) {
-            throw new GBeanAlreadyExistsException(gbean.getName().getCanonicalName());
+            throw new GBeanAlreadyExistsException(gbean.getAbstractName().toString());
         }
         gbeans.put(abstractName, gbean);
         return abstractName;
@@ -495,7 +482,7 @@
 
     public synchronized void addGBean(GBeanData gbean) throws GBeanAlreadyExistsException {
         if (gbeans.containsKey(gbean.getAbstractName())) {
-            throw new GBeanAlreadyExistsException(gbean.getName().getCanonicalName());
+            throw new GBeanAlreadyExistsException(gbean.getAbstractName().toString());
         }
         gbeans.put(gbean.getAbstractName(), gbean);
     }
@@ -685,7 +672,7 @@
             try {
                 gbeanData.writeExternal(oos);
             } catch (Exception e) {
-                throw new InvalidConfigException("Unable to serialize GBeanData for " + gbeanData.getName(), e);
+                throw new InvalidConfigException("Unable to serialize GBeanData for " + gbeanData.getAbstractName(), e);
             }
         }
         try {

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationUtil.java Wed Mar 29 14:16:54 2006
@@ -19,10 +19,10 @@
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GAttributeInfo;
 import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.gbean.GBeanQuery;
 import org.apache.geronimo.gbean.GReferenceInfo;
 import org.apache.geronimo.gbean.InvalidConfigurationException;
 import org.apache.geronimo.gbean.ReferencePatterns;
+import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
@@ -31,8 +31,6 @@
 import org.apache.geronimo.kernel.repository.ArtifactResolver;
 import org.apache.geronimo.kernel.repository.Environment;
 
-import javax.management.ObjectName;
-
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.ObjectInputStream;
@@ -89,7 +87,7 @@
         kernel.loadGBean(configurationGBeanData, classLoader);
         kernel.startGBean(configurationName);
 
-        Configuration configuration = (Configuration) kernel.getProxyManager().createProxy(configurationName, Configuration.class);
+        Configuration configuration = (Configuration) kernel.getGBean(configurationName);
 
         // get the gbeans and classloader
         Collection gbeans = configuration.getGBeans().values();
@@ -157,15 +155,10 @@
      * @throws IllegalStateException Occurs if a ConfigurationManager cannot be identified
      */
     public static ConfigurationManager getConfigurationManager(Kernel kernel) {
-        Set names = kernel.listGBeans(new GBeanQuery(null, ConfigurationManager.class.getName()));
+        Set names = kernel.listGBeans(new AbstractNameQuery(ConfigurationManager.class.getName()));
         for (Iterator iterator = names.iterator(); iterator.hasNext();) {
-            ObjectName objectName = (ObjectName) iterator.next();
-            try {
-                if (kernel.getGBeanState(objectName) != State.RUNNING_INDEX) {
-                    iterator.remove();
-                }
-            } catch (GBeanNotFoundException e) {
-                // bean died
+            AbstractName abstractName = (AbstractName) iterator.next();
+            if (!kernel.isRunning(abstractName)) {
                 iterator.remove();
             }
         }
@@ -175,7 +168,7 @@
         if (names.size() > 1) {
             throw new IllegalStateException("More than one Configuration Manager was found in the kernel");
         }
-        ObjectName configurationManagerName = (ObjectName) names.iterator().next();
+        AbstractName configurationManagerName = (AbstractName) names.iterator().next();
         return (ConfigurationManager) kernel.getProxyManager().createProxy(configurationManagerName, ConfigurationManager.class);
     }
 
@@ -186,15 +179,10 @@
      * @throws IllegalStateException Occurs if there are multiple EditableConfigurationManagers in the kernel.
      */
     public static EditableConfigurationManager getEditableConfigurationManager(Kernel kernel) {
-        Set names = kernel.listGBeans(new GBeanQuery(null, EditableConfigurationManager.class.getName()));
+        Set names = kernel.listGBeans(new AbstractNameQuery(EditableConfigurationManager.class.getName()));
         for (Iterator iterator = names.iterator(); iterator.hasNext();) {
-            ObjectName objectName = (ObjectName) iterator.next();
-            try {
-                if (kernel.getGBeanState(objectName) != State.RUNNING_INDEX) {
-                    iterator.remove();
-                }
-            } catch (GBeanNotFoundException e) {
-                // bean died
+            AbstractName abstractName = (AbstractName) iterator.next();
+            if (!kernel.isRunning(abstractName)) {
                 iterator.remove();
             }
         }
@@ -204,7 +192,7 @@
         if (names.size() > 1) {
             throw new IllegalStateException("More than one Configuration Manager was found in the kernel");
         }
-        ObjectName configurationManagerName = (ObjectName) names.iterator().next();
+        AbstractName configurationManagerName = (AbstractName) names.iterator().next();
         return (EditableConfigurationManager) kernel.getProxyManager().createProxy(configurationManagerName, EditableConfigurationManager.class);
     }
 

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableKernelConfigurationManager.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableKernelConfigurationManager.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableKernelConfigurationManager.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/EditableKernelConfigurationManager.java Wed Mar 29 14:16:54 2006
@@ -54,7 +54,7 @@
             // add the gbean to the configuration
             configuration.addGBean(gbean);
         } catch (GBeanAlreadyExistsException e) {
-            throw new InvalidConfigException("Cound not add GBean " + gbean.getName() + " to configuration " + configurationId, e);
+            throw new InvalidConfigException("Cound not add GBean " + gbean.getAbstractName() + " to configuration " + configurationId, e);
         }
 
         addGBeanToConfiguration(configuration, gbean, start);
@@ -67,7 +67,7 @@
             // add the gbean to the configuration
             configuration.addGBean(name, gbean);
         } catch (GBeanAlreadyExistsException e) {
-            throw new InvalidConfigException("Cound not add GBean " + gbean.getName() + " to configuration " + configurationId, e);
+            throw new InvalidConfigException("Cound not add GBean " + gbean.getAbstractName() + " to configuration " + configurationId, e);
         }
 
         addGBeanToConfiguration(configuration, gbean, start);
@@ -79,7 +79,7 @@
         try {
             Thread.currentThread().setContextClassLoader(configurationClassLoader);
 
-            log.trace("Registering GBean " + gbean.getName());
+            log.trace("Registering GBean " + gbean.getAbstractName());
 
 
             // preprocess the gbean data before loading it into the kernel
@@ -91,9 +91,9 @@
             // start the configuration
             if (start) {
                 try {
-                    kernel.startRecursiveGBean(gbean.getName());
+                    kernel.startRecursiveGBean(gbean.getAbstractName());
                 } catch (GBeanNotFoundException e) {
-                    throw new InvalidConfigException("How could we not find a GBean that we just loaded ('" + gbean.getName() + "')?");
+                    throw new InvalidConfigException("How could we not find a GBean that we just loaded ('" + gbean.getAbstractName() + "')?");
                 }
             }
 
@@ -118,7 +118,7 @@
             if (e instanceof InvalidConfigException) {
                 throw (InvalidConfigException) e;
             }
-            throw new InvalidConfigException("Cound not add GBean " + gbean.getName() + " to configuration " + configuration.getId(), e);
+            throw new InvalidConfigException("Cound not add GBean " + gbean.getAbstractName() + " to configuration " + configuration.getId(), e);
         } finally {
             Thread.currentThread().setContextClassLoader(oldCl);
         }

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/config/KernelConfigurationManager.java Wed Mar 29 14:16:54 2006
@@ -23,6 +23,7 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.gbean.InvalidConfigurationException;
+import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.InternalKernelException;
@@ -95,14 +96,18 @@
     public synchronized Configuration loadConfiguration(Artifact configurationId) throws NoSuchConfigException, IOException, InvalidConfigException {
         // todo hack for bootstrap deploy
         ConfigurationStatus configurationStatus = (ConfigurationStatus) configurations.get(configurationId);
-        if (configurationStatus == null && kernel.isLoaded(Configuration.getConfigurationObjectName(configurationId))) {
-            Configuration configuration = (Configuration) kernel.getProxyManager().createProxy(Configuration.getConfigurationObjectName(configurationId), Configuration.class);
-            configurationStatus = createConfigurationStatus(configuration);
-            configurationStatus.load();
-            //even worse hack
-            configurationStatus.start();
-            configurations.put(configurationId, configurationStatus);
-            return configurationStatus.getConfiguration();
+        if (configurationStatus == null && kernel.isLoaded(Configuration.getConfigurationAbstractName(configurationId))) {
+            try {
+                Configuration configuration = (Configuration) kernel.getGBean(Configuration.getConfigurationAbstractName(configurationId));
+                configurationStatus = createConfigurationStatus(configuration);
+                configurationStatus.load();
+                //even worse hack
+                configurationStatus.start();
+                configurations.put(configurationId, configurationStatus);
+                return configurationStatus.getConfiguration();
+            } catch (GBeanNotFoundException e) {
+                // configuration was unloaded, just continue as normal
+            }
         }
 
         return super.loadConfiguration(configurationId);
@@ -126,8 +131,8 @@
                 throw new InvalidConfigurationException("Configuration gbean failed to start " + configurationId);
             }
 
-            // create a proxy to the configuration
-            configuration = (Configuration) kernel.getProxyManager().createProxy(configurationName, Configuration.class);
+            // get the configuration
+            configuration = (Configuration) kernel.getGBean(configurationName);
 
             // declare the dependencies as loaded
             if (artifactManager != null) {
@@ -236,12 +241,12 @@
 
         public void run() {
             while (true) {
-                Set configs = kernel.listGBeans(CONFIG_QUERY);
+                Set configs = kernel.listGBeans(new AbstractNameQuery(Configuration.class.getName()));
                 if (configs.isEmpty()) {
                     return;
                 }
                 for (Iterator i = configs.iterator(); i.hasNext();) {
-                    ObjectName configName = (ObjectName) i.next();
+                    AbstractName configName = (AbstractName) i.next();
                     if (kernel.isLoaded(configName)) {
                         try {
                             kernel.stopGBean(configName);

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/JMXProxyMethodInterceptor.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/JMXProxyMethodInterceptor.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/JMXProxyMethodInterceptor.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/JMXProxyMethodInterceptor.java Wed Mar 29 14:16:54 2006
@@ -30,13 +30,12 @@
 import org.apache.geronimo.kernel.management.State;
 import org.apache.geronimo.kernel.proxy.DeadProxyException;
 import org.apache.geronimo.kernel.proxy.GeronimoManagedBean;
-import org.apache.geronimo.kernel.proxy.ProxyManager;
 
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 385487 $ $Date$
  */
 public class JMXProxyMethodInterceptor implements MethodInterceptor {
     /**
@@ -105,7 +104,7 @@
 
         // handle equals, hashCode and toString directly here
         try {
-            invokers[getSuperIndex(proxyType, proxyType.getMethod("equals", new Class[]{Object.class}))] = new EqualsInvoke(kernel.getProxyManager());
+            invokers[getSuperIndex(proxyType, proxyType.getMethod("equals", new Class[]{Object.class}))] = new EqualsInvoke(kernel);
             invokers[getSuperIndex(proxyType, proxyType.getMethod("hashCode", null))] = new HashCodeInvoke();
             invokers[getSuperIndex(proxyType, proxyType.getMethod("toString", null))] = new ToStringInvoke(proxyType.getName());
             if(GeronimoManagedBean.class.isAssignableFrom(proxyType)) {
@@ -178,14 +177,14 @@
     }
 
     static final class EqualsInvoke implements ProxyInvoker {
-        private final ProxyManager proxyManager;
+        private final Kernel kernel;
 
-        public EqualsInvoke(ProxyManager proxyManager) {
-            this.proxyManager = proxyManager;
+        public EqualsInvoke(Kernel kernel) {
+            this.kernel = kernel;
         }
 
         public Object invoke(AbstractName abstractName, Object[] arguments) throws Throwable {
-            AbstractName proxyTarget = proxyManager.getProxyTarget(arguments[0]);
+            AbstractName proxyTarget = kernel.getAbstractNameFor(arguments[0]);
             return Boolean.valueOf(abstractName.equals(proxyTarget));
         }
     }

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/KernelDelegate.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/KernelDelegate.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/KernelDelegate.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/KernelDelegate.java Wed Mar 29 14:16:54 2006
@@ -27,7 +27,6 @@
 
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.GBeanQuery;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.kernel.DependencyManager;
@@ -65,6 +64,18 @@
         return (Naming) getKernelAttribute("naming");
     }
 
+    public Object getGBean(ObjectName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
+        try {
+            return invokeKernel("getGBean", new Object[] {name}, new String[] {ObjectName.class.getName()});
+        } catch (GBeanNotFoundException e) {
+            throw e;
+        } catch (RuntimeException e) {
+            throw e;
+        } catch (Exception e) {
+            throw new InternalKernelException(e);
+        }
+    }
+
     public Object getGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
         try {
             return invokeKernel("getGBean", new Object[] {name}, new String[] {AbstractName.class.getName()});
@@ -185,18 +196,6 @@
         }
     }
 
-    public void startRecursiveGBean(ObjectName name) throws GBeanNotFoundException {
-        try {
-            invokeKernel("startRecursiveGBean", new Object[] {name}, new String[] {ObjectName.class.getName()});
-        } catch (GBeanNotFoundException e) {
-            throw e;
-        } catch (RuntimeException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new InternalKernelException(e);
-        }
-    }
-
     public void startRecursiveGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
         try {
             invokeKernel("startRecursiveGBean", new Object[] {name}, new String[] {AbstractName.class.getName()});
@@ -346,18 +345,6 @@
         }
     }
 
-    public void unloadGBean(ObjectName name) throws GBeanNotFoundException {
-        try {
-            invokeKernel("unloadGBean", new Object[] {name}, new String[] {ObjectName.class.getName()});
-        } catch (GBeanNotFoundException e) {
-            throw e;
-        } catch (RuntimeException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new InternalKernelException(e);
-        }
-    }
-
     public void unloadGBean(AbstractName name) throws GBeanNotFoundException, InternalKernelException, IllegalStateException {
         try {
             invokeKernel("unloadGBean", new Object[] {name}, new String[] {AbstractName.class.getName()});
@@ -466,18 +453,6 @@
         }
     }
 
-    public long getGBeanStartTime(ObjectName name) throws GBeanNotFoundException {
-        try {
-            return ((Long) invokeKernel("getGBeanStartTime", new Object[]{name}, new String[]{ObjectName.class.getName()})).longValue();
-        } catch (GBeanNotFoundException e) {
-            throw e;
-        } catch (RuntimeException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new InternalKernelException(e);
-        }
-    }
-
     public long getGBeanStartTime(AbstractName name) throws GBeanNotFoundException {
         try {
             return ((Long) invokeKernel("getGBeanStartTime", new Object[]{name}, new String[]{AbstractName.class.getName()})).longValue();
@@ -777,16 +752,6 @@
     public Set listGBeans(Set patterns) {
         try {
             return (Set) invokeKernel("listGBeans", new Object[] {patterns}, new String[] {Set.class.getName()});
-        } catch (RuntimeException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new InternalKernelException(e);
-        }
-    }
-
-    public Set listGBeans(GBeanQuery query) {
-        try {
-            return (Set) invokeKernel("listGBeans", new Object[] {query}, new String[] {GBeanQuery.class.getName()});
         } catch (RuntimeException e) {
             throw e;
         } catch (Exception e) {

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Environment.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Environment.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Environment.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/repository/Environment.java Wed Mar 29 14:16:54 2006
@@ -19,10 +19,8 @@
 
 import java.io.Serializable;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashSet;
-import java.util.Map;
 import java.util.Set;
 import java.util.List;
 import java.util.Collections;
@@ -39,8 +37,6 @@
 
     private Artifact configId;
 
-    private final Map properties = new HashMap();
-
     private final LinkedHashSet dependencies = new LinkedHashSet();
 
     private final Set hiddenClasses = new HashSet();
@@ -71,19 +67,6 @@
 
     public void setConfigId(Artifact configId) {
         this.configId = configId;
-    }
-
-    public Map getProperties() {
-        return properties;
-    }
-
-    public void addProperties(Map nameKeys) {
-        this.properties.putAll(nameKeys);
-    }
-
-    public void setProperties(Map properties) {
-        this.properties.clear();
-        addProperties(properties);
     }
 
     public List getDependencies() {

Modified: geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/gbean/runtime/GBeanDependencyTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/gbean/runtime/GBeanDependencyTest.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/gbean/runtime/GBeanDependencyTest.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/gbean/runtime/GBeanDependencyTest.java Wed Mar 29 14:16:54 2006
@@ -38,12 +38,12 @@
         GBeanData gbeanDataChild = new GBeanData(kernel.getNaming().createChildName(parentName, "child", "child"), MockGBean.getGBeanInfo());
         gbeanDataChild.addDependency(new ReferencePatterns(parentName));
         kernel.loadGBean(gbeanDataChild, MockGBean.class.getClassLoader());
-        kernel.startGBean(gbeanDataChild.getName());
-        assertEquals(State.STARTING_INDEX, kernel.getGBeanState(gbeanDataChild.getName()));
+        kernel.startGBean(gbeanDataChild.getAbstractName());
+        assertEquals(State.STARTING_INDEX, kernel.getGBeanState(gbeanDataChild.getAbstractName()));
         kernel.loadGBean(gbeanDataParent, MockGBean.class.getClassLoader());
-        assertEquals(State.STARTING_INDEX, kernel.getGBeanState(gbeanDataChild.getName()));
+        assertEquals(State.STARTING_INDEX, kernel.getGBeanState(gbeanDataChild.getAbstractName()));
         kernel.startGBean(parentName);
-        assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(gbeanDataChild.getName()));
+        assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(gbeanDataChild.getAbstractName()));
     }
 
     protected void setUp() throws Exception {

Modified: geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/GBeanTest.java Wed Mar 29 14:16:54 2006
@@ -41,7 +41,7 @@
 import org.apache.log4j.PatternLayout;
 
 /**
- * @version $Rev: 386505 $ $Date$
+ * @version $Rev:386515 $ $Date$
  */
 public class GBeanTest extends TestCase {
     private static KernelWraper kernelWraper = new KernelWraper();
@@ -214,22 +214,22 @@
         // abstract name
         MockGBean mockGBean = (MockGBean) kernel.getGBean(gbean.getAbstractName());
         assertEquals(123, mockGBean.getFinalInt());
-        assertNull(kernel.getProxyManager().getProxyTarget(mockGBean));
+        assertNull(kernel.getAbstractNameFor(mockGBean));
 
         // short name
         mockGBean = (MockGBean) kernel.getGBean("name");
         assertEquals(123, mockGBean.getFinalInt());
-        assertNull(kernel.getProxyManager().getProxyTarget(mockGBean));
+        assertNull(kernel.getAbstractNameFor(mockGBean));
 
         // type
         mockGBean = (MockGBean) kernel.getGBean(MockGBean.class);
         assertEquals(123, mockGBean.getFinalInt());
-        assertNull(kernel.getProxyManager().getProxyTarget(mockGBean));
+        assertNull(kernel.getAbstractNameFor(mockGBean));
 
         // short name and type
         mockGBean = (MockGBean) kernel.getGBean("name", MockGBean.class);
         assertEquals(123, mockGBean.getFinalInt());
-        assertNull(kernel.getProxyManager().getProxyTarget(mockGBean));
+        assertNull(kernel.getAbstractNameFor(mockGBean));
     }
 
     public void testInvoke() throws Exception {

Modified: geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/config/ConfigurationManagerTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/config/ConfigurationManagerTest.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/config/ConfigurationManagerTest.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/config/ConfigurationManagerTest.java Wed Mar 29 14:16:54 2006
@@ -81,7 +81,7 @@
         kernel.loadGBean(artifactManagerData, getClass().getClassLoader());
         kernel.startGBean(artifactManagerData.getAbstractName());
         assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(artifactManagerData.getAbstractName()));
-        ArtifactManager artifactManager = (ArtifactManager) kernel.getProxyManager().createProxy(artifactManagerData.getAbstractName(), ArtifactManager.class);
+        ArtifactManager artifactManager = (ArtifactManager) kernel.getGBean(artifactManagerData.getAbstractName());
 
         TestConfigStore configStore = new TestConfigStore();
         TestRepository testRepository = new TestRepository();

Modified: geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/repository/ArtifactResolverTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/repository/ArtifactResolverTest.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/repository/ArtifactResolverTest.java (original)
+++ geronimo/branches/1.1/modules/kernel/src/test/org/apache/geronimo/kernel/repository/ArtifactResolverTest.java Wed Mar 29 14:16:54 2006
@@ -175,7 +175,6 @@
             GBeanData configData = new GBeanData(configurationName, Configuration.GBEAN_INFO);
             Environment environment = new Environment();
             environment.setConfigId(configId);
-            environment.getProperties().put("foo", "geronimo.test:J2EEServer=geronimo");
             configData.setAttribute("environment", environment);
             configData.setAttribute("gBeanState", NO_OBJECTS_OS);
             configData.setAttribute("configurationStore", this);

Added: geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/GBeanReference.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/GBeanReference.java?rev=389907&view=auto
==============================================================================
--- geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/GBeanReference.java (added)
+++ geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/GBeanReference.java Wed Mar 29 14:16:54 2006
@@ -0,0 +1,56 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation
+ *
+ *  Licensed 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.naming.reference;
+
+import javax.naming.NameNotFoundException;
+
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.AbstractName;
+
+/**
+ * @version $Rev: 385372 $ $Date: 2006-03-12 13:44:50 -0800 (Sun, 12 Mar 2006) $
+ */
+public class GBeanReference extends ConfigurationAwareReference {
+    private final Class type;
+
+    public GBeanReference(Artifact configId, AbstractNameQuery abstractNameQuery, Class type) {
+        super(configId, abstractNameQuery);
+        this.type = type;
+    }
+
+    public String getClassName() {
+        return type.getName();
+    }
+
+    public Object getContent() throws IllegalStateException, NameNotFoundException {
+        AbstractName target;
+        try {
+            target = resolveTargetName();
+        } catch (GBeanNotFoundException e) {
+            throw (NameNotFoundException)new NameNotFoundException("Could not resolve gbean from name query: " + abstractNameQuery).initCause(e);
+        }
+        try {
+            return getKernel().getGBean(target);
+        } catch (GBeanNotFoundException e) {
+            IllegalStateException illegalStateException = new IllegalStateException();
+            illegalStateException.initCause(e);
+            throw illegalStateException;
+        }
+    }
+}

Modified: geronimo/branches/1.1/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java (original)
+++ geronimo/branches/1.1/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java Wed Mar 29 14:16:54 2006
@@ -17,35 +17,25 @@
 
 package org.apache.geronimo.naming.java;
 
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Set;
-import javax.management.ObjectName;
+import javax.naming.Context;
 import javax.naming.NameClassPair;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
-import javax.naming.Context;
 
 import junit.framework.TestCase;
-
-import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.kernel.KernelRegistry;
-import org.apache.geronimo.kernel.KernelFactory;
-import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.naming.enc.EnterpriseNamingContext;
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 385372 $ $Date$
  */
 public class ContextBuilderTest extends TestCase {
     private ComponentContextBuilder builder;
 
-    private List proxy;
-
     public void testEnvEntries() throws Exception {
         String stringVal = "Hello World";
         Character charVal = new Character('H');
@@ -83,27 +73,6 @@
         assertEquals(floatVal, context.lookup("env/float"));
         assertEquals(doubleVal, context.lookup("env/double"));
         assertEquals(booleanVal, context.lookup("env/boolean"));
-    }
-
-    public void xtestResourceEnv() throws Exception {
-        proxy = new ArrayList();
-//        builder.addResourceEnvRef("resourceenvref", List.class, localRef);
-
-        Context context = EnterpriseNamingContext.createEnterpriseNamingContext(builder.getContext());
-        Kernel kernel = KernelFactory.newInstance().createKernel("test.kernel");
-        kernel.boot();
-        try {
-            assertEquals(kernel, KernelRegistry.getKernel("test.kernel"));
-            ObjectName proxyFactoryName = null;//referenceFactory.createAdminObjectObjectName("testAdminObject");
-            GBeanData gbean = null;//new GBeanData(proxyFactoryName, getGbeanInfo());
-            gbean.setAttribute("Content", proxy);
-            kernel.loadGBean(gbean, Class.forName(gbean.getGBeanInfo().getClassName()).getClassLoader());
-            kernel.startGBean(proxyFactoryName);
-            Object o = context.lookup("env/resourceenvref");
-            assertEquals(proxy, o);
-        } finally {
-            kernel.shutdown();
-        }
     }
 
     public void testEmptyEnvironment() throws NamingException {

Modified: geronimo/branches/1.1/modules/security/src/java/org/apache/geronimo/security/jaas/client/JaasLoginCoordinator.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/security/src/java/org/apache/geronimo/security/jaas/client/JaasLoginCoordinator.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/security/src/java/org/apache/geronimo/security/jaas/client/JaasLoginCoordinator.java (original)
+++ geronimo/branches/1.1/modules/security/src/java/org/apache/geronimo/security/jaas/client/JaasLoginCoordinator.java Wed Mar 29 14:16:54 2006
@@ -28,6 +28,7 @@
 
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelRegistry;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.security.jaas.server.JaasSessionId;
 import org.apache.geronimo.security.jaas.server.JaasLoginModuleConfiguration;
 import org.apache.geronimo.security.jaas.LoginModuleControlFlag;
@@ -47,7 +48,7 @@
  * case the client/server distinction is somewhat less important, and the
  * communication is optimized by avoiding network traffic.
  *
- * @version $Rev$ $Date$
+ * @version $Rev: 386763 $ $Date$
  */
 public class JaasLoginCoordinator implements LoginModule {
     public final static String OPTION_HOST = "host";
@@ -156,10 +157,7 @@
     }
 
     private void clear() {
-        Kernel kernel = KernelRegistry.getKernel(kernelName);
-        if (kernel != null) {
-            kernel.getProxyManager().destroyProxy(service);
-        }
+        service = null;
         serverHost = null;
         serverPort = 0;
         realmName = null;
@@ -176,7 +174,13 @@
             return JaasLoginServiceRemotingClient.create(serverHost, serverPort);
         } else {
             Kernel kernel = KernelRegistry.getKernel(kernelName);
-            return (JaasLoginServiceMBean) kernel.getProxyManager().createProxy(serviceName, JaasLoginServiceMBean.class);
+            try {
+                return (JaasLoginServiceMBean) kernel.getGBean(serviceName);
+            } catch (GBeanNotFoundException e) {
+                IllegalStateException illegalStateException = new IllegalStateException();
+                illegalStateException.initCause(e);
+                throw illegalStateException;
+            }
         }
     }
 

Modified: geronimo/branches/1.1/modules/security/src/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/security/src/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/security/src/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java (original)
+++ geronimo/branches/1.1/modules/security/src/java/org/apache/geronimo/security/realm/providers/SQLLoginModule.java Wed Mar 29 14:16:54 2006
@@ -34,18 +34,19 @@
 import javax.security.auth.callback.NameCallback;
 import javax.security.auth.callback.PasswordCallback;
 import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.security.auth.login.LoginException;
 import javax.security.auth.login.FailedLoginException;
+import javax.security.auth.login.LoginException;
 import javax.security.auth.spi.LoginModule;
-import javax.management.ObjectName;
 import javax.sql.DataSource;
 
-import org.apache.geronimo.security.jaas.JaasLoginModuleUse;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelRegistry;
-import org.apache.geronimo.gbean.GBeanQuery;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory;
+import org.apache.geronimo.security.jaas.JaasLoginModuleUse;
 
 
 /**
@@ -108,17 +109,21 @@
             }
             String kernelName = (String) options.get(JaasLoginModuleUse.KERNEL_NAME_LM_OPTION);
             Kernel kernel = KernelRegistry.getKernel(kernelName);
-            Set set = kernel.listGBeans(new GBeanQuery(null, JCAManagedConnectionFactory.class.getName()));
+            Set set = kernel.listGBeans(new AbstractNameQuery(JCAManagedConnectionFactory.class.getName()));
             JCAManagedConnectionFactory factory;
             for (Iterator it = set.iterator(); it.hasNext();) {
-                ObjectName name = (ObjectName) it.next();
-                if(name.getKeyProperty(NameFactory.J2EE_APPLICATION).equals(dataSourceAppName) &&
-                    name.getKeyProperty(NameFactory.J2EE_NAME).equals(dataSourceName)) {
-                    factory = (JCAManagedConnectionFactory) kernel.getProxyManager().createProxy(name, JCAManagedConnectionFactory.class.getClassLoader());
-                    String type = factory.getConnectionFactoryInterface();
-                    if(type.equals(DataSource.class.getName())) {
-                        this.factory = factory;
-                        break;
+                AbstractName name = (AbstractName) it.next();
+                if(name.getName().get(NameFactory.J2EE_APPLICATION).equals(dataSourceAppName) &&
+                    name.getName().get(NameFactory.J2EE_NAME).equals(dataSourceName)) {
+                    try {
+                        factory = (JCAManagedConnectionFactory) kernel.getGBean(name);
+                        String type = factory.getConnectionFactoryInterface();
+                        if(type.equals(DataSource.class.getName())) {
+                            this.factory = factory;
+                            break;
+                        }
+                    } catch (GBeanNotFoundException e) {
+                        // ignore... GBean was unregistered
                     }
                 }
             }

Modified: geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java (original)
+++ geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/EnvironmentBuilder.java Wed Mar 29 14:16:54 2006
@@ -17,6 +17,14 @@
 
 package org.apache.geronimo.deployment.service;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.xbeans.ArtifactType;
 import org.apache.geronimo.deployment.xbeans.ClassFilterType;
@@ -24,25 +32,13 @@
 import org.apache.geronimo.deployment.xbeans.EnvironmentDocument;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
 import org.apache.geronimo.deployment.xbeans.ImportType;
-import org.apache.geronimo.deployment.xbeans.PropertiesType;
-import org.apache.geronimo.deployment.xbeans.PropertyType;
 import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.Dependency;
+import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 import org.apache.xmlbeans.XmlOptions;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 /**
  * @version $Rev:$ $Date:$
  */
@@ -57,18 +53,6 @@
                 environment.setConfigId(toArtifact(environmentType.getConfigId()));
             }
 
-            Map propertiesMap = new HashMap();
-            if (environmentType.isSetProperties()) {
-                PropertyType[] propertiesArray = environmentType.getProperties().getPropertyArray();
-                for (int i = 0; i < propertiesArray.length; i++) {
-                    PropertyType property = propertiesArray[i];
-                    String key = property.getName().trim();
-                    String value = property.getValue().trim();
-                    propertiesMap.put(key, value);
-                }
-            }
-            environment.setProperties(propertiesMap);
-
             if (environmentType.isSetDependencies()) {
                 ArtifactType[] dependencyArray = environmentType.getDependencies().getDependencyArray();
                 LinkedHashSet dependencies = toDependencies(dependencyArray);
@@ -90,7 +74,6 @@
                 environment.setConfigId(additionalEnvironment.getConfigId());
             }
             environment.addDependencies(additionalEnvironment.getDependencies());
-            environment.addProperties(additionalEnvironment.getProperties());
             environment.setInverseClassLoading(environment.isInverseClassLoading() || additionalEnvironment.isInverseClassLoading());
             environment.setSuppressDefaultEnvironment(environment.isSuppressDefaultEnvironment() || additionalEnvironment.isSuppressDefaultEnvironment());
             environment.addHiddenClasses(additionalEnvironment.getHiddenClasses());
@@ -109,17 +92,6 @@
         ArtifactType configId = toArtifactType(environment.getConfigId());
         environmentType.setConfigId(configId);
 
-        if (environment.getProperties().size() >0) {
-            PropertiesType propertiesType = environmentType.addNewProperties();
-            for (Iterator iterator = environment.getProperties().entrySet().iterator(); iterator.hasNext();) {
-                Map.Entry entry = (Map.Entry) iterator.next();
-                String name = (String) entry.getKey();
-                String value = (String) entry.getValue();
-                PropertyType propertyType = propertiesType.addNewProperty();
-                propertyType.setName(name);
-                propertyType.setValue(value);
-            }
-        }
         List dependencies = toArtifactTypes(environment.getDependencies());
         ArtifactType[] artifactTypes = (ArtifactType[]) dependencies.toArray(new ArtifactType[dependencies.size()]);
         DependenciesType dependenciesType = environmentType.addNewDependencies();

Modified: geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanBuilder.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanBuilder.java (original)
+++ geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/GBeanBuilder.java Wed Mar 29 14:16:54 2006
@@ -70,7 +70,7 @@
             if (type == null) {
                 GAttributeInfo attribute = gbean.getGBeanInfo().getAttribute(name);
                 if (attribute == null) {
-                    throw new DeploymentException("Unknown attribute " + name + " on " + gbean.getName());
+                    throw new DeploymentException("Unknown attribute " + name + " on " + gbean.getAbstractName());
                 }
                 type = attribute.getType();
             }
@@ -99,7 +99,7 @@
         }
         GAttributeInfo attribute = gbean.getGBeanInfo().getAttribute(name);
         if (attribute == null) {
-            throw new DeploymentException("Unknown attribute " + name + " on " + gbean.getName());
+            throw new DeploymentException("Unknown attribute " + name + " on " + gbean.getAbstractName());
         }
         String type = attribute.getType();
         Object value = builder.getValue(xmlObject, type, classLoader);
@@ -150,7 +150,7 @@
             }
         }
         if (referenceInfo == null) {
-            throw new DeploymentException("No reference named " + refName + " in gbean " + gbean.getName());
+            throw new DeploymentException("No reference named " + refName + " in gbean " + gbean.getAbstractName());
         }
 
         return buildAbstractNameQuery(pattern, referenceInfo);

Modified: geronimo/branches/1.1/modules/service-builder/src/schema/geronimo-config-1.1.xsd
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/service-builder/src/schema/geronimo-config-1.1.xsd?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/service-builder/src/schema/geronimo-config-1.1.xsd (original)
+++ geronimo/branches/1.1/modules/service-builder/src/schema/geronimo-config-1.1.xsd Wed Mar 29 14:16:54 2006
@@ -68,7 +68,6 @@
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
-            <xs:element name="properties" type="sys:propertiesType" minOccurs="0"/>
             <xs:element name="dependencies" type="sys:dependenciesType" minOccurs="0">
                 <xs:annotation>
                     <xs:documentation>
@@ -110,27 +109,6 @@
             </xs:element>
             <xs:element name="inverse-classloading" type="sys:emptyType" minOccurs="0"/>
             <xs:element name="suppress-default-environment" type="sys:emptyType" minOccurs="0"/>
-        </xs:sequence>
-    </xs:complexType>
-
-    <xs:complexType name="propertiesType">
-        <xs:sequence>
-            <xs:element name="property" type="sys:propertyType" minOccurs="0" maxOccurs="unbounded"/>
-        </xs:sequence>
-    </xs:complexType>
-
-    <xs:complexType name="propertyType">
-        <xs:annotation>
-            <xs:documentation>
-                property holds name and value for the deployment system.  When written the only use for this
-                is to supply part of an object-name like name for the gbeans in the configuration
-                These name-keys will be repeated in child configurations of this configuration.  Normally these
-                are domain and server for jsr-77 style object names.
-            </xs:documentation>
-        </xs:annotation>
-        <xs:sequence>
-            <xs:element name="name" type="xs:string"/>
-            <xs:element name="value" type="xs:string"/>
         </xs:sequence>
     </xs:complexType>
 

Modified: geronimo/branches/1.1/modules/service-builder/src/test-resources/services/plan1.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/service-builder/src/test-resources/services/plan1.xml?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/service-builder/src/test-resources/services/plan1.xml (original)
+++ geronimo/branches/1.1/modules/service-builder/src/test-resources/services/plan1.xml Wed Mar 29 14:16:54 2006
@@ -28,12 +28,6 @@
             <version>DEV</version>
             <type>car</type>
         </configId>
-        <properties>
-            <property>
-                <name>org.apache.geronimo.name.javax.management.j2ee.BaseName</name>
-                <value>domain:J2EEServer=test</value>
-            </property>
-        </properties>
         <dependencies>
             <dependency>
                 <groupId>geronimo</groupId>

Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigurationDump.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigurationDump.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigurationDump.java (original)
+++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigurationDump.java Wed Mar 29 14:16:54 2006
@@ -46,7 +46,7 @@
 import java.util.Set;
 
 /**
- * @version $Rev$ $Date$
+ * @version $Rev: 386505 $ $Date$
  */
 public class ConfigurationDump {
     static {
@@ -97,7 +97,7 @@
 
             startGBean(kernel, configStoreData);
 
-            ConfigurationStore configurationStore = (ConfigurationStore) kernel.getProxyManager().createProxy(configStoreData.getAbstractName(), classLoader);
+            ConfigurationStore configurationStore = (ConfigurationStore) kernel.getGBean(configStoreData.getAbstractName());
             List configurationInfos = configurationStore.listConfigurations();
             for (Iterator iterator = configurationInfos.iterator(); iterator.hasNext();) {
                 ConfigurationInfo configurationInfo = (ConfigurationInfo) iterator.next();
@@ -114,11 +114,11 @@
     }
 
     private static GBeanData buildGBeanData(String key, String value, GBeanInfo info) throws MalformedObjectNameException {
-        AbstractName abstractName = buildAbstractName(key, value, info);
+        AbstractName abstractName = buildAbstractName(key, value);
         return new GBeanData(abstractName, info);
     }
 
-    private static AbstractName buildAbstractName(String key, String value, GBeanInfo info) throws MalformedObjectNameException {
+    private static AbstractName buildAbstractName(String key, String value) throws MalformedObjectNameException {
         Map names = new HashMap();
         names.put(key, value);
         return new AbstractName(new Artifact("geronimo", "configdump", "1", "car"), names, new ObjectName("geronimo.configdump:" + key + "=" + value));
@@ -126,9 +126,9 @@
 
     private static void startGBean(Kernel kernel, GBeanData gbeanData) throws Exception {
         kernel.loadGBean(gbeanData, classLoader);
-        kernel.startGBean(gbeanData.getName());
-        if (kernel.getGBeanState(gbeanData.getName()) != State.RUNNING_INDEX) {
-            System.out.println("Failed to start " + gbeanData.getName());
+        kernel.startGBean(gbeanData.getAbstractName());
+        if (!kernel.isRunning(gbeanData.getAbstractName())) {
+            System.out.println("Failed to start " + gbeanData.getAbstractName());
             throw new StartUpError();
         }
     }
@@ -139,8 +139,8 @@
         out.println("==================================================");
 
         loadRecursive(kernel, configurationStore, id);
-        ObjectName name;
-        name = Configuration.getConfigurationObjectName(id);
+        AbstractName name;
+        name = Configuration.getConfigurationAbstractName(id);
         out.println("objectName: " + name);
 
         GBeanData config = kernel.getGBeanData(name);
@@ -218,13 +218,13 @@
             return;
         }
 
-        Configuration configuration = (Configuration) kernel.getProxyManager().createProxy(name, Configuration.class);
+        Configuration configuration = (Configuration) kernel.getGBean(name);
         Collection gbeans = configuration.getGBeans().values();
         for (Iterator iterator = gbeans.iterator(); iterator.hasNext();) {
             GBeanData gbeanData = (GBeanData) iterator.next();
             out.println();
             out.println();
-            out.println("gbean: " + gbeanData.getName());
+            out.println("gbean: " + gbeanData.getAbstractName());
             out.println("gbeanInfo: " + gbeanData.getGBeanInfo().getSourceClass());
 
             Map attributes = gbeanData.getAttributes();
@@ -279,13 +279,13 @@
 
         for (Iterator iterator = ancestors.iterator(); iterator.hasNext();) {
             Artifact id = (Artifact) iterator.next();
-            ObjectName configName = Configuration.getConfigurationObjectName(id);
+            AbstractName configName = Configuration.getConfigurationAbstractName(id);
             kernel.startGBean(configName);
         }
     }
 
     private static void loadRecursive(Kernel kernel, ConfigurationStore configurationStore, Artifact configId, LinkedList ancestors, Set preloaded) throws Exception {
-        ObjectName name = Configuration.getConfigurationObjectName(configId);
+        AbstractName name = Configuration.getConfigurationAbstractName(configId);
         if (preloaded.contains(name)) {
             return;
         }

Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigurationOverride.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigurationOverride.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigurationOverride.java (original)
+++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigurationOverride.java Wed Mar 29 14:16:54 2006
@@ -21,7 +21,6 @@
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
 
-import javax.management.MalformedObjectNameException;
 import java.io.PrintWriter;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
@@ -40,7 +39,7 @@
         this.load = load;
     }
 
-    public ConfigurationOverride(Element element) throws MalformedObjectNameException, InvalidGBeanException {
+    public ConfigurationOverride(Element element) throws InvalidGBeanException {
         name = element.getAttribute("name");
 
         String loadConfigString = element.getAttribute("load");
@@ -83,12 +82,11 @@
     }
 
     public GBeanOverride getGBean(AbstractName gbeanName) {
-        //TODO configid should this use URI?
-        return (GBeanOverride) gbeans.get(gbeanName.getObjectName());
+        return (GBeanOverride) gbeans.get(gbeanName);
     }
 
     public void addGBean(AbstractName gbeanName, GBeanOverride gbean) {
-        gbeans.put(gbeanName.getObjectName(), gbean);
+        gbeans.put(gbeanName, gbean);
     }
 
     public void writeXml(PrintWriter out) {

Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/GBeanOverride.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/GBeanOverride.java?rev=389907&r1=389906&r2=389907&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/GBeanOverride.java (original)
+++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/GBeanOverride.java Wed Mar 29 14:16:54 2006
@@ -69,7 +69,7 @@
         if (this.gbeanInfo == null) {
             throw new IllegalArgumentException("GBeanInfo must have a source class set");
         }
-        name = gbeanData.getName();
+        name = gbeanData.getAbstractName();
         load = true;
 
         // set attributes
@@ -78,7 +78,7 @@
             String attributeName = (String) entry.getKey();
             GAttributeInfo attributeInfo = gbeanInfo.getAttribute(attributeName);
             if (attributeInfo == null) {
-                throw new InvalidAttributeException("No attribute: " + attributeName + " for gbean: " + gbeanData.getName());
+                throw new InvalidAttributeException("No attribute: " + attributeName + " for gbean: " + gbeanData.getAbstractName());
             }
             Object attributeValue = entry.getValue();
             setAttribute(attributeName, attributeValue, attributeInfo.getType());



Mime
View raw message