Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Run Servlet on deployment

 
Ron Patel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have tried "load-on-startup" in your web.xml deployment descriptor?
 
Ron Patel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic