commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Kim" <Oliver....@TELUS.COM>
Subject RE: ConfigurationFactory and hierarchicalDom4j
Date Fri, 23 Jan 2004 20:36:02 GMT
Sure - is there a particular process for submitting patches?  Can you point me at a url if
there is one?
 
Thanks,
 
Oliver

	-----Original Message----- 
	From: Eric Pugh [mailto:epugh@upstate.com] 
	Sent: Fri 1/23/2004 1:55 AM 
	To: Oliver Kim; Commons-Dev (E-mail) 
	Cc: 
	Subject: RE: ConfigurationFactory and hierarchicalDom4j
	
	
	Oliver, would you like to submit a patch for this?  Also, if you could submit a unit test
showing the problem..  Not good when all the unit tests pass, but a bug still exists!
	 
	In terms of a release, basically we are just wrangling over whether to throw a ConfigurationException..
 At this point, the feeling seems to be that no good solution really exists right now.  We
need (in Configuration 2 or 1.5 or whatever) to refactor the process of loading a configuration
object from the process of having a configuration object.   That way cool stuff like multiple
reloading strategies etc become possible.
	 
	At this point, there are a coupld throws Exception that I am going to replace with a checked
ConfigurationInitializationException or ConfigurationLoadException...
	 
	So, 1.0 is coming down the pike very soon..   
	 
	Eric

		-----Original Message-----
		From: Oliver Kim [mailto:Oliver.Kim@TELUS.COM]
		Sent: Friday, January 23, 2004 8:27 AM
		To: epugh@upstate.com; hps@intermeta.de; oliver.heger@t-online.de
		Subject: ConfigurationFactory and hierarchicalDom4j
		
		
		You guys probably would have figured this out pretty quickly, but since I found it, I thought
I'd let you know...
		 
		The following code snipped should contain a rule for hierarchicalDom4j:
		 
		    protected void initDigesterSectionRules(Digester digester,
		    String matchString, boolean additional)
		    {
		        setupDigesterInstance(
		            digester,
		            matchString + "properties",
		            new BasePathConfigurationFactory(PropertiesConfiguration.class),
		            METH_LOAD,
		            additional);
		        setupDigesterInstance(
		            digester,
		            matchString + "dom4j",
		            new BasePathConfigurationFactory(DOM4JConfiguration.class),
		            METH_LOAD,
		            additional);
		        setupDigesterInstance(
		            digester,
		            matchString + "jndi",
		            new JNDIConfigurationFactory(),
		            null,
		            additional);
		    }
		
		 
		Like so:
		 
		    protected void initDigesterSectionRules(Digester digester,
		    String matchString, boolean additional)
		    {
		        setupDigesterInstance(
		            digester,
		            matchString + "properties",
		            new BasePathConfigurationFactory(PropertiesConfiguration.class),
		            METH_LOAD,
		            additional);
		        setupDigesterInstance(
		            digester,
		            matchString + "dom4j",
		            new BasePathConfigurationFactory(DOM4JConfiguration.class),
		            METH_LOAD,
		            additional);
		        setupDigesterInstance(
		            digester,
		            matchString + "hierarchicalDom4j",
		            new BasePathConfigurationFactory(HierarchicalDOM4JConfiguration.class),
		            METH_LOAD,
		            additional);
		        setupDigesterInstance(
		            digester,
		            matchString + "jndi",
		            new JNDIConfigurationFactory(),
		            null,
		            additional);
		    }
		
		It seems to work fine once you do this.
		 
		As an aside?  How close do you think Configuration is to release?  I'm considering using
it in one of my projects.
		 
		Thanks,
		 
		Oliver Kim

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message