At 12:10 AM 5/13/2004, Paul Smith wrote:
> 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?

This just shows how long it's been since I've been in this area (or any
area) of the log4j code.  There already IS an isActive method....

Indeed, there is an isActive method in Plugin in the plugin interface and I find its meaning quite confusing although that may be due to my ignorance of the intended usage.


What does isActive()==true mean? Does it mean that the plugin is free of errors, or could it also mean currently running but in a state without active connections. What about paused plugins? Are paused plugins active or inactive? Do we/should we care?

Perhaps the PluginRegistry.addPlugin method could either a) call
activateOptions if it's not active yet, OR throw IllegalStateException, as a
sanity check to enforce the contract that Plugins must be activated before
being added.

This may seem a bit naive but why should the configurator care if a plugin is active before adding it it to the registry? With a new config file, the user tells us that she wants this plugin added to the registry. That's all we can really count on for sure. The current behavior for appenders is to detach and close existing appenders and replace them with the new ones mentioned in the new config file. (At least that is the sprit of the current behavior for appenders. I have intentionally simplified the description for the sake of this discussion.)


My current preference would be simply to remove the isActive method from the Plugin interface. What do you think?

Paul

-- 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]



Reply via email to