Link to home
Start Free TrialLog in
Avatar of LeanMoreTryMore
LeanMoreTryMore

asked on

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
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Yes you could do that, you could use a servlet to handle starting/stopping it plus any other interaction required.
Avatar of aozarov
aozarov

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.
Avatar of LeanMoreTryMore

ASKER

Actually our cleint's administrator did mention about JMX, but I dont know what to do for this.
ASKER CERTIFIED SOLUTION
Avatar of aozarov
aozarov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial