db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mahler <thm...@web.de>
Subject Re: wrapping OJB as an avalon component
Date Fri, 25 Apr 2003 08:18:35 GMT
Hi again Neeme,

Neeme Praks wrote:
> 
> I trying to wrap OJB as an Avalon component for use as persistence 
> engine inside avalon containers. Due to the fact that in OJB quite a bit 
> of code is dealing with component management and lifecycle and Avalon 
> containers can take care of those issues on behalf of OJB, I would like 
> to implement this component in an Avalon friendly way: by using Avalon 
> component management and lifecycle, instead of OJBs. So, here are some 
> implementation questions I have come up with...
> 
> The main changes would be:
> * convert PersistenceBrokerFactory into an Avalon component (no evil 
> static stuff :-))
> * use Avalon configuration interfaces to load OJB properties (wrapper 
> around OJB configuration interfaces).
> * when getting a PersistenceBroker from factory, the requesting 
> component would have to supply the relevant repository.xml (as 
> inputstream, for example) and it would get back a broker that would be 
> properly configured for this particular component.
> 
> The interface that I would like this PersistenceBrokerFactory component 
> to have is:
> package org.apache.ojb.avalon;
> 
> import java.io.InputStream;
> 
> public interface PersistenceBrokerFactory {
> 
>    PersistenceBroker defaultPersistenceBroker();
>    PersistenceBroker createPersistenceBroker(InputStream repository);
> 
> }
> 
> When implementing this, I should check out the import 
> org.apache.ojb.broker.ta.PersistenceBrokerFactoryDefaultImpl, right?
> Then just replace some stuff like pooling with Avalon services and it 
> should work, right?
>

should work, indeed

Thomas

> Any comments and pointers are helpful!
> Neeme
> 
> 
> 
> ---------------------------------------------------------------------
> 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