How to Configure Domain.xml to use the Environment
I've been debugging GlassFish today. I need to set the debugger to suspend=y or suspend=n depending on what I am doing. Instead of constantly editing domain.xml I simply do this:
<java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=${SUSPEND},address=9009" system-classpath="" classpath-suffix="">
And then I do this in the OS:
Windows: set SUSPEND=y
UNIX: export SUSPEND=n
========================
Environmental variables are automatically searched when a token appears in domain.xml. It also searches System Properties and other properties inside domain.xml.