Apache JDO Project - CHALLENGE org.apache.jdo.tck.lifecycle.StateTransitionsReturnedObjects

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > September 2007 > CHALLENGE org.apache.jdo.tck.lifecycle.StateTransitionsReturnedObjects





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author CHALLENGE org.apache.jdo.tck.lifecycle.StateTransitionsReturnedObjects
Ilan Kirsh

2007-09-25, 1:11 pm

Hi,

This is also known as JDO-513 and JDO-514 in the issue tracker.

JDO-513:

StateTransitionsReturnedObjects fails with:

junit.framework.AssertionFailedError:
Assertions A5.9-1 through A5.5.8 (serialization, detachment, attachment)
failed:
StateTransitionsReturnedObjects: optimistic transaction; current state
detached-clean
makePersistent returned instance in invalid state hollow; expected state
persistent-clean

It seems that in optimistic transaction the object state should be
persistent non transactional rather than persistent clean.

JDO-514:

StateTransitionsReturnedObjects fails with:

Assertions A5.9-1 through A5.5.8 (serialization, detachment, attachment)
failed:
StateTransitionsReturnedObjects: no transaction; current state
persistent-nontransactional-dirty
serialize outside tx; unexpected exception caught:
com.objectdb.jdo._JDOUserException: Attempt to modify an object with no
active transaction when NontransactionalWrite is disabled:
org.apache.jdo.tck.pc.lifecycle.StateTransitionObj#3
FailedObject:org.apache.jdo.tck.pc.lifecycle.StateTransitionObj@701a27

It seems that StateTransitionsReturnedObjects assumes non transactional
write enabled by default.
Checking if the implementation supports non transactional write is
insufficient (when it is not the default setting).

An explicit:
pm.currentTransaction().setNontransactionalWrite(true);
is needed in getPersistentNontransactionalDirtyInstan
ce, before:
obj.writeField(10000);

Regards,

Ilan Kirsh
ObjectDB Software
http://www.objectdb.com



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com