Announcement Announcement Module
Collapse
No announcement yet.
amqp thread prevents app from shutting down Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • amqp thread prevents app from shutting down

    Amqp functionality is working perfectly in my application except when I wish to shut it down. I configure amqp entirely in xml and do not see how to stop the thread that it is working on. I know its the amqp thread because of the name:

    Thread[AMQP Connection 127.0.1.1:5672](Running)

    If while in debug I right click and terminate the thread the application shuts down, other wise I must manually stop in eclipse.

    I do no see anything in the docs or forum about shutting this down.

    What am I missing?

    Thanks,
    Bobby

  • #2
    How are you loading the context? If you are doing so programmatically as a stand alone app for example:
    Code:
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "spring-conf.xml" );
    Make sure you register a shutdown hook so when the JVM goes down it allows Spring to destroy its beans.
    Code:
    context.registerShutdownHook();
    Alternatively, you can also close it manually when you are done with it:
    Code:
    context.close();
    I hope it helps.


    nicolas.loriente

    Comment

    Working...
    X