RE: Evaluating Cayenne for Java Client application

From: Gentry, Michael (michael_gentr..anniemae.com)
Date: Wed Dec 01 2004 - 10:42:50 EST

  • Next message: Marek Wawrzyczny: "Re: Evaluating Cayenne for Java Client application"

    Maybe this document could be useful:

    http://developer.apple.com/documentation/LegacyTechnologies/WebObjects/W
    ebObjects_4.5/System/Documentation/Developer/WebObjects/Topics/Programmi
    ngTopics.2d.html

    I didn't recall EOF supporting pessimistic locking, but it never really
    interested me and I'm still using WO 4.0.1 (don't ask). It certainly
    would be DB-specific (the downside).

    /dev/mrg

    -----Original Message-----
    From: Mike Kienenberger [mailto:mkienen..laska.net]
    Sent: Wednesday, December 01, 2004 10:40 AM
    To: Marek Wawrzyczny
    Cc: cayenne-deve..bjectstyle.org
    Subject: 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 - 11:03:26 EST