[JIRA] Created: (CAY-721) DataContext shouldn't attempt to fix objects on FaultFailureExceptions

From: Andrus Adamchik (JIRA) ("Andrus)
Date: Wed Dec 13 2006 - 09:03:14 EST

  • Next message: Andrus Adamchik (JIRA): "[JIRA] Created: (CAY-722) Investigate reducing the shared cache lock scope on commit"

    DataContext shouldn't attempt to fix objects on FaultFailureExceptions
    ----------------------------------------------------------------------

             Key: CAY-721
             URL: http://issues.apache.org/cayenne/browse/CAY-721
         Project: Cayenne
            Type: Improvement

        Versions: 3.0
        Reporter: Andrus Adamchik
     Assigned to: Andrus Adamchik
         Fix For: 3.0

    The following code that I will be removing attempts to react to FaultFailureExceptions... This creates confusion cause evicted object can still be attached to other valid objects, messing up the object graph.

    Index: /Users/andrus/work/cayenne/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java
    ===================================================================
    --- /Users/andrus/work/cayenne/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java (revision 486054)
    +++ /Users/andrus/work/cayenne/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java (working copy)
    ..-39,7 +39,6 @@
     import org.apache.cayenne.DataRow;
     import org.apache.cayenne.DeleteDenyException;
     import org.apache.cayenne.Fault;
    -import org.apache.cayenne.FaultFailureException;
     import org.apache.cayenne.ObjectContext;
     import org.apache.cayenne.ObjectId;
     import org.apache.cayenne.PersistenceState;
    ..-1587,17 +1586,6 @@
             }
         }
     
    - public void prepareForAccess(Persistent object, String property, boolean lazyFaulting) {
    - try {
    - super.prepareForAccess(object, property, lazyFaulting);
    - }
    - catch (FaultFailureException e) {
    - // evict bad object
    - getObjectStore().processDeletedID(object.getObjectId());
    - throw e;
    - }
    - }
    -
         /**
          *..ince 1.2
          */

    -- 
    This message is automatically generated by JIRA.
    -
    If you think it was sent incorrectly contact one of the administrators:
       http://issues.apache.org/cayenne/secure/Administrators.jspa
    -
    For more information on JIRA, see:
       http://www.atlassian.com/software/jira
    



    This archive was generated by hypermail 2.0.0 : Wed Dec 13 2006 - 09:03:53 EST