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: [RFC] Using IoC for initializing the OJB runtime (OJB 1.1)
Date Tue, 26 Oct 2004 19:47:47 GMT
Brian McCallister wrote:

> I like pico a lot. It is more elegent than Spring, imho, but some
> things are less convenient.

Yep, noticed that as well ...

> Really, using either one should be pretty easy (ie, use both).
> Internally we can use whichever, but making it friendly for either
> should be very doable.

Using an interface removes the necessity to choose one. In fact I have 
finished both the Pico and the Spring implementation (both using 
Constructor Injection).

  > On Tue, 26 Oct 2004 19:48:58 +0200, Thomas Mahler <thma32@web.de> wrote:
> 
>>I always had IoC in mind when I wrote the original configuration stuff.
>>So it should be easy to shift to any micro-container.

It is probably mostly a matter of moving the configuration stuff 
(default values) into the components and make them 'IoC-friendlier', 
i.e. create bean properties and adjust the constructors.

>>I'm really positive about such a change. I'm simply not sure which
>>product will be th ebest for our purpose.
>>It should be
>>- stable
>>- minimum footprint
>>- avoid a vendor lock in
>>- easy to integrate of J2EE environments,
>>etc.

Don't know about the stability of Pico or Spring but I think for our 
purposes they both are quite stable. Vendor lockin should not be a 
problem because ComponentContainer (formerly known as ObjectFactory) 
implementations for our purposes are quite easily done (the Spring impl 
is about 110 lines of code including comments).
AFAIK both Pico and Spring can be easily used within an EJB container 
(the Geronimo guys seem to use Pico to some extent ?), and since the IoC 
container does not load classes - this is usually done within the 
context of OJB using the classloader configured for OJB - there should 
be no problems in this regard.
Also, it should be quite doable to provide a JNDI implementation of the 
ComponentContainer.

>>I had a short look at PicoContainer some time ago and it looked like a
>>very clever piece of code...
>>I can't comment ob Avalon, Spring BeanFactory etc.

A Spring variant is already in place (because I want to use OJB fully 
integrated into Spring, this includes DataSources, hint hint). For OJB 
standalone I'm in favor of Pico though, simply because of the smaller 
footprint of the library (49k vs. 250k).

An Avalon impl should be easy too, same as with HiveMind. But I don't 
think OJB itself should provide them as this would only increase the 
amount of libraries necessary for building OJB.

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