ContextLoaderListener - is an implementation to load the spring context via the web.xml. But it may not be the responsibility of the web container to call the close() or destroy() method on the ApplicationContext that was created by the web container. I dont think it's happening.
I think you're worong, have a look at ContextLoaderLister (destroy method)
Code:
public void contextDestroyed(ServletContextEvent event) {
if (this.contextLoader != null) {
this.contextLoader.closeWebApplicationContext(event.getServletContext());
}
}
closeWebbapplicationContext calls close on the applicationcontexts. So normally with the ContextLoaderListener you should be fine with the MEssageListenerContainer.
@alvins
Do you use any (custom ) receiveTimeout in your MessageListenerContainer
regards
agim