Http://www.cnblogs.com/kay/archive/2007/11/02/947372.html
Issues that a message or task sends or executes more than once:
1.<property name= "Concurrent" value= "false"/> can be used to prevent tasks from executing multiple times
2. Separate the quartz configuration to prevent Tomcat from loading spring.
Specific practices: http://blog.csdn.net/zhujianpengzha/article/details/8140442
When using Spring's quartz timer recently, it was found that the task was always repeated two times after the time, under Tomcat or JBoss.
Print out their hashcode, found to be different, that is, when the Web container is started, the two quartz threads are restarted repeatedly.
Research down finds that quartz does load two times:
First: When the Web container starts, it is loaded once when the Applicationcontext.xml file is read.
Second time: Spring itself will load applicationcontext.xml once.
And my quartz configuration is written in the Applicationcontext.xml file.
The solution is simple.
First extract the quartz configuration information and save it as a single file, such as Applicationcontext-quartz.xml
You can then modify Web. xml so that when it starts, the file is loaded
This quartz will only load once when the Web container is started, and spring will no longer load. The Web. XML is configured as follows: <context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/web-inf/classes/applicationcontext.xml,/web-inf/classes/applicationcontext-timertask.xml </param-value>
</context-param>
<!--turn on listening--
<listener>
<listener-class>
Org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener> the configuration of the timer is written in a separate configuration file, which is only loaded once when the Web container is started. This problem will also appear under Spring's timertask timer, the solution is the same, I hope you can help the heroes
Quartz configuration in spring (can be used to implement mail timing, task execution, site timing updates, etc.)