Hi Ah that could be it. Camel need spring-context.jar on the classpath to register JMX beans, otherwise it fall backs to non JMX mode.
It logs this at WARN level, if it can not find it on the classpath. Med venlig hilsen Claus Ibsen ...................................... Silverbullet Skovsgårdsvænget 21 8362 Hørning Tlf. +45 2962 7576 Web: www.silverbullet.dk -----Original Message----- From: Bogdan_1 [mailto:[EMAIL PROTECTED] Sent: 20. oktober 2008 18:14 To: [email protected] Subject: Re: JMX and camel this is the code that i'm running JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://MHO-WS-014:1099/camel"); JMXConnector jmxc = JMXConnectorFactory.connect(url, null); MBeanServerConnection mbsc = jmxc.getMBeanServerConnection(); i can get a list of the domains .. so i know the connection is made when i monitor jcamel with jconsole .. i see the name of a bean as : ManagedService ObjectName stdMBeanName = new ObjectName("org.apache.camel.management:type=ManagedService"); String attrValue = (String)mbsc.getAttribute(stdMBeanName, "started"); but when i try to read an attribute from it i get : javax.management.InstanceNotFoundException: org.apache.camel.management:type=ManagedService at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(Unknown Source) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(Unknown Source) at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.access$200(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl.getAttribute(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Unknown Source) at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source) at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source) at sun.rmi.server.UnicastRef.invoke(Unknown Source) at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(Unknown Source) at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(Unknown Source) at monex.MonexJMXClient.main(MonexJMXClient.java:102) i just run camel as a application, not within a container Thank you -- View this message in context: http://www.nabble.com/JMX-and-camel-tp20069027s22882p20073261.html Sent from the Camel - Users mailing list archive at Nabble.com.
