View Full Version : JMX on Websphere 6.1
May 2nd, 2007, 04:21 PM
Doe's any one know how I get JMX working on Websphere 6.1 and connect to it with the java 5 jconsole. Have looked at WAS 6.1 docs but can not find a straight answer :confused: ? I can get my Mbeans working fine in Geronimo.
May 3rd, 2007, 10:19 AM
No idea about JConsole, however have had JMX running ...
As per the Spring documentation, you define a MBeanExporter to which you add the MBeans you wish to managed by the JMX Server. Spring will default to using WebSphere’s JMXServer.
<entry key="JmxTestBean" value-ref="testBean" />
WAS MBeans are identified by a javax.management.ObjectName when they are registered that looks like the following:
WebSphere:cell=99T73GDNode01Cell,name=JmxTestBean, node=99T73GDNode01,process=server1,type=JmxTestBea nImpl
This means that when they are de-registered they need to be looked up with that same ‘fully qualified’ name, rather than the simple ‘name’ property of JmxTestBean in the example above. This WebSphereNamingStragegy example works -> http://forum.springframework.org/showthread.php?t=19615&highlight=MBeanExporter
Does this help - your original post was very brief!
May 3rd, 2007, 02:29 PM
I have all the xml to export the mbean and when I deploy to Geronimo the mbeans are registered with an mbean server. I use JConsole which is part of jdk 5 to connect to the mbean server. The nice thing about JConsole and jave 5 is that it auto discovers mbean servers on you local machine whic works fine in geronimo. But JConsole does not seem to find the websphere mbean server, I think this is because WAS exposes the mbean server through a different mechanism such as RMI or SOAP? I was wondering how do I configure websphere mbean server and is it possible to connect to it through JConsole. Maybe this is a question for the IBM forums, does anyone know the best URL to post questions about websphere?
May 4th, 2007, 03:00 AM
I'm running jconsole on WAS 220.127.116.11 using Spring. Actually the service url that you see below actually is the only one that I discovered to work:
<bean id="str.serverConnector" class="org.springframework.jmx.support.ConnectorServerFac toryBean" depends-on="str.rmiRegistry">
<property name="serviceUrl" value="service:jmx:rmi:///jndi/rmi://:your_port/your_jmxconnserver_name" />
<bean id="str.rmiRegistry" class="org.springframework.remoting.rmi.RmiRegistryFactor yBean">
<property name="port" value="your_port" />
Remember that doing in this way a new thread(JMXConnectorServer) is created by Spring and it is not controlled by the app server and this I believe is not a best practice. Would be far better if you can connect to the jmx connection server of the DeploymentManager but actually I read a lot of WAS documentation without much result:confused: , I also managed to make some tentatives( see my previous post http://forum.springframework.org/showthread.php?t=35862)
also without an effective result.
Connecting to 'DeploymentManager' is better also because is this component that works as the 'master agent' in the mbean federation infrastructure but remember that SOAP is not supported by the JConsole and AFAIK the preferred ibm's protocol is SOAP. I think you have to try changing the preferred JMXConnector using WAS's admin console and see if some service url works.
I think also that you have to search other related posts on this forum, it will be useful.
Hope that this helps....
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.