commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <heg...@med.uni-marburg.de>
Subject Re: [configuration] is creating class instances possible?
Date Wed, 29 Dec 2004 12:28:39 GMT
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: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 


-- 
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:oliver.heger@med.uni-marburg.de

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message