db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <to...@first.fhg.de>
Subject Re: ojb 1.1 ideas and proposals
Date Tue, 13 Jul 2004 12:04:23 GMT
Brian McCallister wrote:

>> Properties can be read from a file (the current schema with 
>> OJB.properties) and from the System object as well as manipulated via 
>> generic setProperty/getProperty accessors.
>
>
> Consider also looking at Spring's BeanFactory -- we may be reinventing 
> things =) Making it basically bean configured opens up lots of 
> configuration options though -- could be Spring, JMX, Pico (sort of), 
> XML, etc with much fewer changes, particularly with the instance based 
> config you talk about.

I read a bit about IoC (btw. there is a good paper by Martin Fowler), 
and specifically PicoContainer/NanoContainer, and it seems my idea is 
somewhat similar (sort of a Setter Dependency Injection & Configuration).
My question is, would it be ok to have the additional dependency to 
PicoContainer (except when using within Spring or EJB where we would 
provide alternative configurator implementations)? If yes, then 
configuration could be realized with PicoContainer, e.g. reading the 
properties from a file/from System/allow to set via a Configuration 
object (getProperty/setProperty), which in turn uses PicoContainer to 
setup the components. Otherwise, we could implement it directly, isn't 
too difficult for our limited requirements.

I think we should differ in one thing though: default values should be 
defined within the components, not via external property files or in the 
Configurator (as it is now), because changes to a component are then 
local to the component, and there is no coding in the configuration 
necessary to support new components or changes to existing ones.

Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message