Emma, The trick seems to call clearTree before clearProperty to remove all its nodes. Commited the fix: https://code.google.com/a/apache-extras.org/p/bond/source/detail?r=deb037bf66780a5ab03d7ec05bf2b59b7f67afd7#
- Manolo On Thu, Aug 8, 2013 at 3:36 PM, Emma Sesmero <emmasesm...@gmail.com> wrote: > Thank you for your answer, but still get some problems. > > I solved the writing in the other protocol, but the DNS keeps duplicating > the servers. I have modified the same test, so you could see the failure > [1]. > > [1] > > https://code.google.com/a/apache-extras.org/p/bond/source/detail?r=1e8b0223db10348594b306647fd07f313cffebf4 > > > 2013/8/8 Manuel Carrasco Moñino <man...@apache.org> > > > Emma, > > > > I've committed a change [1] to save correctly nested entries, you weren't > > clearing entries before adding all the set of servers. I have modified > your > > test to check this issue as well. > > I have added the index to the servers property as they suggest in theirs > > xml documentation [2], in this way we are sure that all server entries > are > > saved in the first node. > > > > Hope this helps > > - Manolo > > > > > > [1] > > > > > https://code.google.com/a/apache-extras.org/p/bond/source/detail?r=26bcb6c610858ca2bebf8d42e46bdf0bd493a6c2# > > [2] > > > > > http://commons.apache.org/proper/commons-configuration/userguide-1.2/howto_xml.html > > > > > > On Tue, Aug 6, 2013 at 9:32 PM, Emma Sesmero <emmasesm...@gmail.com> > > wrote: > > > > > Hi Eric, > > > > > > Thank you for the info. Actually parsing the xml with the > > > commons-configuration library is much simpler and nicer. However, > > although > > > I read the documentation to update the file [1], I am having some > > problems > > > because it sometimes duplicates instead of updating the value. > > > > > > I have been looking for examples, but it seems as all the ones I found > > use > > > the library to read, but not to write. Do you know where I can find a > > > coding example that updates an xml and that I can run? > > > > > > Thanks in advance. > > > > > > [1] > > > > > > > > > http://commons.apache.org/proper/commons-configuration/userguide/howto_filebased.html#Saving > > > > > > > > > 2013/7/25 Eric Charles <e...@apache.org> > > > > > > > On 25/07/2013 14:18, Emma Sesmero wrote: > > > > > > > >> Hello all, > > > >> > > > >> Currently, I am implementing the configuration web interface and I > > have > > > a > > > >> couple of questions: > > > >> > > > >> - The documentation says that all configuration files resides in the > > > >> ./conf > > > >> and ./conf/META-INF folder. So what I am doing now is trying to read > > the > > > >> configuration .xml in the forther ./conf (for example, > dnsservice.xml > > > for > > > >> DNS), if it does not exist, I create the xml copying the > -template.xml > > > >> (dnsservice-template.xml for DNS), reading this considering it as > the > > > >> default configuration and edit it. Do you think this is the correct > > > >> approach? > > > >> > > > >> > > > > Doc is for the last release. trunk uses configuration files embedded > in > > > > the jars, and overrided by files in conf folder (initially, conf > folder > > > is > > > > empty) > > > > > > > > > > > > - Does any of you know what james server is using to read those > > > >> configuration files? I have started to use jdom, but it might be > > better > > > to > > > >> use the same as James for this task. > > > >> > > > >> > > > > configuration is parsed with commons-configuration library. > > > > > > > > > > > > Thank you very much in advance. > > > >> > > > >> > > > > > > ------------------------------**------------------------------**--------- > > > > To unsubscribe, e-mail: server-dev-unsubscribe@james.**apache.org< > > > server-dev-unsubscr...@james.apache.org> > > > > For additional commands, e-mail: server-dev-help@james.apache.**org< > > > server-dev-h...@james.apache.org> > > > > > > > > > > > > > >