db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <arm...@apache.org>
Subject Re: CMT and OJB
Date Fri, 10 Jun 2005 18:56:59 GMT

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 

> 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?


> 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

View raw message