commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Pugh" <ep...@upstate.com>
Subject RE: [configuration] Can't get it to work properly
Date Fri, 30 Jul 2004 12:26:34 GMT
Oliver,
do you know what changes need to be done to make ConfigurationXMLDocument
work?  Or do you think we should remove it for now, and get the 1.0 release
out, so we can start on 2.0 refactoring?

Eric

> -----Original Message-----
> From: Oliver Heger [mailto:hegero@med.uni-marburg.de]
> Sent: Thursday, July 29, 2004 7:53 AM
> To: Jakarta Commons Users List
> Subject: Re: [configuration] Can't get it to work properly
>
>
> Hello Marty,
>
> usage of ConfigurationXMLDocument is quite problematic ATM because there
> have been changes on other classes which brake this class. If you build
> [configuration] from the actual CVS sources, you will see that the unit
> tests for ConfigurationXMLDocument fail.
>
> Currently there is no easy solution for this problem. AFAIK it is planed
> that ConfigurationXMLDocument won't be part of the 1.0 release of
> [configuration] (which will come very soon hopefully). After that some
> refactoring and redesign will be performed which solve the problems.
> (Can somebody else confirm this or correct me?)
>
> What could help you with your actual problem is the following: If you
> have only one XML configuration file you have to process, you can load
> it directly using HierarchicalXMLConfiguration (and don't use
> ConfigurationFactory). If you then create a ConfigurationXMLDocument
> from this configuration, the resulting XML document will probably keep
> its structure and can be processed by Digester.
>
> Oliver
>
> Marty Phee wrote:
> > I'm having trouble getting the Configuration to work.  As you
> can see below it
> > isn't reading the xml file properly.  Everything is getting jumbled up.
> >
> > If I use Digester by itself it works fine.
> >
> > I copied most of this from the sample files and the website.
> >
> > Create configuration.
> > configFactory = new configurationFactory();
> > configFactory.setConfigurationURL(...);
> > configDoc = new
> ConfigurationXMLDocument(configFactory.getconfiguration());
> >
> > Instantiate the digester object.
> > Digester digester  = new
> > digester(configDoc.createXMLReader("LeakDetector.ConcurrentListeners"));
> >
> >
> > Configuration file.
> > <?xml version="1.0" encoding="ISO-8859-1" ?>
> > <configuration>
> >     <additional>
> >         <hierarchicalXml fileName="leakdetectordebug.xml"
> at="LeakDetector"/>
> >     </additional>
> > </configuration>
> >
> >
> > Original file leakdetectordebug.xml.
> > <?xml version="1.0" encoding="UTF-8"?>
> > <LeakDetector>
> >     <ConcurrentListeners>
> >         <ConcurrentListener>
> >             <Port>5000</Port>
> >             <LeakListeners>
> >                 <LeakListener>
> >                     <TopicName>q_atmos_slc1</TopicName>
> >                     <TopicOwner>leak</TopicOwner>
> >                     <SubscriberName>LeakDetector</SubscriberName>
> >                     <UserId>xxxxx</UserId>
> >                     <Password>xxxxxx</Password>
> > 		    <dbUrl>jdbc:oracle:thin:@x.x.x.x:1521:xxxxxxx</dbUrl>
> >                 </LeakListener>
> >                 <LeakListener>
> >                     <TopicName>q_atmos_slc2</TopicName>
> >                     <TopicOwner>leak</TopicOwner>
> >                     <SubscriberName>LeakDetector</SubscriberName>
> >                     <UserId>xxxx</UserId>
> >                     <Password>xxxxxxx</Password>
> > 		   <dbUrl>jdbc:oracle:thin:@x.x.x.x:1521:xxxxxxx</dbUrl>
> >                 </LeakListener>
> >             </LeakListeners>
> >         </ConcurrentListener>
> >     </ConcurrentListeners>
> > </LeakDetector>
> >
> > File from ConfigurationXMLDocument.write
> >
> > ?xml version="1.0" encoding="UTF-8"?>
> > <config>
> >   <LeakDetector>
> >     <ConcurrentListeners>
> >       <ConcurrentListener>
> >         <LeakListeners>
> >           <LeakListener>
> >             <dbUrl>jdbc:oracle:thin:@x.x.x.x:1521:pdlocal</dbUrl>
> >             <dbUrl>jdbc:oracle:thin:@x.x.x.x:1521:pdlocal</dbUrl>
> >             <TopicName>q_atmos_slc1</TopicName>
> >             <TopicName>q_atmos_slc2</TopicName>
> >           </LeakListener>
> >         </LeakListeners>
> >         <Port>5000</Port>
> >         <LeakListeners>
> >           <LeakListener>
> >             <Password>xxxx</Password>
> >             <Password>xxxxx</Password>
> >             <TopicOwner>leak</TopicOwner>
> >             <TopicOwner>leak</TopicOwner>
> >             <UserId>xxxxx</UserId>
> >             <UserId>xxxxx</UserId>
> >             <SubscriberName>LeakDetector</SubscriberName>
> >             <SubscriberName>LeakDetector</SubscriberName>
> >           </LeakListener>
> >         </LeakListeners>
> >       </ConcurrentListener>
> >     </ConcurrentListeners>
> >   </LeakDetector>
> > </config>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
>
>
> --
> Dipl.-Inform. Oliver Heger
> Zentrale Informationsverarbeitung (ZIV) / Bereich Anwenderverfahren
> Klinikum der Philipps-Universit├Ąt Marburg
> Bunsenstra├če 3,
> D-35037 Marburg
> Tel: +49 6421 28-66592
> mailto:oliver.heger@med.uni-marburg.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message