I currently have a jar file containing a RabbitMQ consumer and publisher, a Drools drl file and the code that sends the consumed messages through KIE and then publishes the results. We have been using this jar in a service with no issues. The jar file contains all of it's dependencies via a maven install phase.
So, I have been asked to deploy this jar to a JBoss EAP server we have running. I was told "just convert it to a war and copy it to the deployment directory, good to go"! Without investigating JBoss any further I did as I was asked. JBoss loads the war but the RabbitMQ consumer is not initiated. I went through the JBoss examples but did not find one similar to my project.
Which JBoss example is most similar to what I have outlined above?
Or what is the minimum config or code I need to instruct JBoss to call a specific class.method after loading the war?
Solution Chosen: We decided to use the EJB annotations as described in the link Using special auto start servlet to initialize on startup and share application data