Quartz job runs twice when deployed on tomcat 6/Ubuntu 10.04LTS

后端 未结 3 497
孤独总比滥情好
孤独总比滥情好 2020-12-16 05:58

I run a Spring Framework/SmartGWT based web-app, with now an added Quartz job. The job is supposed to run every day at 2am, and picks winners from a DB table. From my logs I

3条回答
  •  心在旅途
    2020-12-16 06:28

    I fixed it, not only quartz was running twice, but my app was deployed twice. This was because of the following in the Tomcat docs:

    When using automatic deployment, the docBase defined by an XML Context file should be outside of the appBase directory. If this is not the case, difficulties may be experienced deploying the web application or the application may be deployed twice. The deployIgnore attribute can be used to avoid this situation.

    Finally, note that if you are defining contexts explicitly in server.xml, you should probably turn off automatic application deployment or specify deployIgnore carefully. Otherwise, the web applications will each be deployed twice, and that may cause problems for the applications.

    I followed a tutorial on how to get mod_jk working, and this tutorial contained that flaw.

提交回复
热议问题