commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Soaring Eagle <>
Subject Re: Configuration - Reload Strategy in j2ee containers
Date Wed, 06 Apr 2005 14:19:19 GMT
Hello all,

In an app we are doing, we use commons config to load properties and
use a threaded class to do the reload every few seconds. this is then
packaged as a part of a j2ee application. When application code is
referenced for the first time, a thread is started and this thread
checks for modifications at intervals. Though the J2EE spec does not
allow a developer to start threads, this seems to work well for me.

The other option would be create a java application class as the
configuration wrapper (containing a main method) and to start that
class as a "startup" class in the J2EE container.

Please share your views on this type of design.


On Apr 4, 2005 5:47 PM, WANG Qingtian <> wrote:
> Hi,
> Is the reload strategy implemented by creating a thread that
> periodically checks the time stamp of the configuration file? If so, how
> do I make sure that thread is started/stopped properly when I use it in
> a j2ee container? Like, will the thread be killed when I shut down the
> web/ejb container? What is the "best practice" of using "configuration"
> in a j2ee container?
> Thanks a lot for your help!!!
> Qingtian
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message