Enabling configuration reloading

Brent Putman putmanb at georgetown.edu
Wed Dec 12 17:16:25 EST 2012


On 12/12/12 4:12 PM, Nanda Kumar wrote:
> Hello,
>   Attribute filter, resolver, profile handler and relying party
> services can be reloaded by specifying two
> attributes* *configurationResourcePollingFrequency 
> and configurationResourcePollingRetryAttempts to the service element.
>  Is this reloading process done by Shibboleth code OR is it done by
> the spring framework?

I guess it depends on what you mean exactly, but the actual reloading
logic, and the stuff which processes those 2 config attributes, is all
Shib code.  If you want to look at code, those services are impls of:

edu.internet2.middleware.shibboleth.common.service.ReloadableService

see in particular the abstract super class where the common reloading
logic resides:

edu.internet2.middleware.shibboleth.common.config.BaseReloadableService

What it essentially does is: there is a ResourceChangeWatcher and
ResourceChangeListener pair that actually watches the config resource
(the former is what takes as arguments those polling config values), and
when a change is detected, the listener invokes the
edu.internet2.middleware.shibboleth.common.config.BaseService
loadContext().  That uses Spring framework components to attempt to load
a new ApplicationContext based on the config resource(s), and if that is
successful the new ApplicationContext is swapped in for the old one. 
There is some service-specific context data logic in the specific
service impl classes in their onNewContextCreated(...) methods.

Hope that helps,
Brent






-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/users/attachments/20121212/7fcaf351/attachment-0001.html 


More information about the users mailing list