I have a requirement where I have to automate a process by Java. Steps in that process are:
1. Compilation of database script,
2. Generating an xml file,
3. Deploying that xml file on a remote IBM WAS server - This include copying xml file on remote server and then stopping and starting server.
I have created process-definition.xml file (for managing the above workflow) as below
process-definition.xml and a CronServlet is in cronWeb application deployed on an IBM server.
I'm parsing process-definition.xml in CronServlet and executing task as given in process xml file. Servlet is loaded on startup and using java TimerTask, I have set its execution interval.
Could anyone please suggest is it possible/ok to do the XML deployment task by java code. What could be the best way to execute task 3 (deployment task): by java, batch/shell script or by any other means?
P.S. Application server where my cronweb app is deployed and remote server (where I 'm pushing the xml content) are in same network.