Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Higgins Configuration Management

Revision as of 08:06, 15 July 2008 by Kuehrmc.gmail.com (Talk | contribs) (Proposal 1: ISettingDescriptors)

Configuration Management

Applications need the ability to manage the run time configuration and persisted configuration files of various Higgins components. This example will focus on IdAS Registry as the use case, but applies to any IConfigurableComponent.

The IdAS registry can be initialized from an XML file through the configuration APIs. The 'IdentityAttributeService' section in the configuration XML file that corresponds to the IdAS registry typically contains the following information:

A section of settings for' . context factories, for e.g.

<Setting Name="ContextFactoryInstancesList" Type="htf:list">
	<Setting Name="JNDIContextFactory" Type="htf:map">
		<Setting Name="Instance" Type="xsd:string">JNDIContextFactory</Setting>
		<Setting Name="ContextTypes" Type="htf:list">
			<Setting Name="JNDIContextType" Type="xsd:string">$context+ldap</Setting>
		</Setting>
	</Setting>
</Setting>

A section of settings fhinor the context IDs, for e.g.

<Setting Name="ContextIdsList" Type="htf:list">
	<Setting Name="urn:ldap@ltoyota" Type="htf:map">
		<Setting Name="ContextId" Type="xsd:string">urn:ldap@ltoyota</Setting>
			<Setting Name="ContextTypes" Type="htf:list">
				<Setting Name="JNDIContextType" Type="xsd:string">$context+ldap</Setting>
			</Setting>
			<Setting Name="Connection" Type="htf:map">
				<Setting Name="Address" Type="xsd:string">ldap://ltoyota:389</Setting> 
				<Setting Name="SearchBase" Type="xsd:string">o=Higgins</Setting>
			</Setting>
		</Setting>
	</Setting>
</Setting>

Following APIs exist to update the IdASRegistry:

  • registerContextFactory
  • removeContextFactory
  • registerContextId
  • removeContextId

All the above APIs currently update only the in-memory data-structures corresponding to the list of context factories and contextIds. There is no mechanism to persist updates through these APIs to the configuration XML file.

Proposal Overview: Associate an IConfigurationHandler with an IConfigurableComponent

The Configuration API defines:

  • An interface that must be implemented by all components that must be configured through the Configuration API
  • An IConfigurationHandler interface that must be implemented by all methods of configuring the IdAS components like XML/XRDS etc.

In order for updates to a configurable component be reflected in the persistent storage, it must be associated with a configuration handler. A new API would be added to the com.ibm.higgins.configuration.api.IConfigurableComponent interface:

public abstract void setConfigurationHandler(org.eclipse.higgins.configuration.api.IConfigurationHandler handler);

Additionally, the IConfigurationHandler interface would be extended to have a new API

public abstract void applyUpdates() throws Exception;

This API would be called by the IConfigurableComponent whenever it wants to save the in-memory XML Object Model to the file.

Typing the data

Currently, the in-memory configuration is represented by the Map data structure. Thus the 'IdentityAttributeService' section is represented by a Map with the keys 'ContextFactoryInstancesList' and 'ContextIdsList' and whose values are the lists of context factories and context ids respectively. This structure does not represent the 'type' of the value of each setting, which becomes necessary while writing back information to the file.

There are two options for handling the data types (so far), Adding an ISettingDescriptor to detail the Types in the Map, or representing each element in the configuration through the com.ibm.higgins.configuration.api.ISetting interface.

Proposal 1: ISettingDescriptors

Add description

Proposal 2: ISetting

The other desription

Back to the top