Reputation: 21
I need an EJB timer task to run on every cluster member, instead of only one one of them.
Using WAS8 the timer service is configured to use an DB to store the data of persistent timers. It seems that all the persistent timers do run on only one cluster member. Is it true that the not-persistent timers will run on all the cluster members?
Upvotes: 0
Views: 3161
Reputation: 2981
yes - they share the same db. It seems that all the persistent timers do run on only one cluster member.
According to documentation:
Shared or common timer service database for the cluster. Timers can be created and accessed on any server process or cluster member. ... However, all timers are executed on a single server in the cluster, that is, the timeout method of the bean is run for all timers on a single server. Which server executes the timers varies depending on which server process obtains a lock on the common database tables.
Is it true that the not-persistent timers will run on all the cluster members?
Non-persistence timers don't use the timer db, therefore, they will run independently in each cluster node. Note that every time the server is shutdown the non-persistence timers have to be created once the server start again.
Cluster issues are platform dependent, so a websphere tag could be added to your question.
Upvotes: 1