Hi Armin!

Armin Waibel wrote:
Hi Ashish,

Ashish Rangole wrote:

Hi!

I am using ODMJ API in OJB 1.0.1 with:

<object-cache class="org.apache.ojb.broker.cache.ObjectCacheEmptyImpl">
   <attribute attribute-name="timeout" attribute-value="900"/>
   <attribute attribute-name="autoSync" attribute-value="true"/>
</object-cache>
ImplicitLocking=false

This is what I do:
1. Open database, start a transaction
2. Retrieve a list of objects from database (approx 200)
   using PB API
3. Lock each object one by one
4. Modify a certain field in each of them
5. commit the transaction

I observe that not all objects get updated in the database
and for them an "UPDATE" sql statement is not shown in spy log.

Please let me know if somebody has seen this behaviour and if it
is a bug or what I might be doing wrong.


Is the field type the same for all modified classes? Maybe OJB has problems to detect the changed field. You could try to change the object state by yourself using OJB's odmg extensions via TransactionExt#markDirty.
http://db.apache.org/ojb/docu/guides/odmg-guide.html#OJB+Extensions+of+ODMG
(this link is for >=1.0.3 but #markDirty exists in 1.0.1 too - AFAIK)
 Yes the field is same for all modified objects which are of same class.
 From your suggestion above I get the impression that this is a known
 bug in version 1.0.1. Please confirm. I wonder why does it behave
 correctly for some of the objects in the transaction, then does not for
 some other. For eg if there are 200 objects retrieved and write locked
 in the transaction, it will correctly persist the changes in ,say,
 first 120, then miss the next 10 objects, then correctly persist the
 remaining.

 Thanks a lot for your time and help.
 Ashish

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to