I created a simple application with a main class that start a camel route. I can run it from my IDE.
This might sound like a stupid question, but how can I make the main class be executed when i deploy the application in Jboss?
I created a simple application with a main class that start a camel route. I can run it from my IDE.
This might sound like a stupid question, but how can I make the main class be executed when i deploy the application in Jboss?
Assuming you deploying a web application to JBoss. If you are using plain servlets then in the init method of servlet call the main class method which you want to execute. Configure the servlet to load on startup in your web.xml.
If using spring framework then there are many ways lie init-method, InitialzingBean, @PostConstruct.