Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Spring and Resources

For its self-contained subsystems, the IdP programmatically creates and manages its own Spring application contexts by loading configuration resources. The Spring Resource interface ( is used to manage access to configuration material.

As well as the usual slew of Spring-provided Resource types, one other specialized Resources has been implemented the HTTPResource types.


Programming a reloadable subsystem


To configure a serviceable bean, instantiate a ReloadableSpringService, providing the class type of the subsystem bean (or an interface it implemements) to the constructor, and a list of Spring resources in the serviceConfiguration property.  Other properties which can be used to control reloading behavior include:

  • failFast

  • reloadCheckDelay

  • reloadtaskTimer

There are numerous examples in system/conf/services-system.xml, including advanced examples that demonstrate how to dynamically supply an implementation class that implements the desired interface after configuring the Spring context.


Using a subsystem requires:

  1. Interrogating the ReloadableSpringService for the current serviceable component in the subsystem (via getServiceableComponent())

  2. Interrogating the component for the subsystem component (via getComponent())

  3. Performing operations on the component.

  4. Unpinning the component.  (via unpinComponent())

It is vital that every call to getServiceableComponent() is matched by a call to unpinComponent() as these are essentially lock and unlock operations.