I am working on a web application with struts 1.1 as framework and oracle as backend. In the application I have a requirement that I need to keep a particular piece of code executing all the time. In fact this code traverses all the records(orders) in the database. It cheks whether there are any new orders and then proceeds to fulfill them. I have created class file and put it in scheduler for execution through the Javac command through a batch file.
Now I want to deploy it on web server. A web hosting space has been purchased for it. Its's a shared hosting. So now I have to detect whether the code is running or not. Previously I used to do this by using JPS command. If there were no processes in the RunTime then it was invokesd again. So even after exception occurs the code again can be executed by invoking the scheduler.
Please help me in how can verify that a particular piece of code is being executed or not in a shared hosting environment.
Thanks in advance