如何在Wildfly 10中禁用计时器服务? [英] How to disable Timer service in Wildfly 10?

查看:55
本文介绍了如何在Wildfly 10中禁用计时器服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Java EE应用程序中,我有一个@Singleton和几个@Schedule d方法.当我在Wildfly上部署应用程序时,计时器服务开始执行这些方法,这是正确的.

In my Java EE application I have a @Singleton with several @Scheduled methods. When I deploy the app on Wildfly, the Timer service starts executing these methods, which is correct.

由于在开发过程中我在辅助服务器上测试了我的应用程序,因此我想在该Wildfly实例上禁用Timer服务,以防止执行这些方法.

Since during development I test my app on a secondary server, I'd like to disable the Timer service on that instance of Wildfly, to prevent the execution of those methods.

问题是……我找不到任何设置可以做到这一点.

Problem is… I can't find any setting to do this.

如何在Wildfly 10中禁用计时器服务?

How can I disable the Timer service in Wildfly 10?

推荐答案

尝试在standalone.xml中删除块timer-service.

Try to remove block timer-service in standalone.xml.

<subsystem xmlns="urn:jboss:domain:ejb3:3.0">
...
<timer-service thread-pool-name="default" default-data-store="default-file-store">
                <data-stores>
                    <file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir"/>
                </data-stores>
            </timer-service>

它适用于wildfly 9.

It works for wildfly 9.

这篇关于如何在Wildfly 10中禁用计时器服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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