aspose file tools*
The moose likes Web Services and the fly likes Run Servlet on deployment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Run Servlet on deployment" Watch "Run Servlet on deployment" New topic
Author

Run Servlet on deployment

Ron Patel
Greenhorn

Joined: Apr 11, 2004
Posts: 18
All,

I'm very perplexed on using servlets for my Web Service. I find that Application Servers do not call init() on my servlet until the very first time an RPC call is received.

This seems very limited to me. My Web Services require background threads to be running processing data while waiting for users to make RPC calls.

Is there any way to force the Application Server to call init on my Web Service at deployment time and not at the time the very first RPC call is received?

Thanks
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Have tried "load-on-startup" in your web.xml deployment descriptor?
Ron Patel
Greenhorn

Joined: Apr 11, 2004
Posts: 18
This works fine for the Axis servlet. I failed to mention that I am using Apache Axis as my Web Service Engine. How do I tell Apache Axis to call init on my Web Service on startup?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Run Servlet on deployment