简体   繁体   中英

Start Glassfish Domain with java agent attached

For some monitoring purposes I need to start Glassfish domain with custom java agent attached. 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? I've tried asadmin create-jvm-options and asadmin create-system-properties - it didn't help me. Any ideas?

Try restarting the domain.

If you set anything JVM-related, that will not be effective until you restart the domain. The GF Admin Console also warns about it it you do it on the web UI.

The asadmin docs also warns about it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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