Apache

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Optimistic Locking with PB API for 1:M

    1 answers - 871 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi,
    We are using JB PB API in one of out application. we are trying to do
    the locking for the following
    scenario.
    class A{
    some fields;
    Integer versionM;
    Collection Cs;
    }
    Class C {
    some fields
    A a
    Integer versionM;
    }
    In our repository.xml We had given auto-update="object" for both
    collection-descriptor and reference descriptor.
    We gave locking="true" for versionM in the class descriptor of
    both the class.
    When we try to update 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 "versionM" for A is getting
    updated in the data base. So finally when we try to update A it is giving
    LockException.
    Am i going in the right way?. Please help me. Thanks in advance.
    Rajadurai.
  • No.1 | | 1256 bytes | |

    Hi Rajadurai,

    Rajadurai K wrote:
    Hi,
    We are using JB PB API in one of out application. we are trying to do
    the locking for the following
    scenario.

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

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

    When we try to update 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 "versionM" for A is getting
    updated in the data base. So finally when we try to update A it is giving
    LockException.

    So you only call
    broker.store(A)
    in your source?
    If not could you please post a code example or some pseudo code?
    Do you use proxies for the references?

    regards,
    Armin

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

    Rajadurai.

    To unsubscribe, e-mail: ojb-user-unsubscribe (AT) db (DOT) apache.org
    For additional commands, e-mail: ojb-user-help (AT) db (DOT) apache.org

Re: Optimistic Locking with PB API for 1:M


max 4000 letters.
Your nickname that display:
In order to stop the spam: 9 + 8 =
QUESTION ON "Apache"

EMSDN.COM