如何配置xsbt-web-plugin以打开JMX端口,以便可以使用Jconsole或VisualVM检查MBeans?
在我当前的设置下,VisualVM没有显示MBean提示“无法建立JMX连接”。
我猜期望的结果应该是xsbt-web-plugin在下面的代码行中调用jetty:
java
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.port=1099
-jar start.jar etc/jetty-jmx.xml etc/jetty.xml发布于 2013-07-12 09:33:59
因为xsbt-web-plugin在运行container:start时不会派生Java进程,所以无法使用sbt的javaOptions来实现这一点。相反,您必须检测sbt进程本身才能查看任何JMX信息。
为此,请将以下行添加到~/.sbtconfig文件:
SBT_OPTS="$SBT_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=1099"https://stackoverflow.com/questions/17487394
复制相似问题