Thursday, April 14, 2011

Using JMX to dynamically change application properties

http://java.sun.com/developer/technicalArticles/J2SE/jmx.html


I had an application that reads some non-standard debug settings from a properties file at startup -- when one wanted to change the settings the application server needed to be restarted.  In a production environment, restarting the application server is not an option.  I implemented JMX on the logging class so that JConsole can be used to modify the settings.


The class in question is a singleton so I created a helper class since the MBean interface methods cannot be static.  The singleton instantiates the agent with its static load() method.

Wednesday, April 13, 2011

Changing Mozilla profile location

My C:/ drive was running out of space so I wanted to relocate my local Thunderbird messages to D:/.  Almost as simple as copy/paste:
http://kb.mozillazine.org/Thunderbird_:_FAQs_:_Changing_Profile_Folder_Location