View Full Version : websphere 6.0 and spring jmx
asaf
Apr 2nd, 2006, 04:10 PM
I'm trying to access a remote websphere 6.0 JMX Server.
I'm Using the MBeanServerConnectionFactoryBean but the default serviceUrl is not working (I'm using service:jmx:rmi://localhost:2809) I'm getting back a null object.
I didnt find anyware in the Internet any example of using Client-side Connectors with spring and websphere (I have to say that I succeded to connect to the jmx server from a stand alone client with the websphere jmx api but I still want to use Spring to do it and to also use proxy object)
Does Spring-jmx Client-side Connectors support websphere ?
Anyone tried it and can send me the xml configuration?
Thnx, asaf.
Costin Leau
Apr 3rd, 2006, 05:03 AM
Can you post your configuration and turn on logging and see what is going on? Spring uses jmx so as long as ws 6.0 supports jmx 1.2 (I assume it does especially since you managed to connect with a client), your scenario should work.
there is probably some small configuration error that is causing the problem.
asaf
Apr 3rd, 2006, 11:27 AM
this is the application-context.xml:
<beans>
<bean id="clientConnector" class="org.springframework.jmx.support.MBeanServerConnect ionFactoryBean">
<property name="serviceUrl" value="service:jmx:rmi://localhost:2809"/>
</bean>
from my code i'm just calling to this bean.
the error i get:
Exception in thread "P=396219:O=0:CT" org.springframework.beans.factory.FactoryBeanNotIn itializedException: Error creating bean with name 'clientConnector': FactoryBean returned null object: probably not fully initialized (maybe due to circular bean reference)
at org.springframework.beans.factory.support.Abstract BeanFactory.getObjectForSharedInstance(AbstractBea nFactory.java:833)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:145)
at a.JmxMain.main(JmxMain.java:61)
I think that the serviceUrl is not OK.
maybe someone has a source code for a working example on websphere?
rachit.gupta
Apr 26th, 2006, 11:58 AM
Hi,
I am having my server running onconsole based application. I am trying to connect it to through Webshpere 6.0 and i am using standard mbean
JMXServiceURL url = new JMXServiceURL(
"service:jmx:rmi://localhost:9999/jndi/rmi://localhost:9999/server");
JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
But jmxc.getMBeanServerConnection() is returning a null value.
I am not finding any reason for thsi.
But if i am running on console based, It is running perfectly.
if url is "service:jmx:rmi:///jndi/rmi://localhost:9999/server",
it is unable to parse url.
i am expecting a solution friom you bcoz u have faced this problem
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.