I am writing a Java program which will keep on listening to JMS/ActiveMQ queue for any messages. When there is a message posted on the queue, this program will pick up the message and process it. This program has a main()
method. Now I want to deploy this program in JBoss/Wildfly. Already there are some web application deployed on JBoss. I want to deploy this program also on JBoss to avoid manual start ups. Whenever the JBoss server starts, this program also should run and listen to queue.
If main method cannot be used I need some advice on alternative solution to this requirement.