解释 TomEE 启动错误 "You didn't specify org.apache.batchee.jmx.application and JMX is already registered, skipping"

Explaining TomEE start error "You didn't specify org.apache.batchee.jmx.application and JMX is already registered, skipping"

当 TomEE 启动时,我看到这个警告:

WARNING [http-nio-80-exec-18] org.apache.batchee.container.services.ServicesManager.init You didn't specify org.apache.batchee.jmx.application and JMX is already registered, skipping

这是什么意思?

默认情况下,Apache BatchEE(与 TomEE 捆绑)通过 org.apache.batchee.jmx(布尔值)为 JobOperator 激活 JMX facade。根据官方documentation,属性 org.apache.batchee.jmx.application用于指定

a name to distinguish job operator between applications when batchee is not shared (will be shown in JMX name)

启动时,BatchEE 会尝试在平台的 mbean 服务器上注册自己。为此,它依赖于通过 org.apache.batchee.jmx.application 给出的应用程序名称。如果未设置此 属性,则会打印 default value is used. In case, the JMX facade is already registered with this default name,上面提到的日志消息。

如果 BatchEE 在 TomEE 的类路径中可用,则此初始化在启动期间通过 BatchEEServiceManager 触发并且 属性 openejb.batchee.integration.skip 不是 true

如果您不需要在 BatchEE 上进行 JMX 监控,您可以通过 openejb.batchee.integration.skip=true 或通过 org.apache.batchee.jmx=false.

禁用集成