db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Armin Waibel" <ar...@code-au-lait.de>
Subject Re: [CVS OJB tests fail] broker leak in cache
Date Fri, 14 Feb 2003 17:21:46 GMT

----- Original Message -----
From: "Jakob Braeuchi" <jbraeuchi@gmx.ch>
To: "OJB Developers List" <ojb-dev@db.apache.org>
Sent: Friday, February 14, 2003 6:03 PM
Subject: Re: [CVS OJB tests fail] broker leak in cache


> hi armin,
>
> i do not understand why it worked before.
> new Identity(Object obj) also uses the default broker.
>
>     public Identity(Object objectToIdentitify)
>     {
>         PersistenceBroker broker = null;
>         try
>         {
>             broker =
> PersistenceBrokerFactory.defaultPersistenceBroker();  <<<<
>             init(objectToIdentitify, broker, null);
> ...
>
> where's the difference ? can you please explain this to me...

your implementation cause a broker leak. The obtained PB instances
never be closed.

regards,
Armin

>
> jakob
>
> Armin Waibel wrote:
>
> >Hi Jakob,
> >
> >----- Original Message -----
> >From: "Jakob Braeuchi" <jbraeuchi@gmx.ch>
> >To: "OJB Developers List" <ojb-dev@db.apache.org>
> >Sent: Friday, February 14, 2003 5:17 PM
> >Subject: Re: [CVS OJB tests fail] broker leak in cache
> >
> >
> >
> >
> >>hi armin,
> >>
> >>did it work _before_ my changes ? if yes i could undo them.
> >>
> >>
> >
> >yes it worked without your changes.
> >
> >
> >
> >>a) remove the public void cache(Object obj)
> >>i agree. this method is imo never used in ojb.
> >>
> >>b) change method remove(Object obj)
> >>i think this should be ok
> >>
> >>
> >
> >ok, I'm started to make these changes
> >in the cache package.
> >
> >regards,
> >Armin
> >
> >
> >
> >>jakob
> >>
> >>
> >>Armin Waibel wrote:
> >>
> >>
> >>
> >>>Hi all,
> >>>
> >>>in CVS ObjectCacheDefaultImpl we had
> >>>a PB leak.
> >>>This is caused by using PBF.defaultPB calls
> >>>without closing the broker. Jakob add this to avoid
> >>>using of deprecated Identity constructor.
> >>>But the real problem is that this solution never
> >>>will work, because of using the default broker.
> >>>
> >>>Thus I propose the following changes in ObjectCache:
> >>>a) remove the
> >>>public void cache(Object obj) throws
> >>>ClassNotPersistenceCapableException;
> >>>method, this will never work.
> >>>
> >>>b) change method
> >>>public void remove(Object obj);
> >>>to
> >>>public void remove(Identity oid);
> >>>
> >>>What do you think?
> >>>
> >>>
> >>>regards,
> >>>Armin
> >>>
> >>>
>
>>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> >>>For additional commands, e-mail: ojb-dev-help@db.apache.org
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
>
>>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> >>For additional commands, e-mail: ojb-dev-help@db.apache.org
> >>
> >>
> >>
> >>
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> >For additional commands, e-mail: ojb-dev-help@db.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> 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