cunparis
Mar 22nd, 2006, 11:07 AM
I've read the reference documentation, most of the posts here, and I still cannot get this to work. First question, if I use:
<bean id="serverConnector"
class="org.springframework.jmx.support.ConnectorServerFac toryBean">
<property name="objectName" value="connector:name=rmi" />
<property name="serviceUrl"
value="service:jmx:rmi://localhost/jndi/rmi://localhost:1099/myconnector" />
<property name="threaded" value="true" />
<property name="daemon" value="true" />
<property name="server">
<ref local="mbeanServer" />
</property>
</bean>
<bean id="registry"
class="org.springframework.remoting.rmi.RmiRegistryFactor yBean">
<property name="port" value="1099" />
</bean>
Will that only work for JDK 1.5? I get a class not found exception on javax/management/remote/JMXServiceURL which I understand is new for JDK 1.5.
Ok, so back to the reference documentation, here is my spring conf:
<beans default-lazy-init="false">
<bean id="testDispatcherSinglethreaded"
class="canal.det.service.workflow.common.TestDispatcherSi nglethreaded"
lazy-init="false" init-method="demarrer">
<constructor-arg>
<value>testDispatcherSinglethreaded</value>
</constructor-arg>
<constructor-arg>
<value>5</value>
</constructor-arg>
</bean>
<bean id="mbeanServer"
class="org.springframework.jmx.support.MBeanServerFactory Bean">
</bean>
<bean id="exporter"
class="org.springframework.jmx.export.MBeanExporter">
<property name="autodetect" value="true" />
<property name="beans">
<map>
<entry key="bean:name=testDispatcherSinglethreaded1"
value-ref="testDispatcherSinglethreaded" />
</map>
</property>
<property name="server" ref="mbeanServer" />
</bean>
</beans>
The application runs fine, but I cannot connect to it with MC4J. I see that MC4J says the MX4J connector is only for 1.x and for 2.x I should use the JSR 160 connector. But that is what I tried to do in the first code example and that gives me the class not found exception!
Could someone please tell me what I should put in my spring conf and how I connect with MC4J?
Thanks,
Michael
<bean id="serverConnector"
class="org.springframework.jmx.support.ConnectorServerFac toryBean">
<property name="objectName" value="connector:name=rmi" />
<property name="serviceUrl"
value="service:jmx:rmi://localhost/jndi/rmi://localhost:1099/myconnector" />
<property name="threaded" value="true" />
<property name="daemon" value="true" />
<property name="server">
<ref local="mbeanServer" />
</property>
</bean>
<bean id="registry"
class="org.springframework.remoting.rmi.RmiRegistryFactor yBean">
<property name="port" value="1099" />
</bean>
Will that only work for JDK 1.5? I get a class not found exception on javax/management/remote/JMXServiceURL which I understand is new for JDK 1.5.
Ok, so back to the reference documentation, here is my spring conf:
<beans default-lazy-init="false">
<bean id="testDispatcherSinglethreaded"
class="canal.det.service.workflow.common.TestDispatcherSi nglethreaded"
lazy-init="false" init-method="demarrer">
<constructor-arg>
<value>testDispatcherSinglethreaded</value>
</constructor-arg>
<constructor-arg>
<value>5</value>
</constructor-arg>
</bean>
<bean id="mbeanServer"
class="org.springframework.jmx.support.MBeanServerFactory Bean">
</bean>
<bean id="exporter"
class="org.springframework.jmx.export.MBeanExporter">
<property name="autodetect" value="true" />
<property name="beans">
<map>
<entry key="bean:name=testDispatcherSinglethreaded1"
value-ref="testDispatcherSinglethreaded" />
</map>
</property>
<property name="server" ref="mbeanServer" />
</bean>
</beans>
The application runs fine, but I cannot connect to it with MC4J. I see that MC4J says the MX4J connector is only for 1.x and for 2.x I should use the JSR 160 connector. But that is what I tried to do in the first code example and that gives me the class not found exception!
Could someone please tell me what I should put in my spring conf and how I connect with MC4J?
Thanks,
Michael