db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <arm...@apache.org>
Subject Re: Someone shed some light on using LocalTxManager versus JTATxManager?
Date Wed, 11 Feb 2004 17:28:06 GMT
Hi Andrew,

Clute, Andrew wrote:
> Thanks for the help!
> 
> I am reading this right, that if I continue to use my current version
> (RC4), then using the PB-api will not work because it cannot participate
> inside the JTA-tx? I will *have* to update to latest to be able to get
> this work?

The only problem with rc4 will be the cache synchronization. If you only 
use ObjectCachePerBrokerImpl it should work.
In your example you do:

      pb.commitTransaction();
         }
         catch (OSNException ex)
         {
             pb.removeFromCache(item);
             pb.abortTransaction();
             throw ex;
         }

         return returnValue;

But in distributed tx the rollback could occur after this method call, 
thus you can't remove object from cache. That's the only problem with rc4.
In latest version the PB-api was associated with JTA-tx via 
Synchronization and the ObjectCacheDefaultImpl has a property "autoSync"
allows to cleanup cache on rollback (see cache doc, javadoc)

> 
> And when you say deployment doc, you just mean the documentation on how
> to do deployment's right? 

right

regards,
Armin

> 
> -Andrew 
> 
> -----Original Message-----
> From: Armin Waibel [mailto:arminw@apache.org] 
> Sent: Wednesday, February 11, 2004 11:46 AM
> To: OJB Developers List
> Subject: Re: Someone shed some light on using LocalTxManager versus
> JTATxManager?
> 
> If you use PB-api I recommend you to get latest from CVS (HEAD is
> stable). I made some changes to let PB-api participate in JTA-tx and
> update the deployment doc (to generate local docs call bin\build.bat
> htmldoc). Have a look in
> ...broker.core.PersistenceBrokerFactorySyncImpl, this class manages the
> JTA integration when using PB-api.
> 
> regards,
> Armin
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 

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


Mime
View raw message