You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Efftinge, Sven" <SE...@lohndirekt.de> on 2002/12/11 10:01:05 UTC
[PB]many persistence broker instances
Hi,
When I call:
inst = PersistenceBrokerFactory.createPersistenceBroker(new
PBKey("repository.xml"));
// doing some selects,updates deletes here
// the App creates 2 PBs
inst.getCollectionByQuery(new QueryBySQL(clazz,"SELECT * FROM
mytable"));// the App creates 6 PBs here
inst.close();
The application instanciates 6 persistence broker (allthough there where
allready two created before)
I use proxies for references and mytable has 14 references.
Is this a normal behavior?
Sven
Re: [PB]many persistence broker instances
Posted by Jin Bal <ji...@hotmail.com>.
When you've finished with the PB you should call PB.close();
HTH
Jin
----- Original Message -----
From: "Efftinge, Sven" <SE...@lohndirekt.de>
To: "'OJB Users List'" <oj...@jakarta.apache.org>
Sent: Wednesday, December 11, 2002 9:01 AM
Subject: [PB]many persistence broker instances
> Hi,
> When I call:
>
> inst = PersistenceBrokerFactory.createPersistenceBroker(new
> PBKey("repository.xml"));
> // doing some selects,updates deletes here
> // the App creates 2 PBs
>
> inst.getCollectionByQuery(new QueryBySQL(clazz,"SELECT * FROM
> mytable"));// the App creates 6 PBs here
>
> inst.close();
>
>
> The application instanciates 6 persistence broker (allthough there where
> allready two created before)
>
> I use proxies for references and mytable has 14 references.
>
> Is this a normal behavior?
>
> Sven
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
Re: [PB]many persistence broker instances
Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Sven,
----- Original Message -----
From: "Efftinge, Sven" <SE...@lohndirekt.de>
To: "'OJB Users List'" <oj...@jakarta.apache.org>
Sent: Wednesday, December 11, 2002 10:01 AM
Subject: [PB]many persistence broker instances
> Hi,
> When I call:
>
> inst = PersistenceBrokerFactory.createPersistenceBroker(new
> PBKey("repository.xml"));
> // doing some selects,updates deletes here
> // the App creates 2 PBs
>
> inst.getCollectionByQuery(new QueryBySQL(clazz,"SELECT * FROM
> mytable"));// the App creates 6 PBs here
>
> inst.close();
>
>
> The application instanciates 6 persistence broker (allthough there
where
> allready two created before)
>
> I use proxies for references and mytable has 14 references.
>
> Is this a normal behavior?
Yes, PB provide many service methods, thus OJB graps instances from
the pool for intern use.
regards,
Armin
>
> Sven
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
>