开发者

JBoss EJB2 Timers Service - multiple servers, single TIMERS table?

I can't find this in the JBoss documentation anywhere, 开发者_开发知识库so am asking here.

Can multiple, non-clustered JBoss instances access and share the same TIMERS table (as used by EJB2 Timers Service) without upsetting each other, or does each one need its own table?

In the case of a cluster, is it essential that the nodes in the cluster all have access to the TIMERS table, or do they share information directly over the network?

Thanks in advance for some clarification!

Rich


This is an old question but maybe it could still be useful for someone, so I will try to answer it.

Assuming that the same Timers table could be shared among different servers that doesn't execute in a cluster (in fact I think this is possible) several issues related to TimerService implementation will appear, e.g.: supposing that each server has deployed the same Timers, will be each Timer's instance associated with different records on this table?. If so, the business logic will be executed more than once when the Timers expire. In case that the deploy process only generates a record per Timer, does the TimerService execute properly when different TimerServices try to access/modify the same information concurrently?

On the other hand, if the motivation behind this idea is to achieve some kind of fault tolerance, still exists the problem that all your servers must have deployed the same Timers, otherwise a TimerService can try to execute a Timer that is not deployed in the server.

The solution for to offer High Availability is already implemented and is called HATimerService.

In a cluster there is only one Table, but the difference is that exists a unique TimerService active per time, when the node that execute the TimerService fails, another node become the master, therefore doesn't exist timer information exchange between nodes due to the information is available in the database

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜