Thursday, September 4, 2008

Glassfish: Dynamic Reconfiguration

There is an option in the Glassfish server config for "dynamic reconfiguration".   I've stumbled across many a forum post asking,
Why does glassfish not reflect my configuration changes?  I have dynamic-reconfiguration enabled and I see the change reflected in the domain.xml, but the config changes aren't live!
The answer is simple, but not intuitive:  That's not what dynamic-reconfiguration means.  From the engineering document, dynamic-reconfiguration is defined as the  
Ability to be able to control the output of statistical data while the server is running.
Thus, dynamic-reconfiguration does not mean that Glassfish and the JVM are dynamically reconfigurable, but rather that monitoring levels can be changed without having to restart the server.  This especially useful if you want to enable monitoring when your server is bogged down to find out why, but don't want the overhead of monitoring running all the time.

So, in short, love dynamic-reconfiguration for what it is, but don't think it's a catch all for changing anything and seeing the change right away.