Hi,
    We are using OJB PB API in one of out application. we are trying to do
the locking for the following
scenario.


class A{
  some fields;
  Integer  versionMaintainedbyOjb;
  Collection  Cs;
}
Class C {
  some fields
   A   a
  Integer  versionMaintainedbyOjb;
}


In our repository.xml   We had given auto-update="object"  for both
collection-descriptor and reference descriptor.
We gave locking="true" for versionMaintainedbyOjb in the class descriptor of
both the class.

When we try to update Object of "A" which is having collection of objects of
C.
First updating of each object in the collection is happening. At that time
value of "versionMaintainedbyOjb" for A is getting
updated in the data base.  So finally when we try to update A it is giving
OptimisticLockException.

Am i going in the right way?. Please help me. Thanks in advance.

Rajadurai.

Reply via email to