简体   繁体   中英

jdk 1.7 + tomcat 7 + running a batch process

I ported a Java web application which used JDK 1.5 and ran under Tomcat 5.5 to now use JDK 1.7 and running under Tomcat 7. I am tasked with developing a Java batch program that will be scheduled. Many of the classes used by the batch process are also used by the web app as well.

Ten years ago I wrote a batch process to use concurrent scheduler. What are some ways today to implement a scheduled batch process using the environment I mentioned above?

Edit: It has been suggested that I use quartz or ScheduledExecutorService. After taking a look at both of those solutions, I think they may provide more than what I need. At the moment, there exists a batch process that is basically a Java program scheduled to run as a Windows NT Server scheduled task and this approach works well enough for the existing batch process. The new batch process that I will develop can follow this approach as well but next I have a deployment question. The .class files and the .properties and the .jar files used by the batch process are in a separate folder from the web application in webapps. What I need is an automated deployment strategy for the batch processes only. I will mark my original question as answered and ask a new question about the deployment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM