简体   繁体   English

使用附加的java代理启动Glassfish域

[英]Start Glassfish Domain with java agent attached

For some monitoring purposes I need to start Glassfish domain with custom java agent attached. 出于某些监控目的,我需要使用附加的自定义Java代理启动Glassfish域。 If I start domain directly with command: 如果我直接用命令启动域:

java -cp /path/to/glassfish3/glassfish/modules/glassfish.jar com.sun.enterprise.glassfish.bootstrap.ASMain bla-bla-bla -javaagent:/path/to/agent.jar

it works as expected. 它按预期工作。

But how to do the same with domain, which starts with asadmin? 但是如何使用以asadmin开头的域名呢? I've tried asadmin create-jvm-options and asadmin create-system-properties - it didn't help me. 我已经尝试过asadmin create-jvm-options和asadmin create-system-properties - 它没有帮助我。 Any ideas? 有任何想法吗?

Try restarting the domain. 尝试重新启动域。

If you set anything JVM-related, that will not be effective until you restart the domain. 如果您设置了与JVM相关的任何内容,那么在重新启动域之前这将无效。 The GF Admin Console also warns about it it you do it on the web UI. GF管理控制台还会在Web UI上对此进行警告。

The asadmin docs also warns about it. asadmin文档也警告过它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM