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 Joerg Lensing <in...@softcon-lensing.de> on 2003/07/07 15:46:59 UTC

mixed: PB and ODMG

hello,
in an earlier thread, there was a hint to use PB for "simple" 
activities, which need not
odmg-transactions (and therefore better performance) and to use ODMG for
the more complex things. How should be the handling? (How do i get the
PersistenceBroker? Can there be more than one Transaction per thread?)

Intended useage:

1. open odmg-transaction
2. make an independent read-update-write by PB (transaction will be done 
in one go)
3. use odmg-transaction
4. make a second independetn read-update-write by BP
5. commit odmg-transaction

an example would be nice

joerg



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: mixed: PB and ODMG

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Joerg,

----- Original Message -----
From: "Joerg Lensing" <in...@softcon-lensing.de>
To: "OJB Users List" <oj...@db.apache.org>
Sent: Monday, July 07, 2003 3:46 PM
Subject: mixed: PB and ODMG


> hello,
> in an earlier thread, there was a hint to use PB for "simple"
> activities, which need not
> odmg-transactions (and therefore better performance) and to use ODMG
for
> the more complex things. How should be the handling?

please see
http://db.apache.org/ojb/faq.html#15

> (How do i get the
> PersistenceBroker?

PersistenceBroker broker = ((HasBroker) tx).getBroker();

>Can there be more than one Transaction per thread?)

ODMG implementation currently does not support
nested tx, but you can use tx.join() to do something like

tx1.begin()
...
tx2.begin()
// do something
tx2.commit // tx2.abort()
...
tx1.join()
tx1.commit() // tx1.abort()

regards,
Armin

>
> Intended useage:
>
> 1. open odmg-transaction
> 2. make an independent read-update-write by PB (transaction will be
done
> in one go)
> 3. use odmg-transaction
> 4. make a second independetn read-update-write by BP
> 5. commit odmg-transaction
>
> an example would be nice
>
> joerg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org