Re: Evaluating Cayenne for Java Client application

From: Mike Kienenberger (mkienen..laska.net)
Date: Wed Dec 01 2004 - 10:40:18 EST

  • Next message: Gentry, Michael: "RE: Evaluating Cayenne for Java Client application"

    > Sounds intriguing, I will have a look at home if this is not way over
    > my head. I do remember however that pessimistic locking is database
    > dependant, I presume this is detectable/done through the JDBC?
    > Of course I can't do any of this at work, and at home - not after
    > Xmas... hopefully by then I'll have Internet access form outside of
    > work.

    Did EOF handle pessimistic locking using EOEditingContext.lock() and
    unlock()?

    If so, there isn't anything equivalent in Cayenne. That's actually of the
    things I like BEST about Cayenne, as I had to implement tons of workarounds
    to defective lock() behavior in EOF WO5.0.

    On the other hand, the methods lock() and unlock() in the DataContext are
    unused, and, to me, it'd seem very reasonable to implement them to provide
    pessimistic locking. Every time lock() was called, you'd go through the
    context objects, and if they were marked for pessimistic locking, you'd
    generate the appropriate call, and vice-versa. What would be unclear is
    how to handle the case of the program crashing while the lock was held open,
    but maybe this can be done with the commit/rollback mechanism
    (unfortunately, I'm now into pure speculation as I don't know the
    limitations of transaction usage).

    -Mike



    This archive was generated by hypermail 2.0.0 : Wed Dec 01 2004 - 10:38:43 EST