2 Replies Latest reply on Jan 13, 2012 10:10 AM by Rob Cernich

    Server Shutdown Problem with HornetQ

    Rob Cernich Master

      Hey all,


      Over in SwitchYard land we have a problem where the server hangs for 2-3 minutes during shutdown when a SwitchYard application references a queue.  If the SwitchYard application is undeployed before shutting down the server, all is well.


      The problem appears to be caused by the messaging system shutting down before the application, which is still holding on to the queues.  (The "HornetQ cannot delete ... it has consumers" exception is thrown during shutdown.)  I've tried various things to inject a service dependency on the SwitchYard application service, but nothing seems to work (e.g. adding a dependency on the JNDI binding for the queues, the messaging system itself, adding a application-client.xml to the SwitchYard application, etc.).


      At this point, I'm at a total loss as to how to proceed.  Is there any way to ensure the messaging system is stopped after the deployment has stopped?


      Any help greatly appreciated.


      Thanks in advance,