EJB计时器在Websphere Application Server的集群环境中重新分解时 [英] EJB Timer when redepolyed in a cluster environement of Websphere Application Server

查看:217
本文介绍了EJB计时器在Websphere Application Server的集群环境中重新分解时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由多个EJB组成的.ear文件,其中一个使用定时服务创建定时器,同样的ejb也有回调方法。该耳朵应该部署在3台服务器的集群环境中。现在的问题是,如果我在群集中重新部署/取消部署耳朵,我想知道预期的行为是什么。服务器将取消所有定时器并清除持久性调度程序吗?还是保护他们?有什么工作?



我已经在IBM网页链接中看过:



目前我没有能力创造一个环境来测试这种情况并做出自信的决定,我想知道有没有人面临这样的问题,因为这对我来说是一个非常关键的问题。



谢谢

解决方案

删除应用程序时,EJB计时器不会被删除。一些选项:


  1. 使用 WAS_HOME / bin / cancelEJBTimers 命令删除它们

  2. 将启动逻辑添加到应用程序中以根据需要取消/重新创建计时器。

  3. 使用自动计时器( @Schedule )。在这种情况下,服务器会在应用程序第一次启动时自动创建定时器,并在应用程序卸载时尝试将其删除。有关详细信息,请参阅信息中心:


I have an .ear file which is composed of multiple EJB's and one of them do use a timer service to create timer and the same ejb has the callback method too. That ear is supposed to be deployed in a clustered environment of 3 servers. The issue now is that i want to know what is the expected behavior if i redeployed/undeployed the ear in the cluster. Will the server cancel all timers and clear the persistent scheduler? Or it will preserve them? What are the work arounds?

I have read that in IBM web link: http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.base.doc%2Finfo%2Faes%2Fae%2Frejb_timerservice.html

Currently i don't have the capability to create an environment to test such case and take a confident decision, i wonder if anyone faced such issue before, as this is a very critical issue for me

Thanks

解决方案

EJB timers are not removed when the application is removed. Some options:

  1. Use the WAS_HOME/bin/cancelEJBTimers command to remove them
  2. Add startup logic to your application to cancel/recreate timers as needed.
  3. Use automatic timers (@Schedule) in 8.0+. In this case, the server automatically creates the timer when the application is first started, and it will attempt to remove them when the application is uninstalled. See the InfoCenter for more information:

这篇关于EJB计时器在Websphere Application Server的集群环境中重新分解时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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