| Reetesh 2007-02-21, 7:27 am |
| Thanks forthe reply ken,
I don't know if i am missing something over here.
I have used following code for getting the MBeanServerConnection:
String jndiPath="/jndi/JMXConnector";
JMXServiceURL url = new JMXServiceURL("service:jmx:iiop://"+"localhost"+":"+"9809"+jndiPath);
Hashtable h = new Hashtable();
//Specify the user ID and password for the server if security is enabled on server.
String[] credentials = new String[] {"reetesh" ,"reetesh"};
h.put("jmx.remote.credentials", credentials);
h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, "com.ibm.websphere.management.remote");
JMXConnector jmxc = JMXConnectorFactory.connect(url, h);
MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
The username and password are correct and have Administrator role assigned to it.
Please let me know, in case i have missed out something.
Thanks in advance.
|