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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top