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 James Nyika <ja...@novell.com> on 2003/05/21 22:39:31 UTC

Re: Threadsafety of the PersistenceBroker default impl

Hi
 I am a newbie to OJB and i am using the PB api and i would like to
access a single instance
 of the broker to perform CRUD operations. 

 1. Is the default impl of the broker threadsafe or should i
synchronize all my calls
 2. is there any other suggestion on an implementation, or a pointer to
a doc that explains some options i could use.

 sorry if this has been answered already, but i scoured the default
docs, examples and list .. to no avail.



James Nyika
Cambridge Technology Partners
The global eServices company of Novell, Inc.
http://www.novell.com

Re: Threadsafety of the PersistenceBroker default impl

Posted by Thomas Mahler <th...@web.de>.
Hi James,

The PB is intended to be used only for one tx at a time. Using a single 
PB instance from multiple thread will work only if all threads are 
expected to work within one and the same jdbc tx.
If you want to have each thread to use it's own jdbc ty use one PB 
instance per thread.

cheers,
Thomas

James Nyika wrote:
> Hi
>  I am a newbie to OJB and i am using the PB api and i would like to
> access a single instance
>  of the broker to perform CRUD operations. 
> 
>  1. Is the default impl of the broker threadsafe or should i
> synchronize all my calls
>  2. is there any other suggestion on an implementation, or a pointer to
> a doc that explains some options i could use.
> 
>  sorry if this has been answered already, but i scoured the default
> docs, examples and list .. to no avail.
> 
> 
> 
> James Nyika
> Cambridge Technology Partners
> The global eServices company of Novell, Inc.
> http://www.novell.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
>