we have several switchyard jar deployed in a JBoss EAP 6.4. Everything works fine but we want to create an event listener to execute some code after the deploy of the application and some other code after the undeploy, but sincerely i don't know where to start. This is our basic switchyard.xml
<?xml version="1.0" encoding="UTF-8"?> <sy:switchyard xmlns:bean="urn:switchyard-component-bean:config:2.0" xmlns:resteasy="urn:switchyard-component-resteasy:config:2.0" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:sy="urn:switchyard-config:switchyard:2.0" name="esb-empty" targetNamespace="urn:it.empty.esb:esb-empty:1.0"> <sca:composite name="esb-empty" targetNamespace="urn:it.empty.esb:esb-empty:1.0"> <sca:component name="Component"> <bean:implementation.bean class="it.empty.esb.service.EmptyServiceBean"/> <sca:service name="EmptyService"> <sca:interface.java interface="it.empty.esb.service.EmptyService"/> </sca:service> </sca:component> <sca:service name="EmptyService" promote="Component/EmptyService"> <sca:interface.java interface="it.empty.esb.service.EmptyService"/> <resteasy:binding.rest name="REST"> <resteasy:contextMapper class="it.empty.esb.util.RestContextMapper"/> <resteasy:interfaces>it.empty.esb.service.EmptyResource</resteasy:interfaces> <resteasy:contextPath>esb-empty</resteasy:contextPath> </resteasy:binding.rest> </sca:service> </sca:composite> <sy:domain> <sy:properties> <sy:property name="org.switchyard.handlers.messageTrace.enabled" value="false"/> </sy:properties> </sy:domain> </sy:switchyard>
What i want to do is instantiate automatically an org.springframework.context.annotation.AnnotationConfigApplicationContext instead of instatiate manually during the first rest call. Every esb on the server manage a different AnnotationConfigApplicationContext, so i think the event listener has to be inside every esb.
Is it possible? Can you provide me some hints? Is there any other informations needed?