[daisy] [JIRA] Created: (DSY-505) Race condition in registering of extensions during repository startup

Bruno Dumon (JIRA) issues at cocoondev.org
Mon Jul 9 05:09:50 CDT 2007


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