I have a bean class that implements the MessageExchangeListener interface. I need a method called when the service assembly contains that bean is stopped or undeployed. Based on the bean documentation I assumed the annotation PreDestroy handled that.
Excerpt from: http://servicemix.apache.org/servicemix-bean.html PreDestroy <http://java.sun.com/javase/6/docs/api/javax/annotation/PreDestroy.html> Method The PreDestroy annotation is used on methods as a callback notification to signal that the instance is in the process of being removed by the container. However, I find that the method I annotate with @PreDestroy is called after the first exchange to my bean class is "DONE". Are my assumptions wrong? Is there way to know when a bean inside a service assembly is being undeployed, stopped, or shutdown in servicemix? Thanks, Seth
