Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Running a Socket server process in Tomcat  RSS feed

 
Chandru Ganesan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a Socket server process and a SOAP service process using Apache-Axis. They are 2 different threads sharing a hashtable. The socket server updates the hashtable and the SOAP service reads from the hashtable. Both process should be run under Tomcat web container.

My questions is, how do I start the socket server background process under Tomcat? The socket server is a plain Java class (NOT a Servlet).

Thanks for yore ideas.

Chandru
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could start the thread with a javax.servlet.ServletContextListener (which gets called when the web application is deployed and when it's shut down).
 
Chandru Ganesan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lasse

Thanks for your input

Chandru
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!