1 Reply Latest reply on Dec 19, 2005 3:45 AM by Dimitris Andreadis

    MBeanServerConnection - cann't invoke operation

    gmeroz Newbie

      i'm trying to use the RMIAdapter for invoking mbeans operation from a java client.

      i can not invoke the operation "showAll" of SystemPropertiesService.

      i did manage to get the list of operation from this mbean.

      this is the code i use:

      Hashtable props = new Hashtable();
      props.put(InitialContext.PROVIDER_URL, "jnp://localhost:1099");
      props.put(InitialContext.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      MBeanServerConnection mBeanConnection (MBeanServerConnection)new InitialContext(props).lookup("jmx/invoker/RMIAdaptor");
      mBeanConnection.invoke(new ObjectName("jboss:name=SystemProperties,type=Service"),"showAll",new Object[0],new String[0])

      what's wrong here?