ATM there is no such feature as instantiating objects from class names defined in configuration properties. So you will have to read the class name from the configuration and create the object by hand.

I miss such a feature, too, because I also often use the approach to define implementation classes for interfaces in configuration files. Perhaps you can open an enhancement request in bugzilla (http://issues.apache.org/bugzilla/) so that the idea does not get lost.

Oliver

Emmanouil Batsis wrote:

Hello,

I'm preparing to switch my application from custom configuration code to commons configuration, but couldn't figure this one out from the docs...

My custom configuration is heavily used to configure interface implementations like:

<interface name="bla.InterfaceName" implementation="my.MyImplementation" />

or load instances of singletons/factories like

<factory class="bla.SomeFactoryImpl" name="someFactory" jndi="true" />

then expose those as properterties of the configuration singleton or put them in the JNDI tree.

Can i do this or anything similar with commons-configuration or should i simply use it to get the string value of a class name and go on from there?

Many thanks for your time and help,

Manos







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Dipl.-Inform. Oliver Heger
Zentrale Informationsverarbeitung (ZIV) / Bereich Anwenderverfahren
Klinikum der Philipps-Universit�t Marburg
Baldingerstra�e,
D-35037 Marburg
Tel: +49 6421 28-66923
mailto:[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to