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 Cl...@bit.admin.ch on 2005/06/10 16:27:08 UTC

CMT and OJB

Hi,
 
I have an application server WebSphere 5.1 and I must do Container Managed
Transactions (CMT) with OJB. There is only PB-API involved. Unfortunately,
there is very little  documentation on this topic. Now my question:
 
If I don't call the method PersistenceBroker.beginTransaction() and
PersistenceBroker.commitTransaction() everything seems to work. Rollbacks
work. But there is a warning message similar to: "WARN: No tx found. Please
use tx to avoid side effects...".  What are those sideeffects? Is there some
cleanup OJB does while committing? I've seen some hashtable activity stuff
in the OJB-sourcode. We don't use OJB-Cache.
 
Why has OJB to be "transaction aware" at all, since I don't use OJB-Cache.
 
Thx for your replies!
 
 
 
 
 
 
 
 

Re: CMT and OJB

Posted by Armin Waibel <ar...@apache.org>.
Hi,

Claude.Glauser@bit.admin.ch wrote:
> Hi,
>  
> I have an application server WebSphere 5.1 and I must do Container Managed
> Transactions (CMT) with OJB. There is only PB-API involved. Unfortunately,
> there is very little  documentation on this topic.

Maybe someone is willing to write a howto ;-)


> Now my question:
>  
> If I don't call the method PersistenceBroker.beginTransaction() and
> PersistenceBroker.commitTransaction() everything seems to work. Rollbacks
> work. But there is a warning message similar to: "WARN: No tx found. Please
> use tx to avoid side effects...".  What are those sideeffects? Is there some
> cleanup OJB does while committing? I've seen some hashtable activity stuff
> in the OJB-sourcode. We don't use OJB-Cache.
>

This warning was introduced to prevent user in non-managed environments 
storing objects without a running tx. Without PB-tx the autocommit state 
of the used connection is on (by default), thus when storing an object 
with references or a bunch of objects a rollback of all objects is not 
possible.


> Why has OJB to be "transaction aware" at all, since I don't use OJB-Cache.
>  

In managed environments without using a cache it's completely different 
and the warning is needless and confusing.
Should introduce a property 'checkForTx' in OJB.properties to 
en-/disable this behavior, instead always check for tx?

regards,
Armin


> Thx for your replies!
>  
>  
>  
>  
>  
>  
>  
>  
> 

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