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 Gary <gl...@yahoo.com> on 2003/12/01 16:22:07 UTC
Transaction Confusion
We are going to use WebSphere as our transaction
manager.
I am confused over what APIs I can use in this
configuration, and how the transaction
begin/commit/rollback boundries would look.
Can someone please give a thumbnail sketch of my
options, and (in a perfect world) examples?
Thanks, Gary
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Transaction Confusion
Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Gary,
Gary wrote:
> We are going to use WebSphere as our transaction
> manager.
>
> I am confused over what APIs I can use in this
> configuration, and how the transaction
> begin/commit/rollback boundries would look.
>
Set your properties as described in the deployment docs
http://db.apache.org/ojb/deployment.html
for usage with entity beans.
<snip>
ConnectionFactoryClass=
org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl
...
OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager
...
JTATransactionManagerClass=
org.apache.ojb.otm.transaction.factory.WebShereTransactionManagerFactory
</snip>
Only use Datasource from your AppServer to connect to DB in OJB.
For transaction demarcation only use JTA (don't use PB or ODMG tx
demarcation). Means for programmatic transaction use UserTransaction or
when using entity beans for declarative tx use container managed tx.
OJB was shipped with some session bean examples. When using
UserTransaction, use it in the same way as the PB/ODMG tx.
UserTransaction tx = lookup tx;
tx.begin();
PersistenceBroker broker = ....
...do some things
broker.close();
tx.commit();
regards,
Armin
> Can someone please give a thumbnail sketch of my
> options, and (in a perfect world) examples?
>
> Thanks, Gary
>
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
>
> ---------------------------------------------------------------------
> 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