Jan 16th, 2012, 05:03 AM
Run @Scheduled task only on one WebLogic cluster node?
We are running a Spring 3.0.x web application (.war) with a nightly @Scheduled job in a clustered WebLogic 10.3.4 environment. However, as the application is deployed to each node (using the deployment wizard in the AdminServer's web console), the job is started on each node every night thus running multiple times concurrently.
How can we prevent this from happening?
I know that libraries like Quartz allow coordinating jobs inside clustered environment by means of a database lock table or I could even implement something like this myself. But since this seems to be a fairly common scenario I wonder if Spring does not already come with an option how to easily circumvent this problem without having to add new libraries to my project or putting in manual workarounds.
Please let me know if there are any open questions. Thanks a lot for your help.
May 13th, 2013, 02:49 AM
Did you find a solution to this one?
May 15th, 2013, 12:46 PM
I also posted this question on StackOverflow, but did not get a direct answer with a solution, so we started building the synchronization by using a shared DB table ourselves. Here's the thread, in case you are interested:
I hope this helps.
Tags for this Thread