Announcement Announcement Module
Collapse
No announcement yet.
Shutting down a JMS listener Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Shutting down a JMS listener

    Hi,

    How can I shutdown a JMS listener ? I have this JMS listener:

    <bean id="BCQueueContainer" class="org.springframework.jms.listener.DefaultMes sageListenerContainer">
    <property name="connectionFactory" ref="connectionFactory" />
    <property name="destination" ref="sendQueue"/>
    <property name="messageListener" ref="messageListener" />
    </bean>

    and I'd like to shutdown this listener in runtime ? Is it possible ?


    Thanks in advance,

    Sergio Stateri Jr.
    [email protected]

  • #2
    you can call somewhere in you container application:
    Code:
    BCQueueContainer.shutdown();

    and check whether listener is stopped with:
    Code:
    while (BCQueueContainer.isRunning()){
    	       System.out.println ("The listener is trying to stop...");
    }

    Comment


    • #3
      Well! calling to

      springJmsContainer.stop() followed by springJmsContainer.shutdown() should work

      Comment


      • #4
        thanks

        ok, itś working fine now. Thanks a lot.

        Comment

        Working...
        X