[wildfly-dev] "Boot time" system props in the managed server's model

Brian Stansberry brian.stansberry at redhat.com
Thu Feb 5 11:39:54 EST 2015


tl;dr

We have a minor anomaly in system property processing in domain mode 
that we intend to ignore.

long version

While digging into a bug Emmanuel Hugonnet noticed an anomaly. When you 
define a system-property resource in domain.xml or host.xml with 
"boot-time=true", the HC does both of the following when it launches a 
server:

1) Uses -D to set the prop when it starts the server process.

2) Adds an add system-property op to the server's set of boot ops, which 
causes the system property to get set again later during boot.

Really, only 1) should happen; that's what "boot-time=true" means. The 
purpose of boot-time=true is to ensure the value is set at JVM launch, 
not waiting for management ops to execute, which may be too late for 
props that are read early.

The other thing that happens is when you add such a prop to the domain 
or host model, we immediately execute an add op on all relevant running 
servers. This somewhat ignores a possible meaning of "boot-time=true", 
which implies the prop needs to be set at boot. Since that hasn't 
happened, really the server should be put into restart-required state.

But, at this point we intend to leave the behavior as is. It's been this 
way for a long time and people may be unknowingly counting on the prop 
being directly written and the server not going into restart-required.

-- 
Brian Stansberry
Senior Principal Software Engineer
JBoss by Red Hat


More information about the wildfly-dev mailing list