Hi Jörg, See comments below.
Thanks, -- Marcus On Thu, 2006-04-06 at 09:45 +0200, Jörg Schaible wrote: > Hi Marcus, > > Marcus Malcom wrote on Wednesday, April 05, 2006 6:17 PM: > > > Commons Project: Configuration > > > > I was thinking about creating a "Configuration Cache". > > Essentially this > > would would be very specific to a PropertiesConfiguration at the start > > and would move to be more generic as needed. The cache would be a > > centralized location to obtain instances of PropertiesConfiguration - > > standardizing a singleton/multiton approach. > > > > My first question is: Does anyone know if there's something out there > > already that does this? (did I just miss something) > > > > Second: If there isn't anything out there, would the commons group be > > interested in a code submit on this? > > I am not sure, that I really understand what you're up to. Can you give a use > case? My use case is to make sure that a configuration file is only loaded once per class loader space. I didn't see anything in the configuration API that accomplishes this (please let me know if I missed something). The call would look something like this: cache.getConfiguration("someFile") Naturally, this can be done with any Configuration, but I'm looking mainly at the file configurations at the moment. The API would look something like this: Configuration getConfiguration(String fileName) Configuration getConfiguration(URL url) Configuration getConfiguration(File file) Again, the point is that the cache object (singleton/multiton) would cache the configuration file so that subsequent calls to getConfiguration(...) would return the same object. I do have some example code that I put together yesterday, should I send them to the group? Thanks! > - Jörg
signature.asc
Description: This is a digitally signed message part