This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Running a Socket server process in Tomcat

 
Chandru Ganesan
Ranch Hand
Posts: 37
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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