You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by mc...@apache.org on 2007/12/07 23:30:28 UTC
svn commit: r602251 -
/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/lifecycle/StateTransitionsReturnedObjects.java
Author: mcaisse
Date: Fri Dec 7 14:30:27 2007
New Revision: 602251
URL: http://svn.apache.org/viewvc?rev=602251&view=rev
Log:
JDO-513
Modified:
db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/lifecycle/StateTransitionsReturnedObjects.java
Modified: db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/lifecycle/StateTransitionsReturnedObjects.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/lifecycle/StateTransitionsReturnedObjects.java?rev=602251&r1=602250&r2=602251&view=diff
==============================================================================
--- db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/lifecycle/StateTransitionsReturnedObjects.java (original)
+++ db/jdo/trunk/tck2-legacy/src/java/org/apache/jdo/tck/lifecycle/StateTransitionsReturnedObjects.java Fri Dec 7 14:30:27 2007
@@ -67,18 +67,20 @@
/**
* Operations that cause state changes
*/
- private static final int MAKEPERSISTENT = 0;
- private static final int DETACHCOPYOUTSIDETXNTRTRU = 1;
- private static final int DETACHCOPYOUTSIDETXNTRFLS = 2;
- private static final int DETACHCOPYINSIDEDATASTORETX = 3;
- private static final int DETACHCOPYINSIDEOPTIMISTICTX = 4;
- private static final int SERIALIZEOUTSIDETX = 5;
- private static final int SERIALIZEINSIDETX = 6;
+ private static final int MAKEPERSISTENTOPTIMISTIC = 0;
+ private static final int MAKEPERSISTENTDATASTORE = 1;
+ private static final int DETACHCOPYOUTSIDETXNTRTRU = 2;
+ private static final int DETACHCOPYOUTSIDETXNTRFLS = 3;
+ private static final int DETACHCOPYINSIDEDATASTORETX = 4;
+ private static final int DETACHCOPYINSIDEOPTIMISTICTX = 5;
+ private static final int SERIALIZEOUTSIDETX = 6;
+ private static final int SERIALIZEINSIDETX = 7;
- private static final int NUM_OPERATIONS = 7;
+ private static final int NUM_OPERATIONS = 8;
private static final String[] operations = {
- "makePersistent",
+ "makePersistent with active optimistic tx",
+ "makePersistent with active datastore tx",
"detachCopy outside tx with NontransactionalRead true",
"detachCopy outside tx with NontransactionalRead false",
"detachCopy with active datastore tx",
@@ -106,7 +108,14 @@
// PERSISTENT_NONTRANSACTIONAL, PERSISTENT_NONTRANSACTIONAL_DIRTY, DETACHED_CLEAN,
// DETACHED_DIRTY
- // makePersistent
+ // makePersistent optimistic transaction
+ { PERSISTENT_NEW, UNCHANGED, UNCHANGED,
+ UNCHANGED, UNCHANGED, PERSISTENT_NEW,
+ PERSISTENT_NEW, UNCHANGED, UNCHANGED,
+ UNCHANGED, UNCHANGED, PERSISTENT_NONTRANSACTIONAL,
+ PERSISTENT_DIRTY},
+
+ // makePersistent datastore transaction
{ PERSISTENT_NEW, UNCHANGED, UNCHANGED,
UNCHANGED, UNCHANGED, PERSISTENT_NEW,
PERSISTENT_NEW, UNCHANGED, UNCHANGED,
@@ -166,7 +175,8 @@
private static final boolean[][] applies_to_scenario = {
// Datastore Optimistic No tx
- { true, true, false }, // makePersistent
+ { false, true, false }, // makePersistent active optimistic transaction
+ { true, false, false }, // makePersistent active datastore transaction
// since the spec leaves detachCopy outside tx a bit underspecified,
// we decided to disable this scanario for now
{ false, false, true }, // detachCopy outside tx with NontransactionalRead=true
@@ -383,7 +393,8 @@
Object result = null;
StateTransitionObj obj = (StateTransitionObj) stobj;
switch( operation ){
- case MAKEPERSISTENT:
+ case MAKEPERSISTENTOPTIMISTIC:
+ case MAKEPERSISTENTDATASTORE:
result = pm.makePersistent(obj);
break;