Hi Everyone,
I'm thinking about developing a Java Web Service using RESTEasy. I am going to follow this example: http://technicalmumbojumbo.wordpress.com/2009/10/13/restful-webservices-using-jboss-resteasy-tutorial/
Now, that's very well and good for getting the server to reply back with a simple response, however how do I get some "backend" things going on? For example, I want a queuing system running in the background constantly on the server, processing objects in the queue. When someone accesses a certain URL (The web service), i want the web service to Enqueue something..
The only thing I can think of in my head at the minute, which is probably totally wrong, is to make a seperate Java (J2SE) application, which runs the Queue, and connect the Web Service to it via RMI or Cajo or something..
I guess what I'm asking is that does a Java Web App running on Tomcat have any concept of a "main() method" which gets executed on server startup?
Any help is appreciated
Thanks