Run a Scheduler instance in a clustered environment

Asked

Viewed 67 times

1

I have a project EJB that records a record in the database every 5 minutes. For this I am using the annotation @Schedule.

For the cluster to work, I need to upload the application to the two nodes of the JBoss (nodeA and nodeB), the Scheduler ends up running on the two nodes, causing duplicity in the bank record.

I’ve done a lot of research and I haven’t found a solution yet.

I made a very simple project using the Quartz, but I gave up because I can’t use @PersistenceContext to obtain the entityManager and also ended up giving up for the time being Quartz, because I have several applications ready using the @Schedule of EJB, then I will need to migrate all applications to the Quartz. If only the Quartz resolve, then I will have no choice.

After all, is there any way to use the @Scheduler in the clustered environment running only one of schedulers of cluster?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.