How to "finalize" my Switchyard Service
Have a need to perform 'cleanup' tasks in my org.switchyard.component.bean.Service when a shutdown, via undeploy or management shutdown, is performed. So far no variation of using a finalize method will work. Is there anyway to access and register a 'listener' from my service the org.apache.camel.impl.DefaultShutdownStrategy? Maybe this is someone is need to access via a ModelControllerClient?? Any suggestions very appreciated!
Responses
Hi John
I'd suggest you raise a support case for this so our engineers can understand a little more about your business case and try and provide you with the best suggestion for your use case. However, from what you've written it sounds like you need to implement an @Asynchronous EJB. See [1] for the definition and [2] for an quickstart example.
[1] https://docs.oracle.com/javaee/6/tutorial/doc/gkkqg.html
[2] http://www.jboss.org/quickstarts/eap/ejb-asynchronous/
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
