Hi Martin, Martin Crawford wrote:
Hi all.I hope this is a simple question:
It is!
Yes!Is the Transaction implementation for OJB thread independent? I.e. Could I share a Transaction object across multiple threads?
ODMG specifies that transactions are bound to threads.
At one point in time a thread may only use one transaction.
the tx.join() an .leave() methods can be used to share a tx between threads:
/**
* Attach the caller's thread to this <code>Transaction</code> and detach the thread
* from any former <code>Transaction</code> the thread may have been associated with.
*/
public void join();
/**
* Detach the caller's thread from this <code>Transaction</code>, but do not attach
* the thread to another <code>Transaction</code>.
*/
public void leave();
cheers,
Thomas
Cheers. -- Martin Crawford Software Development Manager Ageis Technologies T 416-593-4747 C 416-931-8507 E <[EMAIL PROTECTED]> U <http://www.ageistech.com> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
