jon
jon

Reputation: 253

best way to shutdown AbstractJmsListeningContainer?

I read http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/jms/listener/AbstractJmsListeningContainer.html but i still do not understand the differences between destroy() and shutdown() and i do not understand what stop() does. I tested stop() and the container was still running. Can someone explain?

Upvotes: 2

Views: 617

Answers (2)

VinodK
VinodK

Reputation: 26

A shutdown is a blocking call. I believe stop is better choice

Upvotes: 0

willome
willome

Reputation: 3132

According to the sources https://src.springframework.org/svn/spring-maintenance/trunk/src/org/springframework/jms/listener/AbstractJmsListeningContainer.java

  • destroy() and shutdown() do the same thing (destroy() is calling shutdown()) : Stops the shared connection if necessary AND Shut down the invokers.
  • stop() : is only stopping the shared connections.

So the best way is to call shutdown (or destroy)

Upvotes: 3

Related Questions