Re: Accessing last commit status

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Dec 14 2004 - 21:44:16 EST

  • Next message: Andrus Adamchik: "Re: Delete after insert?"

    Cris,

    > [...] persist the context across sessions.

    > [...] commit fails and escapes error handling,

    I am not following what you are trying to do... Any code samples, ASCII
    charts?

    Andrus

    On Dec 14, 2004, at 2:12 PM, Cris Daniluk wrote:
    > Is it possible to access the result of the most recent commitChanges()
    > method call? We are using the DataContext listener to persist the
    > context
    > across sessions. If a commit fails and escapes error handling, it
    > becomes
    > stuck in the queue ahead of any other changes, causing all subsequent
    > page
    > loads to fail when commitChanges() is called. When the context is
    > retrieved
    > in a new request, I would like to first check the last action for
    > failure,
    > and if discovered, log and remove all newObjects and modifiedObjects.
    >
    > It looks like there are events DID_COMMIT and DID_ROLLBACK that
    > DataContext
    > relies on internally. I could not find a publicly exposed way to
    > access tbe
    > checked at the beginning of each page request to see if there are
    > changes
    > that need to be rolled back.
    > Is there an easy/proper way to do this, and if not, what would be the
    > best
    > way for me to patch DataContext to support it?
    >
    > Thanks,
    >
    > Cris



    This archive was generated by hypermail 2.0.0 : Tue Dec 14 2004 - 21:44:21 EST