1 Reply Latest reply on Jan 9, 2006 6:55 PM by gogineni

    Remote Client for MBean with Security enabled.

    gogineni Newbie

      Hi Im trying to invoke operations on an MBean from a remote client. I got it working successfully if no authentication is enabled on my jmx-console with this code:

      Hashtable props = new Hashtable();
      props.put(InitialContext.PROVIDER_URL,"jnp://:1099");
      props.put(InitialContext.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
      ctx = new InitialContext(props);

      MBeanServerConnection server =(MBeanServerConnection) ctx.lookup("jmx/invoker/RMIAdaptor");
      Object obj = server.invoke(new ObjectName("jboss.ws4ee:service=AxisService"),"listServiceEndpoints",new Object[0],new String[0]);

      However if authentication is enabled I cant figure out a way to pass credential information. There seem to be no methods on the MBeanServerConnection where I can set the credential information.

      This is with JBoss 4. Can anyone point me to where I can find this information?

      Thanks
      Pratima