Open matebate opened 7 years ago
I've created a table which contains a column with unique constraint. When singleton object is created, it tries to insert record in the timer table and to create an EJB timer. So, when exception will occur, because of the unique constraint, EJB timer isn't created.
Two (or more) timers should be created in the application. These EJB timers should be non-persistent. Because this is a clustered environment that you already created yourself, the goal is the following:
There are multiple ways of achieving this (JMS,shared DB ...).
You should use the approach with the shared DB. The nodes of the cluster have a shared DB that will act as a control point of execution.
A table should be created for the synchronization purpose.