Yeah, this is certainly the problem.
To avoid this problem, the default configuration for ServiceMix
(from the binary distribution) creates the MBeanServer explicitely
using a spring factory and forces ActiveMQ and ServiceMix to use
it.   You should try that way.

On 6/26/07, jmuller <[EMAIL PROTECTED]> wrote:

I've the same problem in test run: getMBeanServer() returns null and I can't
register my bean. my src/test/resources/spring.xml does include

        useMBeanServer="true" createMBeanServer="true"

Maybe it's because another MBeanServer is deployed (AMQ ?) ? If i try to
open a JMX connection in my test class, it does found the server :

            JMXConnector connector = JMXConnectorFactory.connect(new
JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi"));
            MBeanServerConnection server =
connector.getMBeanServerConnection();


Easy to test:
1. run servicemix-service-engine maven archetype to create an empty SE.
2. edit the Endpoint java class and add this line in activate method.
        System.out.println("MBeanServer=" + ctx.getMBeanServer());


gnodet wrote:
>
> If the ComponentContext.getMBeanServer returns null, this means that JMX
> has
> been disabled someway in ServiceMix.
> This can happen if one of useMBeanServer or createMBeanServer attribute on
> the <sm:container/> tag is set to false.
>
> Cheers,
> Guillaume Nodet
>
>

--
View this message in context: 
http://www.nabble.com/JMX-configuration-tf1650672s12049.html#a11306644
Sent from the ServiceMix - User mailing list archive at Nabble.com.




--
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/

Reply via email to