GlassFish clustering + EJB lookup

六月ゝ 毕业季﹏ 提交于 2020-01-03 05:25:17

问题


We have Glassfish cluster which has two instances.

On this cluster one my EJB application is deployed and running.

Now I have another EJB-Timer-application which I want to deploy on Glassfish server(domain) not on cluster then I want to access the cluster's EJB. AS per my understanding EJB timer could not deployed on a cluster because it could be run on both the instances of cluster.

What are the possible ways to access it ?

Thanks


回答1:


You can actually deploy EJB timers on a cluster. They will only execute on one instance. At startup, each @Scheduled bean is assigned in a round-robin manner to an instance. If an instance fails, the timers will fail-over to the next healthy instance.

Remember to follow the setup procedure for EJB timers as described here: http://docs.oracle.com/cd/E18930_01/html/821-2418/beahw.html. In short, you need to specify an XA datasource for the timers database instead of using the default embedded one.

We are running several @Scheduled beans in a Glassfish clustered production environment.



来源:https://stackoverflow.com/questions/14472689/glassfish-clustering-ejb-lookup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!