java-ee-6 - 如何取消或删除 Persistent EJBTimers

标签 java-ee-6 ejb-3.1 websphere-8

当我们使用带有@schedule 和persistent=true 的持久EJBTimer 时,将其部署到集群,然后我们更改@Schedule 中的实际调度并重新部署到集群,原始调度是否被新调度替换(删除并添加了新参数),或者两个计划都保持事件状态(记住设置了persistent=true)

这是我目前阅读的内容 - Each scheduler instance has a unique jndi name and @schedule automatically creates a timer through application deployment so it would be better to remove the automatic created EJBTimer or cancel the original schedule to avoid trouble.但我不知道如何以编程方式取消原始计划,或者如果原始计划和更改后的计划都保持事件状态,是否需要由 websphere 管理员完成

同样来自 this document ,removeAutomaticEJBTimers 命令用于从指定的调度程序中删除计时器,但这似乎也属于 websphere 管理员的领域,而不是开发人员的领域。

开发人员如何以编程方式取消使用 @Schedule 注释创建的自动 EJBTimer?

我将 Java EE 6 与 Websphere 8.5 和 EJB 3.1 一起使用。

最佳答案

执行以下操作以删除持久的 EJB 计时器:

删除目录 jboss-home\standalone\data\timer-service-data{yourporjectname}.{serivename}

关于java-ee-6 - 如何取消或删除 Persistent EJBTimers,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28461187/

相关文章:

eclipse - 在 Tomcat 7.X.X 中使用 EJB 3.1 @Startup 注释

java - EJB 中的 getGenerateKeys

java - 无法让 @RunAs 在 EJB 中工作

websphere - 在 WebSphere 8.5.5 中部署应用程序时出错

java - Websphere 8.5.5 的 Axis2 Web 服务部署问题

java - 重新登录找不到配置文件(logback.xml)

tomcat7 - 如何在tomcat7 ubuntu 12.0.4服务器部署war文件

redirect - JSF - 从 @PostConstruct 重定向后保留 Faces 消息

jakarta-ee - 使用 Glassfish 时在哪里可以找到 server.log 文件?

java - 表示层中的实体类?