geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r396469 - in /geronimo/branches/1.1/modules: connector/src/java/org/apache/geronimo/connector/ connector/src/java/org/apache/geronimo/connector/outbound/ deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/ deploy-jsr88/src/java...
Date Mon, 24 Apr 2006 07:27:40 GMT
Author: dain
Date: Mon Apr 24 00:27:37 2006
New Revision: 396469

URL: http://svn.apache.org/viewcvs?rev=396469&view=rev
Log:
Fixed NotSerializableException problem when creating proxies using a remote kernel.
Removed ObjectName code from deployment commands.
Changed ConnectorMethodInterceptor to use an AbstractName instead of an ObjectName.

Modified:
    geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/ConnectorMethodInterceptor.java
    geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
    geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
    geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java
    geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
    geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/Kernel.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/KernelGBean.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicKernel.java
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicProxyManager.java
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/jmx/KernelDelegate.java

Modified: geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/ConnectorMethodInterceptor.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/ConnectorMethodInterceptor.java?rev=396469&r1=396468&r2=396469&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/ConnectorMethodInterceptor.java
(original)
+++ geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/ConnectorMethodInterceptor.java
Mon Apr 24 00:27:37 2006
@@ -19,13 +19,13 @@
 
 import java.io.Serializable;
 import java.lang.reflect.Method;
-import javax.management.ObjectName;
 
 import net.sf.cglib.proxy.MethodInterceptor;
 import net.sf.cglib.proxy.MethodProxy;
 import org.apache.geronimo.kernel.KernelRegistry;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.proxy.DeadProxyException;
+import org.apache.geronimo.gbean.AbstractName;
 
 /**
  * MethodInterceptor used by various Proxies.  The important part of this class is the
@@ -35,12 +35,13 @@
  *
  * */
 public class ConnectorMethodInterceptor implements MethodInterceptor, Serializable {
+    private static final long serialVersionUID = -3062915319296676033L;
     private final String kernelName;
-    private final ObjectName targetName;
+    private final AbstractName targetName;
 
     private transient Object internalProxy;
 
-    public ConnectorMethodInterceptor(final String kernelName, final ObjectName targetName)
{
+    public ConnectorMethodInterceptor(String kernelName, AbstractName targetName) {
         this.kernelName = kernelName;
         this.targetName = targetName;
     }
@@ -53,7 +54,7 @@
             return methodProxy.invoke(internalProxy, objects);
         } catch (DeadProxyException e) {
             connectInternalProxy();
-            return methodProxy.invoke(internalProxy, objects);            
+            return methodProxy.invoke(internalProxy, objects);
         }
     }
 

Modified: geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java?rev=396469&r1=396468&r2=396469&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
(original)
+++ geronimo/branches/1.1/modules/connector/src/java/org/apache/geronimo/connector/outbound/ManagedConnectionFactoryWrapper.java
Mon Apr 24 00:27:37 2006
@@ -200,7 +200,7 @@
             enhancer.setInterfaces(allImplementedInterfaces);
             enhancer.setCallbackType(net.sf.cglib.proxy.MethodInterceptor.class);
             enhancer.setUseFactory(false);//????
-            interceptor = new ConnectorMethodInterceptor(kernel.getKernelName(), ObjectName.getInstance(objectName));
+            interceptor = new ConnectorMethodInterceptor(kernel.getKernelName(), abstractName);
             enhancer.setCallbacks(new Callback[]{interceptor});
             proxy = enhancer.create(new Class[0], new Object[0]);
         } else {

Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java?rev=396469&r1=396468&r2=396469&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
(original)
+++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
Mon Apr 24 00:27:37 2006
@@ -32,7 +32,6 @@
 import javax.enterprise.deploy.spi.exceptions.InvalidModuleException;
 import javax.enterprise.deploy.spi.exceptions.TargetException;
 import javax.enterprise.deploy.spi.status.ProgressObject;
-import javax.management.MalformedObjectNameException;
 import org.apache.geronimo.connector.deployment.RARConfigurer;
 import org.apache.geronimo.deployment.plugin.TargetImpl;
 import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
@@ -164,8 +163,6 @@
             return result.size() == 0 ? null : (TargetModuleID[]) result.toArray(new TargetModuleID[result.size()]);
         } catch (NoSuchStoreException e) {
             throw (TargetException) new TargetException(e.getMessage()).initCause(e);
-        } catch (MalformedObjectNameException e) {
-            throw new RuntimeException(e);
         }
     }
 

Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java?rev=396469&r1=396468&r2=396469&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java
(original)
+++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java
Mon Apr 24 00:27:37 2006
@@ -16,15 +16,6 @@
  */
 package org.apache.geronimo.deployment.plugin.local;
 
-import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
-import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.ObjectNameUtil;
-
-import javax.enterprise.deploy.shared.CommandType;
-import javax.enterprise.deploy.shared.ModuleType;
-import javax.enterprise.deploy.spi.Target;
-import javax.management.ObjectName;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -34,13 +25,21 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
+import javax.enterprise.deploy.shared.CommandType;
+import javax.enterprise.deploy.shared.ModuleType;
+import javax.enterprise.deploy.spi.Target;
+
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.Deployer;
+import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.kernel.Kernel;
 
 /**
  * @version $Rev$ $Date$
  */
 public abstract class AbstractDeployCommand extends CommandSupport {
-    private final static String DEPLOYER_NAME = "*:name=Deployer,j2eeType=Deployer,*";
-
     protected final Kernel kernel;
     private static final String[] DEPLOY_SIG = {boolean.class.getName(), File.class.getName(),
File.class.getName()};
     protected final boolean spool;
@@ -48,7 +47,7 @@
     protected File deploymentPlan;
     protected InputStream moduleStream;
     protected InputStream deploymentStream;
-    protected ObjectName deployer;
+    protected AbstractName deployer;
 
     public AbstractDeployCommand(CommandType command, Kernel kernel, File moduleArchive,
File deploymentPlan, InputStream moduleStream, InputStream deploymentStream, boolean spool)
{
         super(command);
@@ -61,8 +60,8 @@
         deployer = getDeployerName();
     }
 
-    private ObjectName getDeployerName() {
-        Set deployers = kernel.listGBeans(ObjectNameUtil.getObjectName(DEPLOYER_NAME));
+    private AbstractName getDeployerName() {
+        Set deployers = kernel.listGBeans(new AbstractNameQuery(Deployer.class.getName()));
         if (deployers.isEmpty()) {
             fail("No Deployer GBean present in running Geronimo server. " +
                  "This usually indicates a serious problem with the configuration of " +
@@ -78,7 +77,7 @@
             return null;
         }
         Iterator j = deployers.iterator();
-        ObjectName deployer = (ObjectName) j.next();
+        AbstractName deployer = (AbstractName) j.next();
         if (j.hasNext()) {
             fail("More than one deployer found");
             return null;

Modified: geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java?rev=396469&r1=396468&r2=396469&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
(original)
+++ geronimo/branches/1.1/modules/deploy-jsr88/src/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
Mon Apr 24 00:27:37 2006
@@ -36,8 +36,6 @@
 import javax.enterprise.deploy.spi.status.ProgressEvent;
 import javax.enterprise.deploy.spi.status.ProgressListener;
 import javax.enterprise.deploy.spi.status.ProgressObject;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.util.ArrayList;
@@ -270,13 +268,11 @@
     }
 
     public static boolean isWebApp(Kernel kernel, String configName) {
-        try {
-            Set set = kernel.listGBeans(new ObjectName("*:j2eeType=WebModule,name="+configName+",*"));
-            return set.size() > 0;
-        } catch (MalformedObjectNameException e) {
-            e.printStackTrace();
-            return false;
-        }
+        Map filter = new HashMap();
+        filter.put("j2eeType", "WebModule");
+        filter.put("name", configName);
+        Set set = kernel.listGBeans(new AbstractNameQuery(null, filter));
+        return set.size() > 0;
     }
 
     protected void addWebURLs(Kernel kernel) {
@@ -321,30 +317,41 @@
         }
     }
 
-    public static List loadChildren(Kernel kernel, String configName) throws MalformedObjectNameException
{
+    public static List loadChildren(Kernel kernel, String configName) {
         List kids = new ArrayList();
-        Set test = kernel.listGBeans(new ObjectName("*:J2EEApplication="+configName+",j2eeType=WebModule,*"));
+
+        Map filter = new HashMap();
+        filter.put("J2EEApplication", configName);
+
+        filter.put("j2eeType", "WebModule");
+        Set test = kernel.listGBeans(new AbstractNameQuery(null, filter));
         for (Iterator it = test.iterator(); it.hasNext();) {
-            ObjectName child = (ObjectName) it.next();
-            String childName = child.getKeyProperty("name");
+            AbstractName child = (AbstractName) it.next();
+            String childName = child.getNameProperty("name");
             kids.add(childName);
         }
-        test = kernel.listGBeans(new ObjectName("*:J2EEApplication="+configName+",j2eeType=EJBModule,*"));
+
+        filter.put("j2eeType", "EJBModule");
+        test = kernel.listGBeans(new AbstractNameQuery(null, filter));
         for (Iterator it = test.iterator(); it.hasNext();) {
-            ObjectName child = (ObjectName) it.next();
-            String childName = child.getKeyProperty("name");
+            AbstractName child = (AbstractName) it.next();
+            String childName = child.getNameProperty("name");
             kids.add(childName);
         }
-        test = kernel.listGBeans(new ObjectName("*:J2EEApplication="+configName+",j2eeType=AppClientModule,*"));
+
+        filter.put("j2eeType", "AppClientModule");
+        test = kernel.listGBeans(new AbstractNameQuery(null, filter));
         for (Iterator it = test.iterator(); it.hasNext();) {
-            ObjectName child = (ObjectName) it.next();
-            String childName = child.getKeyProperty("name");
+            AbstractName child = (AbstractName) it.next();
+            String childName = child.getNameProperty("name");
             kids.add(childName);
         }
-        test = kernel.listGBeans(new ObjectName("*:J2EEApplication="+configName+",j2eeType=ResourceAdapterModule,*"));
+
+        filter.put("j2eeType", "ResourceAdapterModule");
+        test = kernel.listGBeans(new AbstractNameQuery(null, filter));
         for (Iterator it = test.iterator(); it.hasNext();) {
-            ObjectName child = (ObjectName) it.next();
-            String childName = child.getKeyProperty("name");
+            AbstractName child = (AbstractName) it.next();
+            String childName = child.getNameProperty("name");
             kids.add(childName);
         }
         return kids;

Modified: geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java?rev=396469&r1=396468&r2=396469&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
(original)
+++ geronimo/branches/1.1/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
Mon Apr 24 00:27:37 2006
@@ -19,21 +19,21 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Hashtable;
 import java.util.jar.Attributes;
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
-import java.net.URI;
 
 import javax.management.ObjectName;
 
@@ -42,9 +42,9 @@
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.gbean.AbstractName;
-import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.Configuration;
@@ -164,11 +164,15 @@
         // Generate the URL based on the remote deployment configuration
         Hashtable hash = new Hashtable();
         hash.put("J2EEApplication", token.getObjectName().getKeyProperty("J2EEApplication"));
-        hash.put("J2EEServer", token.getObjectName().getKeyProperty("J2EEServer"));
         hash.put("j2eeType", "WebModule");
         try {
             hash.put("name", Configuration.getConfigurationID(config).toString());
-            ObjectName module = new ObjectName(token.getObjectName().getDomain(), hash);
+            Set names = kernel.listGBeans(new AbstractNameQuery(null, hash));
+            if (names.size() != 1) {
+                log.error("Unable to look up remote deploy upload URL");
+                return null;
+            }
+            AbstractName module = (AbstractName) names.iterator().next();
 
             String containerName = (String) kernel.getAttribute(module, "containerName");
             String contextPath = (String) kernel.getAttribute(module, "contextPath");

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=396469&r1=396468&r2=396469&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 Mon
Apr 24 00:27:37 2006
@@ -356,10 +356,6 @@
      */
     GBeanInfo getGBeanInfo(ObjectName name) throws GBeanNotFoundException;
     /**
-     * @deprecated Use AbstractName version instead
-     */
-    GBeanData getGBeanData(ObjectName name) throws GBeanNotFoundException, InternalKernelException;
-    /**
      * Returns a Set with elements of type ObjectName
      *
      * @deprecated Use AbstractNameQuery version instead

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=396469&r1=396468&r2=396469&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
Mon Apr 24 00:27:37 2006
@@ -250,10 +250,6 @@
         return kernel.getGBeanInfo(shortName, type);
     }
 
-    public GBeanData getGBeanData(ObjectName name) throws GBeanNotFoundException, InternalKernelException
{
-        return kernel.getGBeanData(name);
-    }
-
     public GBeanData getGBeanData(AbstractName name) throws GBeanNotFoundException, InternalKernelException
{
         return kernel.getGBeanData(name);
     }

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=396469&r1=396468&r2=396469&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
Mon Apr 24 00:27:37 2006
@@ -329,11 +329,6 @@
         return gbeanInstance.getGBeanInfo();
     }
 
-    public GBeanData getGBeanData(ObjectName name) throws GBeanNotFoundException, InternalKernelException
{
-        GBeanInstance gbeanInstance = registry.getGBeanInstance(name);
-        return gbeanInstance.getGBeanData();
-    }
-
     public GBeanData getGBeanData(AbstractName name) throws GBeanNotFoundException, InternalKernelException
{
         GBeanInstance gbeanInstance = registry.getGBeanInstance(name);
         return gbeanInstance.getGBeanData();

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicProxyManager.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicProxyManager.java?rev=396469&r1=396468&r2=396469&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicProxyManager.java
(original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/basic/BasicProxyManager.java
Mon Apr 24 00:27:37 2006
@@ -85,12 +85,14 @@
         try {
             // if the type is visible from the target's classloader use it
             // otherwise use the type's classloader
-            ClassLoader classLoader = kernel.getClassLoaderFor(target);
+            ClassLoader classLoader;
             try {
+                classLoader = kernel.getClassLoaderFor(target);
                 if (!type.equals(ClassLoading.loadClass(type.getName(), classLoader))) {
                     classLoader = type.getClassLoader();
                 }
-            } catch (ClassNotFoundException ignored) {
+            } catch (Exception ignored) {
+                classLoader = type.getClassLoader();
             }
 
             // add any interface exposed by the gbean that is visible from the selected class
loader

Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/jmx/KernelDelegate.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/jmx/KernelDelegate.java?rev=396469&r1=396468&r2=396469&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/jmx/KernelDelegate.java
(original)
+++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/jmx/KernelDelegate.java
Mon Apr 24 00:27:37 2006
@@ -477,54 +477,6 @@
         }
     }
 
-    public boolean isGBeanEnabled(ObjectName name) throws GBeanNotFoundException {
-        try {
-            return ((Boolean) invokeKernel("isGBeanEnabled", new Object[] {name}, new String[]
{ObjectName.class.getName()})).booleanValue();
-        } catch (GBeanNotFoundException e) {
-            throw e;
-        } catch (RuntimeException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new InternalKernelException(e);
-        }
-    }
-
-    public boolean isGBeanEnabled(AbstractName name) throws GBeanNotFoundException {
-        try {
-            return ((Boolean) invokeKernel("isGBeanEnabled", new Object[] {name}, new String[]
{AbstractName.class.getName()})).booleanValue();
-        } catch (GBeanNotFoundException e) {
-            throw e;
-        } catch (RuntimeException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new InternalKernelException(e);
-        }
-    }
-
-    public void setGBeanEnabled(ObjectName name, boolean enabled) throws GBeanNotFoundException
{
-        try {
-            invokeKernel("setGBeanEnabled", 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 setGBeanEnabled(AbstractName name, boolean enabled) throws GBeanNotFoundException
{
-        try {
-            invokeKernel("setGBeanEnabled", 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 getAttribute(ObjectName objectName, String attributeName) throws Exception
{
         return invokeKernel("getAttribute", new Object[]{objectName, attributeName}, new
String[]{ObjectName.class.getName(), String.class.getName()});
     }
@@ -753,7 +705,7 @@
 
     public ClassLoader getClassLoaderFor(AbstractName name) throws GBeanNotFoundException
{
         try {
-            return (ClassLoader) invokeKernel("getClassLoaderFor", new Object[] {name}, new
String[] {ObjectName.class.getName()});
+            return (ClassLoader) invokeKernel("getClassLoaderFor", new Object[] {name}, new
String[] {AbstractName.class.getName()});
         } catch (GBeanNotFoundException e) {
             throw e;
         } catch (RuntimeException e) {
@@ -790,18 +742,6 @@
     public ClassLoader getClassLoaderFor(String shortName, Class type) throws GBeanNotFoundException
{
         try {
             return (ClassLoader) invokeKernel("getClassLoaderFor", new Object[] {shortName,
type}, new String[] {String.class.getName(), Class.class.getName()});
-        } catch (GBeanNotFoundException e) {
-            throw e;
-        } catch (RuntimeException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new InternalKernelException(e);
-        }
-    }
-
-    public GBeanData getGBeanData(ObjectName name) throws GBeanNotFoundException {
-        try {
-            return (GBeanData) invokeKernel("getGBeanData", new Object[] {name}, new String[]
{ObjectName.class.getName()});
         } catch (GBeanNotFoundException e) {
             throw e;
         } catch (RuntimeException e) {



Mime
View raw message