Re: Handling Transactions

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Jul 21 2004 - 11:29:32 EDT

  • Next message: Scott McClure: "EventSubjects"

    Just reread what I wrote. Looks like I need more coffee and a more
    coherent explanation of what I just said ;-)

    On Jul 21, 2004, at 11:15 AM, Andrus Adamchik wrote:
    > (1) Since DataContext doesn't hold to a connection between DB calls,
    > (2) DataContext.commitChanges() may or may not result in committing a
    > DB transaction.

    (2) is of course not a consequence of (1), but rather a consequence of
    the ability to turn Cayenne transactions on and off.

    What (1) leads to is the need to do connection binding to thread, if we
    want a piece of Java Cayenne code to stay within the same DB
    transaction.

    Andrus



    This archive was generated by hypermail 2.0.0 : Wed Jul 21 2004 - 11:29:37 EDT