> - Renamed PluginRegistry.startPlugin method as addPlugin. > Modified the behaviour > of this method to mostly adding the plugin to the registry. > (More comments to follow)
I'm not sure of the change of the name, and functionality here Ceki, could you describe what you mean here?
I liked the 'startPlugin' name because it gave the connotation that the method would initialise the Plugin (by calling activateOptions), but now the method really does just add, and does not activate the options. Has the contract changed such that clients that want to add a Plugin to the registry must activate the options first?
At the time, this change seemed absolutely necessary because configurators must first ensure that sub-components of a plugin are configured, i.e. activateConfiguration is invoked on them, before activating the parent component, the plugin in this case. So, current configuration support for plugins in Joran (see PluginAction), adds the plugin to the PluginRegistry in its begin() method, and calls plugin.activateOption in its end() method. In Joran, the end() method of the parent element is called after the end() method of child elements are called.
After this change was committed, I realized that both the addition of the plugin to the registry and its activation could be performed within the end method. To keep a boring story short, there is no immediate good reason for the change. I like the new code a little better on the basis of the separation of concerns principle but that's just like saying I like blue better than green for ecological reasons.
Along those lines, it might be nice to add an "isActivated" read only property, which is set by the Plugin on activateOptions call. What do you think?
The isActivated method has been much more problematic for me. I'll develop further in my response to your following message on this same thread.
cheers,
Paul Smith
-- Ceki G�lc�
For log4j documentation consider "The complete log4j manual"
ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
