Issue Details (XML | Word | Printable)

Key: JDO-412
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Michael Bouschen
Reporter: Marc Prud'hommeaux
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

Expectation of jdoPostLoad() invocation does not take into account the possibility of persistent-nontransactional state

Created: 30/Aug/06 06:54 AM   Updated: 03/Oct/06 07:57 PM
Return to search "FOR-urgency-blocker"
Component/s: tck2
Affects Version/s: JDO 2 final
Fix Version/s: JDO 2 maintenance release 1, JDO 2 TCK challenge fixes

Time Tracking:
Not Specified

Resolution Date: 03/Oct/06 07:57 PM


 Description  « Hide
Some tests assume that jdoPostLoad() will be called, but do not take into account the possibilty that persistent-nontransactional is a valid state, and that jdoPostLoad() is not invoked for those instances. The solution should be to force instances to be transitioned to persistent-clean after commit by setting RetainValues=false.

This affects the following tests:

 org.apache.jdo.tck.api.instancecallbacks.CallingJdoPostload.test
 org.apache.jdo.tck.api.instancecallbacks.ModificationOfNontransactionalNonpersistentFields.test

The solution is to invoke "setRetainValues(false)" after obtaining the transaction in both the test cases. E.g.:

        Transaction t = pm.currentTransaction();
        t.setRetainValues(false);


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Michael Bouschen made changes - 02/Oct/06 07:52 PM
Field Original Value New Value
Assignee Michael Bouschen [ mbo ]
Michael Bouschen made changes - 02/Oct/06 07:53 PM
Description
Some tests assume that jdoPostLoad() will be called, but do not take into account the possibilty that persistent-nontransactional is a valid state, and that jdoPostLoad() is not invoked for those instances. The solution should be to force instances to be transitioned to persistent-clean after commit by setting RetainValues=false.

This affects the following tests:

 org.apache.jdo.tck.api.instancecallbacks.CallingJdoPostload.test
 org.apache.jdo.tck.api.instancecallbacks.ModificationOfNontransactionalNonpersistentFields.test

The solution is to invoke "setRetainValues(false)" after obtaining the transaction in both the test cases. E.g.:

        Transaction t = pm.currentTransaction();
        t.setRetainValues(false);
Some tests assume that jdoPostLoad() will be called, but do not take into account the possibilty that persistent-nontransactional is a valid state, and that jdoPostLoad() is not invoked for those instances. The solution should be to force instances to be transitioned to persistent-clean after commit by setting RetainValues=false.

This affects the following tests:

 org.apache.jdo.tck.api.instancecallbacks.CallingJdoPostload.test
 org.apache.jdo.tck.api.instancecallbacks.ModificationOfNontransactionalNonpersistentFields.test

The solution is to invoke "setRetainValues(false)" after obtaining the transaction in both the test cases. E.g.:

        Transaction t = pm.currentTransaction();
        t.setRetainValues(false);
Fix Version/s JDO 2 maintenance release 1 [ 12310923 ]
Repository Revision Date User Message
ASF #452606 Tue Oct 03 19:51:47 UTC 2006 mbo JDO-412: set retainValues=false to make sure the instance gets loaded in the next tx and jdoPostLoad is called
Files Changed
MODIFY /db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/instancecallbacks/CallingJdoPostload.java
MODIFY /db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/api/instancecallbacks/ModificationOfNontransactionalNonpersistentFields.java
MODIFY /db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/api/instancecallbacks/CallingJdoPostload.java
MODIFY /db/jdo/branches/2.0.1/tck20/src/java/org/apache/jdo/tck/api/instancecallbacks/ModificationOfNontransactionalNonpersistentFields.java

Michael Bouschen added a comment - 03/Oct/06 07:57 PM
Checked in the proposed fix into the trunk and the 2.0.1 branch (see revision 452606).

Michael Bouschen made changes - 03/Oct/06 07:57 PM
Resolution Fixed [ 1 ]
Fix Version/s JDO 2.0 TCK challenge fixes [ 12312093 ]
Status Open [ 1 ] Resolved [ 5 ]