Stefano Bagnara wrote:
> Configuration
> 
> 
> Alan Cabrera (JIRA) wrote:
> >     [ 
> http://issues.apache.org/jira/browse/JAMES-495?page=comments#a
> ction_12412681 ] 
> > 
> > Alan Cabrera commented on JAMES-495:
> > ------------------------------------
> > 
> > XBean is another alternative.
> 
> How does the XBean configuration work?
> Isn't it the "Configuration Bean" solution I already listed?
> 
> Does XBean provide any sort of hot-reloading of configurations? JNDI 
> based configurations?
> 
Neither XBean or Commons Configuration deal with hot-reloading. They can't as 
they rightly do not have knowledge of the components they are providing the 
initial static configuration for. 

For dynamic configuration we need a way of notifying a component that its 
configuration has changed. 

The simple way is to set a new ComponentContext on the component and leave the 
component to figure out how to process this and how to fulfil its contracts 
with dependent components while reconfiguring (ignore it, queue requests, block 
requests, etc). 

The traditional way is to introduce lifecycle methods, as Avalon did, whereby 
the entire service is cycled through the relevant states to accept a new 
configuration.

These days I find the simple way highly attractive. A DynamicContext interface 
with an updateContext(Context) throws ContextException method is all that is 
needed to do the job.

-- Steve

 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to