[daisy] [JIRA] Resolved: (DSY-505) Race condition in registering of
extensions during repository startup
Bruno Dumon (JIRA)
issues at cocoondev.org
Thu Jul 12 04:49:50 CDT 2007
[ http://issues.cocoondev.org//browse/DSY-505?page=all ]
Bruno Dumon resolved DSY-505:
-----------------------------
Resolution: Fixed
Problem is solved in SVN rev 4166-4168.
Rather than the solution described above, I've introduced a new PluginRegistry component:
* plugins (auth. schemes, pre-save hooks, extensions, ...) are registered with the PluginRegistry, rather than the various *Registrar interfaces. This also means plugins can be registered before the components using the plugins are running.
* in contrast to the solution described above, the PluginRegistry allows adding and removing plugins at any time during runtime.
* the PluginRegistry checks things like: same plugin not registered twice, plugins have unique names, no concurrent (un)registering of plugins by multiple threads, etc., so that these issues don't need to be handled by the plugin users anymore.
* having a PluginRegistry also allows some management possibilities, for now limited to printing errors at shutdown if not all plugins and plugin users are properly removed.
The PluginRegistry is now used for the registration of these types of plugins:
- authentication schemes
- extensions
- pre-save hooks
- http request handlers
- text extractors
- link extractors
> Race condition in registering of extensions during repository startup
> ---------------------------------------------------------------------
>
> Key: DSY-505
> URL: http://issues.cocoondev.org//browse/DSY-505
> Project: Daisy
> Type: Improvement
> Reporter: Bruno Dumon
> Priority: Minor
> Fix For: 2.1
>
> Some extensions, such as pre-save hooks or textextractors, modify the behavior of the repository server. Right now such extensions are registered after the repository server is started, thus while the repository server might already be doing useful work. For example, one might already be updating documents before a pre-save hook is registered. (this behavior was both possible with Merlin as with the new Daisy Runtime)
> Generally speaking, extensions that modify the behavior of the repository server should be registered before the core repository is started.
> The current approach of having XyzRegistrar interfaces doesn't work then, as these are only available after the repository is started. So the extensions should be registered in some other way.
> A straightforward solution is to simply let extensions export their service (to the Daisy Runtime service registry). Currently the Daisy Runtime only supports having one service per interface type. We could however easily eliminate this restriction in combination with the following:
> * a new <daisy:import-services> (note the plural) makes a bean which is a java.util.List of all the implementations of a certain service
> * the existing <daisy:import-service> fails if there are multiple implementations of the requested service
> To enable drop-in extensions to be registered before the core repository, we can have two extension directories in the repository data dir:
> ${daisy.datadir}/extensions/before-repository
> ${daisy.datadir}/extensions/after-repository
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the daisy
mailing list