Can my java program run on Apache Tomcat?

I have developed a java program used as a job scheduler on the CLient-Server. We have recently been asked whether the scheduler running on the web server, Apache Tomcat, instead of Client-Server (Window 2003).
I can't answer them as I have very limited knowledge about Web stuff.

Please give me some idea if we can run the java program on web server. Thanks
Who is Participating?
aozarovConnect With a Mentor Commented:
JMX is a powerfull and in fact the most popular way currently to manage/monitor/configure java services.
It is part of JDK 5.0 (or can be used as a seperate package for earlier JVM  versions)
It is part of J2EE as way to manage/configure/monitor your application server (JSR 177)
It provides connectors that can expose your instrumentation layer (your managed services) via RMI/HTTP/SNMP and others.
It provides framework services that can be used by other MBeans (e.g. MLets, Timer, ...)
Tomcat itself can be configured via JMX.
For more see the link above.
Yes you could do that, you could use a servlet to handle starting/stopping it plus any other interaction required.
I guess that the need is to be able to interact and configure jobs via a web client, right?

You can setup your scheduler service inside tomcat so that the servlets will be able to accees it.
That can be done in many ways like:
1. create and store it in a static variable
2. create and store it in your servlet application context
3. use JMX and save it as an MBean

Also, not sure how what kind of a Client-server architecure you have but if your server is
a remote service then you might be able to expose its interfaces to the servlets via JNDI or similar technique
and that may prevent any changes to your server side.
LeanMoreTryMoreAuthor Commented:
Actually our cleint's administrator did mention about JMX, but I dont know what to do for this.
you can read up on jmx here:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.