[jboss-osgi-commits] JBoss-OSGI SVN: r101012 - in projects/jboss-osgi: projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management and 5 other directories.

jboss-osgi-commits at lists.jboss.org jboss-osgi-commits at lists.jboss.org
Tue Feb 16 01:32:30 EST 2010


Author: thomas.diesler at jboss.com
Date: 2010-02-16 01:32:28 -0500 (Tue, 16 Feb 2010)
New Revision: 101012

Modified:
   projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemotePackageAdmin.java
   projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteRuntime.java
   projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/MBeanProxy.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/enterprise/jmx/JMXEnterpriseTestCase.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jmx/JMXTestCase.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGi108TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGi36TestCase.java
Log:
Allign signature with MBeanServerInvocationHandler.newProxyInstance

Modified: projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemotePackageAdmin.java
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemotePackageAdmin.java	2010-02-16 06:28:53 UTC (rev 101011)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemotePackageAdmin.java	2010-02-16 06:32:28 UTC (rev 101012)
@@ -51,7 +51,7 @@
       ObjectName[] bundleArr = getBundleNames(bundles);
       try
       {
-         ManagedFrameworkMBean mbeanProxy = MBeanProxy.get(ManagedFrameworkMBean.class, ManagedFrameworkMBean.MBEAN_MANAGED_FRAMEWORK, runtime.getMBeanServer());
+         ManagedFrameworkMBean mbeanProxy = MBeanProxy.get(runtime.getMBeanServer(), ManagedFrameworkMBean.MBEAN_MANAGED_FRAMEWORK, ManagedFrameworkMBean.class);
          return mbeanProxy.resolveBundles(bundleArr);
       }
       catch (MBeanProxyException ex)
@@ -65,7 +65,7 @@
       ObjectName[] bundleArr = getBundleNames(bundles);
       try
       {
-         ManagedFrameworkMBean mbeanProxy = MBeanProxy.get(ManagedFrameworkMBean.class, ManagedFrameworkMBean.MBEAN_MANAGED_FRAMEWORK, runtime.getMBeanServer());
+         ManagedFrameworkMBean mbeanProxy = MBeanProxy.get(runtime.getMBeanServer(), ManagedFrameworkMBean.MBEAN_MANAGED_FRAMEWORK, ManagedFrameworkMBean.class);
          mbeanProxy.refreshPackages(bundleArr);
       }
       catch (MBeanProxyException ex)

Modified: projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteRuntime.java
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteRuntime.java	2010-02-16 06:28:53 UTC (rev 101011)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteRuntime.java	2010-02-16 06:32:28 UTC (rev 101012)
@@ -199,7 +199,7 @@
       try
       {
          if (managedFramework == null)
-            managedFramework = MBeanProxy.get(ManagedFrameworkMBean.class, ManagedFrameworkMBean.MBEAN_MANAGED_FRAMEWORK, getMBeanServer());
+            managedFramework = MBeanProxy.get(getMBeanServer(), ManagedFrameworkMBean.MBEAN_MANAGED_FRAMEWORK, ManagedFrameworkMBean.class);
       }
       catch (MBeanProxyException ex)
       {
@@ -216,7 +216,7 @@
             {
                try
                {
-                  bundleMBean = MBeanProxy.get(ManagedBundleMBean.class, oname, getMBeanServer());
+                  bundleMBean = MBeanProxy.get(getMBeanServer(), oname, ManagedBundleMBean.class);
                }
                catch (MBeanProxyException ex)
                {
@@ -234,7 +234,7 @@
             {
                try
                {
-                  bundleMBean = MBeanProxy.get(ManagedBundleMBean.class, oname, getMBeanServer());
+                  bundleMBean = MBeanProxy.get(getMBeanServer(), oname, ManagedBundleMBean.class);
                }
                catch (MBeanProxyException ex)
                {
@@ -251,7 +251,7 @@
             {
                try
                {
-                  ManagedBundleMBean remBundle = MBeanProxy.get(ManagedBundleMBean.class, bundleOName, getMBeanServer());
+                  ManagedBundleMBean remBundle = MBeanProxy.get(getMBeanServer(), bundleOName, ManagedBundleMBean.class);
                   remBundles.add(remBundle);
                }
                catch (MBeanProxyException ex)

Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/MBeanProxy.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/MBeanProxy.java	2010-02-16 06:28:53 UTC (rev 101011)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/management/MBeanProxy.java	2010-02-16 06:32:28 UTC (rev 101012)
@@ -23,25 +23,9 @@
 
 // $Id$
 
-import java.io.Serializable;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.lang.reflect.UndeclaredThrowableException;
-import java.util.HashMap;
-
-import javax.management.Attribute;
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanAttributeInfo;
-import javax.management.MBeanException;
-import javax.management.MBeanInfo;
-import javax.management.MBeanOperationInfo;
 import javax.management.MBeanServerConnection;
+import javax.management.MBeanServerInvocationHandler;
 import javax.management.ObjectName;
-import javax.management.ReflectionException;
-import javax.management.RuntimeErrorException;
-import javax.management.RuntimeMBeanException;
-import javax.management.RuntimeOperationsException;
 
 /**
  * A simple MBeanProxy
@@ -52,351 +36,8 @@
 public class MBeanProxy
 {
    @SuppressWarnings({ "unchecked" })
-   public static <T> T get(Class<T> interf, ObjectName name, MBeanServerConnection server) throws MBeanProxyException
+   public static <T> T get(MBeanServerConnection server, ObjectName name, Class<T> interf) throws MBeanProxyException
    {
-      return (T)get(new Class[] { interf }, name, server);
+      return (T)MBeanServerInvocationHandler.newProxyInstance(server, name, interf, false);
    }
-
-   @SuppressWarnings({ "rawtypes" })
-   public static Object get(Class[] interfaces, ObjectName name, MBeanServerConnection server) throws MBeanProxyException
-   {
-      if (interfaces == null || interfaces.length == 0)
-         throw new IllegalArgumentException("Null interfaces");
-
-      ClassLoader classLoader = interfaces[0].getClassLoader();
-      return Proxy.newProxyInstance(classLoader, interfaces, new JMXInvocationHandler(server, name));
-   }
-
-   /**
-    * Invocation handler for MBean proxies.
-    *
-    * @author  <a href="mailto:juha at jboss.org">Juha Lindfors</a>
-    * @author  Thomas.Diesler at jboss.com
-    * @since 24-Feb-2009
-    */
-   static class JMXInvocationHandler implements InvocationHandler, Serializable
-   {
-      private static final long serialVersionUID = 3714728148040623702L;
-
-      // Attributes -------------------------------------------------
-
-      /*
-       * Reference to the MBean server this proxy connects to.
-       */
-      protected MBeanServerConnection server = null;
-
-      /*
-       * The object name of the MBean this proxy represents.
-       */
-      protected ObjectName objectName = null;
-
-      /*
-       * MBean attribute meta data.
-       */
-      private HashMap<String, MBeanAttributeInfo> attributeMap = new HashMap<String, MBeanAttributeInfo>();
-
-      /*
-       * Indicates whether Object.toString() should be delegated to the resource or handled by the proxy.
-       */
-      private boolean delegateToStringToResource = false;
-
-      /*
-       * Indicates whether Object.equals() should be delegated to the resource or handled by the proxy.
-       */
-      private boolean delegateEqualsToResource = false;
-
-      /*
-       * Indicates whether Object.hashCode() should be delegated to the resource or handled by the proxy.
-       */
-      private boolean delegateHashCodeToResource = false;
-
-      // Constructors -----------------------------------------------
-
-      /*
-       * Constructs a new JMX MBean Proxy invocation handler.
-       * @param server reference to the MBean server this proxy connects to
-       * @param name object name of the MBean this proxy represents
-       * @throws MBeanProxyCreationException wraps underlying JMX exceptions in case the proxy creation fails
-       */
-      public JMXInvocationHandler(MBeanServerConnection server, ObjectName name) throws MBeanProxyException
-      {
-         try
-         {
-            if (server == null)
-               throw new MBeanProxyException("null agent reference");
-
-            if (name == null)
-               throw new MBeanProxyException("null object name");
-
-            this.server = server;
-            this.objectName = name;
-
-            MBeanInfo info = server.getMBeanInfo(objectName);
-            MBeanAttributeInfo[] attributes = info.getAttributes();
-            MBeanOperationInfo[] operations = info.getOperations();
-
-            // collect the MBean attribute metadata for standard mbean proxies
-            for (int i = 0; i < attributes.length; ++i)
-               attributeMap.put(attributes[i].getName(), attributes[i]);
-
-            // Check whether the target resource exposes the common object methods.
-            // Dynamic Proxy will delegate these methods automatically to the
-            // invoke() implementation.
-            for (int i = 0; i < operations.length; ++i)
-            {
-               if (operations[i].getName().equals("toString") && operations[i].getReturnType().equals("java.lang.String")
-                     && operations[i].getSignature().length == 0)
-               {
-                  delegateToStringToResource = true;
-               }
-
-               else if (operations[i].getName().equals("equals") && operations[i].getReturnType().equals(Boolean.TYPE.getName())
-                     && operations[i].getSignature().length == 1 && operations[i].getSignature()[0].getType().equals("java.lang.Object"))
-               {
-                  delegateEqualsToResource = true;
-               }
-
-               else if (operations[i].getName().equals("hashCode") && operations[i].getReturnType().equals(Integer.TYPE.getName())
-                     && operations[i].getSignature().length == 0)
-               {
-                  delegateHashCodeToResource = true;
-               }
-            }
-         }
-         catch (InstanceNotFoundException e)
-         {
-            throw new MBeanProxyException("Object name " + name + " not found: " + e.toString());
-         }
-         catch (Exception ex)
-         {
-            throw new MBeanProxyException(ex.toString());
-         }
-      }
-
-      // InvocationHandler implementation ---------------------------
-
-      @SuppressWarnings("rawtypes")
-      public Object invoke(Object proxy, Method method, Object[] args) throws Exception
-      {
-         Class<?> declaringClass = method.getDeclaringClass();
-
-         // Handle methods from Object class. If the target resource exposes
-         // operation metadata with same signature then the invocations will be
-         // delegated to the target. Otherwise this instance of invocation handler
-         // will execute them.
-         if (declaringClass == Object.class)
-            return handleObjectMethods(method, args);
-
-         try
-         {
-            String methodName = method.getName();
-
-            // Assume a get/setAttribute convention on the typed proxy interface.
-            // If the MBean metadata exposes a matching attribute then use the
-            // MBeanServer attribute accessors to read/modify the value. If not,
-            // fallback to MBeanServer.invoke() assuming this is an operation
-            // invocation despite the accessor naming convention.
-
-            // getter
-            if (methodName.startsWith("get") && args == null)
-            {
-               String attrName = methodName.substring(3, methodName.length());
-
-               // check that the metadata exists
-               MBeanAttributeInfo info = (MBeanAttributeInfo)attributeMap.get(attrName);
-               if (info != null)
-               {
-                  String retType = method.getReturnType().getName();
-
-                  // check for correct return type on the getter
-                  if (retType.equals(info.getType()))
-                  {
-                     return server.getAttribute(objectName, attrName);
-                  }
-               }
-            }
-
-            // boolean getter
-            else if (methodName.startsWith("is") && args == null)
-            {
-               String attrName = methodName.substring(2, methodName.length());
-
-               // check that the metadata exists
-               MBeanAttributeInfo info = (MBeanAttributeInfo)attributeMap.get(attrName);
-               if (info != null && info.isIs())
-               {
-                  Class<?> retType = method.getReturnType();
-
-                  // check for correct return type on the getter
-                  if (retType.equals(Boolean.class) || retType.equals(Boolean.TYPE))
-                  {
-                     return server.getAttribute(objectName, attrName);
-                  }
-               }
-            }
-
-            // setter
-            else if (methodName.startsWith("set") && args != null && args.length == 1)
-            {
-               String attrName = methodName.substring(3, methodName.length());
-
-               // check that the metadata exists
-               MBeanAttributeInfo info = (MBeanAttributeInfo)attributeMap.get(attrName);
-               if (info != null && method.getReturnType().equals(Void.TYPE))
-               {
-                  ClassLoader cl = Thread.currentThread().getContextClassLoader();
-
-                  Class<?> signatureClass = null;
-                  String classType = info.getType();
-
-                  if (isPrimitive(classType))
-                     signatureClass = getPrimitiveClass(classType);
-                  else
-                     signatureClass = cl.loadClass(info.getType());
-
-                  if (signatureClass.isAssignableFrom(args[0].getClass()))
-                  {
-                     server.setAttribute(objectName, new Attribute(attrName, args[0]));
-                     return null;
-                  }
-               }
-            }
-
-            String[] signature = null;
-
-            if (args != null)
-            {
-               signature = new String[args.length];
-               Class[] sign = method.getParameterTypes();
-
-               for (int i = 0; i < sign.length; ++i)
-                  signature[i] = sign[i].getName();
-            }
-
-            return server.invoke(objectName, methodName, args, signature);
-         }
-         catch (Exception ex)
-         {
-            throw (Exception)decodeJMXException(ex);
-         }
-      }
-
-      /*
-       * Attempt to decode the given Throwable. 
-       * If it is a container JMX exception, then the target is returned. 
-       * Otherwise the argument is returned.
-       */
-      private Throwable decodeJMXException(final Exception ex)
-      {
-         Throwable result = ex;
-
-         while (true)
-         {
-            if (result instanceof MBeanException)
-               result = ((MBeanException)result).getTargetException();
-            else if (result instanceof ReflectionException)
-               result = ((ReflectionException)result).getTargetException();
-            else if (result instanceof RuntimeOperationsException)
-               result = ((RuntimeOperationsException)result).getTargetException();
-            else if (result instanceof RuntimeMBeanException)
-               result = ((RuntimeMBeanException)result).getTargetException();
-            else if (result instanceof RuntimeErrorException)
-               result = ((RuntimeErrorException)result).getTargetError();
-            else if (result instanceof UndeclaredThrowableException)
-               result = ((UndeclaredThrowableException)result).getUndeclaredThrowable();
-            else
-               // can't decode
-               break;
-         }
-
-         return result;
-      }
-
-      private Object handleObjectMethods(Method method, Object[] args) throws Exception
-      {
-         if (method.getName().equals("toString"))
-         {
-            if (delegateToStringToResource)
-               return server.invoke(objectName, "toString", null, null);
-            else
-               return toString();
-         }
-
-         else if (method.getName().equals("equals"))
-         {
-            if (delegateEqualsToResource)
-            {
-               return server.invoke(objectName, "equals", new Object[] { args[0] }, new String[] { "java.lang.Object" });
-            }
-            else if (Proxy.isProxyClass(args[0].getClass()))
-            {
-               Proxy prxy = (Proxy)args[0];
-               return new Boolean(this.equals(Proxy.getInvocationHandler(prxy)));
-            }
-            else
-            {
-               return new Boolean(this.equals(args[0]));
-            }
-         }
-
-         else if (method.getName().equals("hashCode"))
-         {
-            if (delegateHashCodeToResource)
-               return server.invoke(objectName, "hashCode", null, null);
-            else
-               return new Integer(this.hashCode());
-         }
-
-         else
-            throw new Error("Unexpected method invocation!");
-      }
-
-      private boolean isPrimitive(String type)
-      {
-         if (type.equals(Integer.TYPE.getName()))
-            return true;
-         if (type.equals(Long.TYPE.getName()))
-            return true;
-         if (type.equals(Boolean.TYPE.getName()))
-            return true;
-         if (type.equals(Byte.TYPE.getName()))
-            return true;
-         if (type.equals(Character.TYPE.getName()))
-            return true;
-         if (type.equals(Short.TYPE.getName()))
-            return true;
-         if (type.equals(Float.TYPE.getName()))
-            return true;
-         if (type.equals(Double.TYPE.getName()))
-            return true;
-         if (type.equals(Void.TYPE.getName()))
-            return true;
-
-         return false;
-      }
-
-      private Class<?> getPrimitiveClass(String type)
-      {
-         if (type.equals(Integer.TYPE.getName()))
-            return Integer.TYPE;
-         if (type.equals(Long.TYPE.getName()))
-            return Long.TYPE;
-         if (type.equals(Boolean.TYPE.getName()))
-            return Boolean.TYPE;
-         if (type.equals(Byte.TYPE.getName()))
-            return Byte.TYPE;
-         if (type.equals(Character.TYPE.getName()))
-            return Character.TYPE;
-         if (type.equals(Short.TYPE.getName()))
-            return Short.TYPE;
-         if (type.equals(Float.TYPE.getName()))
-            return Float.TYPE;
-         if (type.equals(Double.TYPE.getName()))
-            return Double.TYPE;
-         if (type.equals(Void.TYPE.getName()))
-            return Void.TYPE;
-
-         return null;
-      }
-   }
 }

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/enterprise/jmx/JMXEnterpriseTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/enterprise/jmx/JMXEnterpriseTestCase.java	2010-02-16 06:28:53 UTC (rev 101011)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/enterprise/jmx/JMXEnterpriseTestCase.java	2010-02-16 06:32:28 UTC (rev 101012)
@@ -94,7 +94,7 @@
          {
             if (mbeanServer.isRegistered(objectName))
             {
-               bundleState = MBeanProxy.get(BundleStateMBean.class, objectName, mbeanServer);
+               bundleState = MBeanProxy.get(mbeanServer, objectName, BundleStateMBean.class);
                break;
             }
             Thread.sleep(200);

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jmx/JMXTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jmx/JMXTestCase.java	2010-02-16 06:28:53 UTC (rev 101011)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jmx/JMXTestCase.java	2010-02-16 06:32:28 UTC (rev 101012)
@@ -68,7 +68,7 @@
       OSGiBundle bundle = runtime.installBundle("example-jmx.jar");
       bundle.start();
 
-      FooMBean foo = (FooMBean)MBeanProxy.get(FooMBean.class, MBEAN_NAME, runtime.getMBeanServer());
+      FooMBean foo = (FooMBean)MBeanProxy.get(runtime.getMBeanServer(), MBEAN_NAME, FooMBean.class);
       assertEquals("hello", foo.echo("hello"));
    }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java	2010-02-16 06:28:53 UTC (rev 101011)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java	2010-02-16 06:32:28 UTC (rev 101012)
@@ -68,14 +68,14 @@
    @Test
    public void testBeanAccess() throws Exception
    {
-      SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, MBEAN_NAME, runtime.getMBeanServer());
+      SomeBeanMBean someBean = MBeanProxy.get(runtime.getMBeanServer(), MBEAN_NAME, SomeBeanMBean.class);
       assertEquals("hello", someBean.echo("hello"));
    }
 
    @Test
    public void testServiceAccess() throws Exception
    {
-      SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, MBEAN_NAME, runtime.getMBeanServer());
+      SomeBeanMBean someBean = MBeanProxy.get(runtime.getMBeanServer(), MBEAN_NAME, SomeBeanMBean.class);
       assertEquals("hello", someBean.callSomeService("hello"));
    }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGi108TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGi108TestCase.java	2010-02-16 06:28:53 UTC (rev 101011)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/OSGi108TestCase.java	2010-02-16 06:32:28 UTC (rev 101012)
@@ -83,7 +83,7 @@
 
       bundleA.start();
 
-      SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, SomeBeanMBean.MBEAN_NAME, runtime.getMBeanServer());
+      SomeBeanMBean someBean = MBeanProxy.get(runtime.getMBeanServer(), SomeBeanMBean.MBEAN_NAME, SomeBeanMBean.class);
       List<String> messages = report(someBean.getMessages());
       assertEquals("Start messages", 1, messages.size());
 
@@ -110,7 +110,7 @@
       bundleA.start();
       bundleB.start();
 
-      SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, SomeBeanMBean.MBEAN_NAME, runtime.getMBeanServer());
+      SomeBeanMBean someBean = MBeanProxy.get(runtime.getMBeanServer(), SomeBeanMBean.MBEAN_NAME, SomeBeanMBean.class);
       List<String> messages = report(someBean.getMessages());
       assertEquals("Start messages", 2, messages.size());
 
@@ -141,7 +141,7 @@
       bundleA.start();
       bundleB.start();
 
-      SomeBeanMBean someBean = MBeanProxy.get(SomeBeanMBean.class, SomeBeanMBean.MBEAN_NAME, runtime.getMBeanServer());
+      SomeBeanMBean someBean = MBeanProxy.get(runtime.getMBeanServer(), SomeBeanMBean.MBEAN_NAME, SomeBeanMBean.class);
       List<String> messages = report(someBean.getMessages());
       assertEquals("Start messages", 2, messages.size());
 

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGi36TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGi36TestCase.java	2010-02-16 06:28:53 UTC (rev 101011)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGi36TestCase.java	2010-02-16 06:32:28 UTC (rev 101012)
@@ -106,7 +106,7 @@
 
    private FooMBean getFooMBean() throws MBeanProxyException
    {
-      FooMBean foo = (FooMBean)MBeanProxy.get(FooMBean.class, FooMBean.OBJECT_NAME, runtime.getMBeanServer());
+      FooMBean foo = (FooMBean)MBeanProxy.get(runtime.getMBeanServer(), FooMBean.OBJECT_NAME, FooMBean.class);
       return foo;
    }
 }
\ No newline at end of file



More information about the jboss-osgi-commits mailing list