Mail Archive Home | carol List | March 2005 Index
| <-- Date Index --> | <-- Thread Index --> |
Hi,
> If repository is a factory, it will return empty configuration ?
Yes.
// Allow anyone to plugin its own configuration implementation
Configuration c = Configurations.newConfiguration();
URL url = ...;
c.load(url);
// Thread local config
Configurations.setCurrent(c);
// Named configuration
Configurations.set("foo", c);
> configuration with values of carol-default.properties ?
Yes, that may also be:
// Loads carol-defaults.properties
// Just a shadow method to help the users.
Configuration c = Configurations.newDefaultConfiguration();
> Do we have to send arguments to the factory class for
> retrieve a configuration object ?
Not in my idea, but then again you're the carol expert.
> Do you have ideas on the factory methods that you want ?
Only 1/2, see above.
> The interface + default implementation seems to be a good
> choice. It is up to us to take a good interface :)
Yes.
Configuration is an interface.
I think a Map-style interface (get(String), put(String,Object),
remove(String)) for properties, along with load(URL) are the minimum. The
less methods, the best, IMHO.
Also, I would not use ResourceBundle to load files: it constraints to
.properties, while in the future one may want XML or other fancy formats.
> > and a configuration class that loads configurations
Yes.
Configurations is a concrete class.
It handles 2 things:
1. creation of a Configuration implementation
2. repository for configurations
See above for possible methods.
> So it means that a class will take carol.properties file and
> call factory for create each configuration present in this file.
> (a replacement URL could be given instead of taking
> carol.properties file with classpath, we can reload a new
> configuration later...)
Here's where my carol knowledge is too small.
I probably would prefer 2 files for 2 configurations:
carol-jrmp.properties
carol-iiop.properties
carol-<protocol>.properties in general.
> Carol should handle only a default config when running in
> multi-config mode on client case. (on server, it will call
> each configuration) I think that this is to the developer to
> explicitely set the config.
> Maybe that it is possible without explicitely calls but I
> don't see how for now.
I was thinking that since it is possible to, for example, propagate
transactionall contexts, then at a certain point some carol code is hit
anyway.
If this code is hit before or after the last point where it is possible to
change configuration is beyond my current carol knowledge.
But interceptors are protocol-independent, no ?
If that is possible, it would be super-easy for the client, since carol will
take care of doing everything right.
Thanks !
Simon
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.