Re: Accessing last commit status

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Dec 15 2004 - 22:25:56 EST

  • Next message: René Kulschewski: "java.sql.SQLException: ORA-01000: maximum open cursors exceeded"

    Hi Cris,

    Ok, now I understand (though I do not necessarily agree with such
    fatalistic design approach). Anyway, for now the best solution seems to
    be subclassing a DataContext and overriding commitChanges() to catch
    exceptions, do the right thing, and then rethrow.

    Also I opened a JIRA issue to track the features that we want to
    implement in 1.2 in the area of DataObject/DataContext customization:

    http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-248

    Feel free to add/comment.

    Andrus

    On Dec 15, 2004, at 3:25 PM, Cris Daniluk wrote:
    >> Cris,
    >>
    >> It is pretty clear now. Still I am unsure why this is a problem...
    >>
    >> When you get a commit exception you have to handle it
    >> somehow, right? So
    >> normally you would either (1) revert the DataContext, show an error
    >> message and let the user to start from scratch, or (2) do not
    >> revert the
    >> DataContext and let the user to fix the errors, preserving
    >> his uncommitted
    >> changes in memory.
    >>
    >
    > In general, we are using #1 above. However, particularly since Cayenne
    > throws RuntimeExceptions, excecptions sometimes slip through the cracks
    > undetected. This causes totally unrelated functionality to fail if not
    > detecte. I'm trying to come up with a way to detect this situation so
    > that
    > one bug does not cause a user's entire session to fall apart.
    >
    > Cris



    This archive was generated by hypermail 2.0.0 : Wed Dec 15 2004 - 22:26:04 EST