Digging into the code, I find that there is no GuiceServiceManager.
In fact the only extensions of ServiceManagerSystem are
DSpaceServiceManager (the one we actually call),
MockServiceManagerSystem, ExternalServiceManagerSystem (a
subinterface), and SpringServiceManager.

So DSpaceServiceManager is managing a list of one ServiceManagerSystem
which is always SpringServiceManager.  This can probably be
simplified.

If there were only one ServiceManager, it could create a
ConfigurationService whenever it needs to.  In the case of
SpringServiceManager it could create the ApplicationContext before the
ConfigurationService -- in fact the chosen ConfigurationService could
be specified in the ApplicationContext's configuration if that were
useful, and injected to key objects.  The only reason why a
ConfigurationService is created first seems to be that we want to be
able to configure additional Spring configuration files to be loaded
in some cases.  Since this seems to be only for testing -- it only
ever appears in a test Properties resource -- we should probably find
some other way to provide this one String and not use the main
configuration code to fetch it.  Possibly it could be a system
property or a Context parameter.  Making that change removes the
sequencing requirement for ConfigurationService and
ApplicationContext.

I have never been able to figure out why one would want more than one
ServiceManager running in a given instance of DSpace.  (Nor can I see
why we would want more than one Kernel, which is also provided for.)
Comments?

-- 
Mark H. Wood, Lead System Programmer   [email protected]
Machines should not be friendly.  Machines should be obedient.

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to