GlassFish集群+ EJB查找 [英] GlassFish clustering + EJB lookup

查看:100
本文介绍了GlassFish集群+ EJB查找的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有Glassfish集群,其中有两个实例.

We have Glassfish cluster which has two instances.

在这个集群上,我的EJB应用程序已部署并运行.

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

现在,我有另一个EJB-Timer-application,我想将其部署在Glassfish服务器(域)上而不是集群上,然后我要访问集群的EJB.按照我的理解,EJB计时器无法部署在群集上,因为它可以在群集的两个实例上运行.

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 ?

谢谢

推荐答案

您实际上可以在集群上部署EJB计时器.它们将仅在一个实例上执行.在启动时,以循环方式将每个@Scheduled Bean分配给一个实例.如果实例发生故障,计时器将故障转移到下一个正常的实例.

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.

请记住遵循EJB计时器的设置过程,如下所述: http://docs.oracle.com/cd/E18930_01/html/821-2418/beahw.html .简而言之,您需要为timers数据库指定一个XA数据源,而不是使用默认的嵌入式数据库.

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.

我们正在Glassfish集群生产环境中运行多个@Scheduled豆.

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

这篇关于GlassFish集群+ EJB查找的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆