commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorge Ferrer <>
Subject Re: [Configuration] Creating a copy of a CompositeConfiguration
Date Mon, 09 May 2005 07:33:26 GMT
Thanks Oliver,

The copy method is functionally what I need, but too slow as it copies
property by property. Your other solution works.

But while trying it out I thought of a better solution for my problem.
I wrap the original CompositeObject with a second CompositeObject and
then add the temporal configuration to the wrap. This way I keep the
original totally unmodified without having to make a copy.


On 5/9/05, Oliver Heger <> wrote:
> ConfigurationUtils has a copy() method, but I am not sure if this fits
> your needs.
> However creating a copy of a CompositeConfiguration is easy enough: Just
> fetch the contained Configuration objects using the getConfiguration(int
> index) method and add them to another CompositeConfiguration.
> Oliver
> Jorge Ferrer wrote:
> > Hi,
> >
> > In an application I'm developing I want to add a configuration
> > temporaly to a CompositeConfiguration. As it is a multithreaded
> > application and other threads should no view this temporally added
> > configuration I had the idea of cloning the CompositeConfiguration
> > before adding it.
> >
> > But this class does not implement the clone() method. Is there any
> > other way to create a copy?
> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Jorge Ferrer
EasyConf developer

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message