JMX meets the DefaultMessageListenerContainer

(It’s kind of like King Kong vs. Godzilla, only more peaceful)

According to the Javadoc, these properties on the DefaultMessageListenerContainer “can be modified at runtime, for example through JMX” :


Armed with this and my handy Spring manual, I added the following to my beans file:

    <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
<property name="beans">
                <entry key="bean:name=listenerContainer1" value-ref="listenerContainer" />

(In this beans file I already had a DefaultMessageListenerContainer bean with an id of listenerContainer.)

Now when I fired up my JBoss JMX Management, a new bean category appears:

I can click on that link and see several properties that I can change on the DefaultMessageListenerContainer bean, including ConcurrentConsumers, which is currently 1.  If I change that to 2 and press the Apply Changes button though, I get a stack trace in JBoss:

12:47:17,978 ERROR [[HtmlAdaptor]] Servlet.service() for servlet HtmlAdaptor threw exception java.lang.ClassNotFoundException:

So we’ll have to figure out what that’s about.


, ,

  1. #1 by Tristan on September 30, 2009 - 10:21 am

    I’ve run into this same issue, did you ever find a resolution?

  2. #2 by danielmeyer on September 30, 2009 - 10:31 am

    Tristan, I think this is as far as I got – my responsibilities went in a different direction and I never came back to this issue to find a resolution.

  3. #3 by Tristan on September 30, 2009 - 10:33 am

    Fair enough… If I find it I will write back. Thanks

  4. #4 by Tristan on October 2, 2009 - 5:50 pm

    For the record this is due to JBoss isolation. I documented my findings here :

    but you could also look into working with the JBoss classLoader.

    Thanks again

  5. #5 by danielmeyer on October 3, 2009 - 5:38 am

    Nice write-up. Thanks for the link!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s