Announcement Announcement Module
Collapse
No announcement yet.
Context not shutting down when awaiting for a message on a JMS destination Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Context not shutting down when awaiting for a message on a JMS destination

    Hi,

    I'm facing an issue regarding the lifecycle of my flows (configured with Spring Integration).
    Having several flows running on the same application server in different application contexts, I would like to be able to call stop() and close() on only one application context without having to shut down my entire application server.

    However, with flows reading from a JMS Queue (message-driven), I have issues when stopping and closing the application contexts. And I have different behaviours depending on the JMS implementation / the way I build the Queue.

    Below is the configuration of my flow :

    Code:
    <bean id="myListener" parent="abstractListener">
    	<property name="destinationName" value="myQueueName" />
    </bean>
    
    <int-jms:message-driven-channel-adapter container="myListener" channel="inputChannel" />
    
    <int:channel id="inputChannel" />
    
    <int-stream:stdout-channel-adapter channel="inputChannel" />
    And here is the behaviour I noticed :
    • On Websphere MQ -- Building Queue with "new com.ibm.mq.jms.MQQueue()"

      1) Calling "applicationContext.stop()" never returns.

      2) Calling "applicationContext.close()" never returns.

    • On Joram -- Getting Queue from a JNDI lookup

      3) Calling "applicationContext.stop()" returns, but consumes the next message coming on the Queue without committing it. Thus, this message cannot be seen on the Queue, but will not be lost in case the application is killed.

      4) Calling "applicationContext.close()" never returns.

    Any idea why this is happening, if this is normal, and how to solve/workaround it? (A poller is not an option, I really would like it to be message-driven :-)).

    Thank you in advance for your help.

    Pierre
Working...
X