Issue Details (XML | Word | Printable)

Key: JDO-429
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Craig Russell
Reporter: Marc Prud'hommeaux
Votes: 0
Watchers: 0
Operations

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

StateTransitionsReturnedObjects assumes that serializing deleted instances will transition them to transient

Created: 17/Sep/06 06:51 AM   Updated: 10/Oct/06 07:44 PM
Component/s: tck2
Affects Version/s: JDO 2 final
Fix Version/s: JDO 2 TCK challenge fixes

Time Tracking:
Not Specified

Resolution Date: 10/Oct/06 07:44 PM


 Description  « Hide
Elements 7 and 8 (0-based) of the "serialize with active tx" array in org/apache/jdo/tck/lifecycle/StateTransitionsReturnedObjects.java assert that a persistent-new-deleted and persistent-deleted instance (respectively) will transition to transient when then are serialized then deserialized. However, the specification does not seem to mandate this anywhere: detached-clean should be an equally valid state to be in.

The easiest fix, short of changing the test case to allow for multiple states, is to change elements 7 and 8 from "TRANSIENT" to "IMPOSSIBLE", which will disable the state check altogether.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Marc Prud'hommeaux added a comment - 17/Sep/06 06:58 AM
The same goes for element 10 of "serialize outside tx", which asserts that a persistent-nontransactional-dirty instance will become transient after serialize/deserialize, even though the specification seems to never mandate this. detached-clean should be an equally valid assertion.

Craig Russell added a comment - 04/Oct/06 03:22 PM
The intent of a detached instance is that it represents a persistent instance that is not actively managed by a PersistenceManager but has identity and can be attached to a PersistenceManager. In the case of a deleted instance, this concept is violated and will cause problems for the application.

Specifically, if a deleted instance is treated as detached, and the detached instance is subsequently attached, an exception should result because the instance no longer exists in the datastore, and the assumption is that detached instances have persistent identity that corresponds to a persistent instance.

Regarding element 10, persistent-nontransactional-dirty, I will create another JIRA for this, since it's a separate issue.

Craig Russell added a comment - 10/Oct/06 07:44 PM
svn commit src/java/org/apache/jdo/tck/lifecycle/StateTransitionsReturnedObjects.java
Sending src/java/org/apache/jdo/tck/lifecycle/StateTransitionsReturnedObjects.java
Transmitting file data .
Committed revision 462525.