db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew T. Adams" <matthew.ad...@xcalia.com>
Subject RE: Detach test case names
Date Wed, 21 Sep 2005 22:10:19 GMT
As I'm currently working on the first assertion in this list (A12.6.8-1), it
looks like the spreadsheet text is outdated -- the property is
DetachAllOnCommit, not DetachOnClose.  I recall EG discussions on
DetachOnClose -- is that still on the table, or is it gone?
 
Regardless of the status of DetachOnClose, the property DetachAllOnCommit is
not present in the source for PersistenceManager.java.  Further, should this
property also be on PersistenceManagerFactory that specifies the default
setting for any PMs obtained from the PMF, similar to other properties?
Attached is the updated PersistenceManager.java patch -- I have commit
priviledges, but I figured I'd send the patch for review before committing
it.  Please object soon if you're going to... :)

--matthew

-----Original Message-----
From: Craig Russell [mailto:Craig.Russell@Sun.COM] 
Sent: Tuesday, September 20, 2005 3:02 PM
To: jdo-dev@db.apache.org; JDO Expert Group
Subject: Detach test case names


Hi Matthew, 

Here are some test case names for review. This is from the spreadsheet. See
how well it comes out in email.

Craig


A12.6.8-1
We define a new property called DetachOnClose
PersistenceManager.setDetachOnClose(boolean detachOnClose) sets the
DetachOnClose property




no
api/persistencemanager/detach/GetSetDetachOnClose

A12.6.8-2
PersistenceManager.getDetachOnClose() gets the value for the DetachOnClose
property




no
api/persistencemanager/detach/GetSetDetachOnClose

A12.6.8-3
With this flag set to true, after close, the PersistenceManager guarantees
that all persistent instances in the cache behave as detached instances




no
api/persistencemanager/detach/DetachOnCloseCreatesDetachedInstances

A12.6.8-4
can be serialized as detached instances.




no
api/persistencemanager/detach/SerializeCreatesDetachedInstances

A12.6.8-5
restored serialized instances are treated as detached instances.




no
api/persistencemanager/detach/RestoreSerializedInstances

A12.6.8-9
The order of instances in the parameter Collection's iteration corresponds
to the order of corresponding instances in the returned Collection's
iteration.




no
api/persistencemanager/detach/DetachOrderOfDetachedInstances

A12.6.8-10
If a detachCopy method is called with an active transaction, the parameter
Collection of instances is first made persistent, and the reachability
algorithm is run on the instances




no
api/persistencemanager/detach/DetachReachabilityOfDetachedInstances

A12.6.8-11
If a detachCopy method is called outside an active transaction, the
reachability algorithm will not be run; if any transient instances are
reachable via persistent fields, a JDOUserException is thrown for each
persistent instance containing such fields.




no
api/persistencemanager/detach/DetachTransientInstancesOutsideTransactionThro
wsException

A12.6.8-12
If a detachCopy method is called outside an active transaction, the
NontransactionalRead property must be true or JDOUserException is thrown.




no
api/persistencemanager/detach/DetachOutsideTransactionRequiresNontransaction
alRead

A12.6.8-13
For each instance in the parameter Collection, a corresponding detached copy
is created.




no
api/persistencemanager/detach/DetachCreatesCopies

A12.6.8-14
If there are duplicates in the parameter Collection, the corresponding
detached copy is used for each such duplicate.




no
api/persistencemanager/detach/DetachDuplicatesCreatesSingleInstance

A12.6.8-15
Instances in the persistent-new and persistent-dirty state are updated with
their object identity and version




no
api/persistencemanager/detach/DetachNewAndDirtyInstancesAreUpdated

A12.6.8-16
If instances in a deleted state (either persistent-deleted or
persistent-new-deleted) are attempted to be detached, a JDOUserException is
thrown with nested JDOUserExceptions, one for each such instance.




no
api/persistencemanager/detach/DetachDeletedInstancesThrowsException

A12.6.8-17
All fields outside the FetchPlan in the detached instances are set to the
Java language default value for the type of the field.




no
api/persistencemanager/detach/DetachedUnloadedFieldsHaveDefaultValues

A12.6.8-18
Fields in the FetchPlan of primitive and wrapper types are set to their
values from the datastore




no
api/persistencemanager/detach/DetachFieldsLoadedFromDatabase

A12.6.8-19
Fields of references to persistence-capable types are set to the detached
copy corresponding to the persistent instance.




no
api/persistencemanager/detach/DetachRelationshipsSetToDetachedInstances

A12.6.8-20
Fields of Collections and Maps are set to detached SCO instances containing
references to detached copies corresponding to persistent instances in the
datastore.




no
api/persistencemanager/detach/DetachRelationshipsSetToDetachedInstances

A12.6.8-21
While detached, any field access to a field that was not fetched throws
JDODetachedFieldAccessException.




no
api/persistencemanager/detach/AccessingUnloadedFIeldsThrowsException

A12.6.8-22
Each detached instance has a persistent identity that can be obtained via
the static JDOHelper method getObjectId(Object pc).




no
api/persistencemanager/detach/DetachedInstancesGetObjectId

A12.6.8-23
The version of detached instances can be obtained by the static JDOHelper
method getVersion(Object pc).




no
api/persistencemanager/detach/DetachedInstancesGetObjectId

A12.6.8-24
Each detached instance must be of a class identified in the JDO metadata as
detachable, or a JDOUserException is thrown with a nested JDOUserException
for each such instance.




no
api/persistencemanager/detach/DetachNonDetachableThrowsException

A12.6.8-25
The order of instances in the parameter Collection's iteration corresponds
to the order of corresponding instances in the returned Collection's
iteration.




no
api/persistencemanager/detach/AttachOrderOfDetachedInstances

A12.6.8-26
Changes made to instances while detached are applied to the corresponding
persistent instances in the cache.




no
api/persistencemanager/detach/AttachAppliesChangesToPersistentInstances

A12.6.8-27
New instances associated with the detached instances are added to the
persistent instances in the corresponding place.




no
api/persistencemanager/detach/AttachOrderOfDetachedInstances

A12.6.8-28
If it cannot determine if changes were made, then it must mark the instance
dirty.




no
api/persistencemanager/detach/AttachMarksInstancesDirty

A12.6.8-29
The makeTransactional flag, if set to true, requires the implementation to
mark transactional the persistent instances corresponding to all instances
in the closure of the detached graph.




no
api/persistencemanager/detach/AttachMarksInstancesTransactional

A12.6.8-30
If an instance that is not of a detachable class is attempted to be
attached, a JDOUserException is thrown with a nested JDOUserException for
each such instance.




no
api/persistencemanager/detach/AttachNonDetachableThrowsException





Craig Russell

Architect, Sun Java Enterprise System http://java.sun.com/products/jdo

408 276-5638 mailto:Craig.Russell@sun.com

P.S. A good JDO? O, Gasp!



Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message