java - Why is my EJB3,1 timer running on both server instances? -
java - Why is my EJB3,1 timer running on both server instances? -
we have @singleton ejb running timer timeout method created next annotation:
@schedule(hour = "*", min = "*/5", sec = "0") public void processcodes() {
for long time run on single instance of clustered server, insists on running on both instances, causing duplicate work.
we added 'persistent', so:
@schedule(hour = "*", min = "*/5", sec = "0", persistent = true) public void processcodes() {
even though that's supposed default. still runs on both servers. there server setting should check create sure cluster created?
any suggestions on seek or next appreciated. thanks! peter
by default, ejb container uses server-specific database hold persistent timers. in clustered (network deployed) environment, need configure ejb container utilize info source points mutual database. easiest way configure ejb timer service utilize custom info source, can configure ejb timer service utilize custom scheduler custom info source. there more info in configuring timer service network deployment topic in knowledge center.
java timer ejb-3.1
Comments
Post a Comment