db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claude.Glau...@bit.admin.ch
Subject AW: CMT and OJB
Date Mon, 13 Jun 2005 05:30:26 GMT
Thanks a lot for your answer!

Yes, I will appreciate a feature to turn on or off "checkForTx" in
OJB.properties :)

With best regards, Claude

-----Urspr√ľngliche Nachricht-----
Von: Armin Waibel [mailto:arminw@apache.org] 
Gesendet: Freitag, 10. Juni 2005 20:57
An: OJB Users List
Betreff: Re: CMT and OJB


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

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


Mime
View raw message