On Fri, Sep 07, 2012 at 11:44:12AM -0700, Mark Diggory wrote:
> Tim / MarkW,
> 
> I am comfortable with no vote for this...
> https://github.com/DSpace/dspace-services/pull/5 is a significant cleanup
> and improvement.
> 
> Likewise, I've reviewed the improvements and MarkW and I discussed the
> strategy of simplifying the configuration approach.
> 
> https://github.com/DSpace/dspace-services/pull/4
> 
> MarkW, Does this support CLI relative reference to dspace config/dspace.cfg
> and config/modules/**/*.cfg?

Interesting.  org.dspace.app.launcher.ScriptLauncher.main() asks
ConfigurationManager for dspace.dir to pass to
DSpaceKernelImpl.start().  If "-Ddspace.configuration" is not defined,
ConfigurationManager will look for "/dspace.cfg" on the classpath.
bin/dspace places [DSpace]/config on the classpath, so that's how it
gets found by ConfigurationManager for CLI.

DSpaceConfigurationService also looks for "/dspace.cfg" on the
classpath, *and then* loads dspace.cfg *again* from either the path
named by -Ddspace.configuration or ${dspace.dir}/config.

So it looks like, effectively, either ${dspace.configuration} or
${dspace.dir}/config/dspace.cfg is loaded by both configuration
classes.

ConfigurationManager and DSpaceConfigurationService both depend on the
value of dspace.dir to find the module configurations.

> Also does this support getting the
> dspace-config web.xml context param initialization as well?
> 
> https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/dspace-xmlui-webapp/src/main/webapp/WEB-INF/web.xml#L37

ConfigurationManager.loadConfig(String s) expects 's' to point to the
configuration file, while new ConfigurationService(String s) expects
's' to point to [DSpace].  In XMLUI, ConfigurationManager will be
passed the value of the context parameter "dspace-config", which will
override the manager's search.  ConfigurationService is fed the value
of context parameter "dspace.dir" in
DSpaceKernelServletContextListener.  So they get to the same place by
different paths.

DSpaceKernelServletContextListener also first looks up
java:/comp/env/dspace.dir in JNDI, so one can pass it in from the
container's environment.

> I consider myself as the major proponent of switching to use dspace.dir
> rather than a direct reference to the config file.  I now see it is too
> much of a transition for the community to absorb and reverse my opinion...
> 
> If we can get this cleanup in as well then we will only need one release of
> dspace-services prior to 3.0.

Sometime after 3.0, I think we need to step back and do a new design
pass over all this stuff.  Not to remove or add anything, but just to
harmonize what we have already and see if it all makes sense
together in both CLI and Servlet contexts.

        There is no dearth of footprints.
              -- John Thorndyke, MD, LLD, etc., in "A Case of Premeditation"

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
Asking whether markets are efficient is like asking whether people are smart.

Attachment: pgpxHk7egLqOu.pgp
Description: PGP signature

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to