[jboss-cvs] JBossAS SVN: r86257 - trunk/server/src/main/org/jboss/jmx/connector/invoker.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Mar 24 10:00:57 EDT 2009


Author: adrian at jboss.org
Date: 2009-03-24 10:00:57 -0400 (Tue, 24 Mar 2009)
New Revision: 86257

Modified:
   trunk/server/src/main/org/jboss/jmx/connector/invoker/InvokerAdaptorService.java
Log:
[JBAS-6662] - Use the spec define getClassLoaderFor() to determine the classloader for deserialization

Modified: trunk/server/src/main/org/jboss/jmx/connector/invoker/InvokerAdaptorService.java
===================================================================
--- trunk/server/src/main/org/jboss/jmx/connector/invoker/InvokerAdaptorService.java	2009-03-24 13:56:40 UTC (rev 86256)
+++ trunk/server/src/main/org/jboss/jmx/connector/invoker/InvokerAdaptorService.java	2009-03-24 14:00:57 UTC (rev 86257)
@@ -25,11 +25,12 @@
 import java.lang.reflect.Method;
 import java.lang.reflect.UndeclaredThrowableException;
 import java.rmi.RemoteException;
+import java.security.Principal;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
-import java.security.Principal;
+
 import javax.management.InstanceNotFoundException;
 import javax.management.ListenerNotFoundException;
 import javax.management.MBeanServer;
@@ -42,7 +43,6 @@
 import org.jboss.invocation.MarshalledInvocation;
 import org.jboss.jmx.adaptor.rmi.RMINotificationListener;
 import org.jboss.jmx.connector.invoker.client.InvokerAdaptorException;
-import org.jboss.mx.server.ServerConstants;
 import org.jboss.security.SecurityConstants;
 import org.jboss.security.SecurityContext;
 import org.jboss.system.Registry;
@@ -74,9 +74,8 @@
  **/
 public class InvokerAdaptorService
    extends ServiceMBeanSupport
-   implements InvokerAdaptorServiceMBean, ServerConstants
+   implements InvokerAdaptorServiceMBean
 {
-   private ObjectName mbeanRegistry;
    /** */
    private Map marshalledInvocationMapping = new HashMap();
    /** */
@@ -111,8 +110,6 @@
    protected void startService()
       throws Exception
    {
-      mbeanRegistry = new ObjectName(MBEAN_REGISTRY);
-
       // Build the interface method map
       HashMap tmpMap = new HashMap(61);
       for(int n = 0; n < exportedInterfaces.length; n ++)
@@ -212,13 +209,7 @@
          ObjectName objectName = (ObjectName) invocation.getValue("JMX_OBJECT_NAME");
          if (objectName != null)
          {
-            // Obtain the ClassLoader associated with the MBean deployment
-            newCL = (ClassLoader) server.invoke
-            (
-               mbeanRegistry, "getValue",
-               new Object[] { objectName, CLASSLOADER },
-               new String[] { ObjectName.class.getName(), String.class.getName() }
-            );
+            newCL = server.getClassLoaderFor(objectName);
          }
 
          if (newCL != null && newCL != oldCL)




More information about the jboss-cvs-commits mailing list