We have a Spring + JPA web application. We use two tomcat servers that run both applications and use the same database.
One of our applications is the cron \ scheduled tasks prefix.
After a short study, we found that the Spring framework provides a very direct solution for cron jobs, (Annotation Based Solution)
However, since both tomcats run the same webapp - if we use this Spring solution, we will create a very problematic scenario in which 2 clones work simultaneously (each on a different cat)
Is there any way to solve this problem? maybe this alternative is not suitable for our purpose?
thanks!
spring tomcat cron scheduled-tasks
Urbanban
source share