How to disable Timer service in Wildfly 10?

佐手、 提交于 2019-12-12 03:29:53

问题


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:


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.



来源:https://stackoverflow.com/questions/37027870/how-to-disable-timer-service-in-wildfly-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!