How to disable Timer service in Wildfly 10?

2019-09-04 12:05发布

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.

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.

How can I disable the Timer service in Wildfly 10?

1条回答
霸刀☆藐视天下
2楼-- · 2019-09-04 12:46

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>

It works for wildfly 9.

查看更多
登录 后发表回答