Index: trunk/api20/src/java/javax/jdo/PersistenceManager.java =================================================================== --- trunk/api20/src/java/javax/jdo/PersistenceManager.java (revision 290837) +++ trunk/api20/src/java/javax/jdo/PersistenceManager.java (working copy) @@ -694,6 +694,35 @@ * @return the ignoreCache setting. */ boolean getIgnoreCache(); + + /** Gets the detachAllOnCommit setting. + * @see #setDetachAllOnCommit(boolean) + * @since 2.0 + * @return the detachAllOnCommit setting. + */ + boolean getDetachAllOnCommit(); + + /** Sets the detachAllOnCommit setting. + * + *
DetachAllOnCommit set to false specifies that the
+ * state of persistent instances in the cache after commit is defined
+ * by the retainValues flag. With this flag set to true,
+ * during beforeCompletion all cached instances are prepared for
+ * detachment according to the fetch plan in effect at commit. Loading
+ * fields and unloading fields required by the fetch plan is done after
+ * calling the user's beforeCompletion callback. During
+ * afterCompletion, before calling the user's
+ * afterCompletion callback, all detachable persistent
+ * instances in the cache transition to detached; non-detachable
+ * persistent instances transition to transient; and detachable
+ * instances can be serialized as detached instances. Transient
+ * transactional instances are unaffected by this flag.
+ *
+ * @see #getDetachAllOnCommit(boolean)
+ * @since 2.0
+ */
+ void setDetachAllOnCommit(boolean flag);
+
/**
* Detach the specified object from the PersistenceManager.
* @param pc the instance to detach
Index: trunk/api20/src/java/javax/jdo/PersistenceManagerFactory.java
===================================================================
--- trunk/api20/src/java/javax/jdo/PersistenceManagerFactory.java (revision 290837)
+++ trunk/api20/src/java/javax/jdo/PersistenceManagerFactory.java (working copy)
@@ -311,7 +311,22 @@
*/
boolean getIgnoreCache ();
- /** Return non-configurable properties of this PersistenceManagerFactory.
+ /** Gets the detachAllOnCommit setting.
+ * @see #setDetachAllOnCommit(boolean)
+ * @since 2.0
+ * @return the default detachAllOnCommit setting.
+ */
+ boolean getDetachAllOnCommit();
+
+ /** Sets the default detachAllOnCommit setting for all
+ * PersistenceMmanager instances obtained from this
+ * factory.
+ * @see #getDetachAllOnCommit(boolean)
+ * @since 2.0
+ */
+ void setDetachAllOnCommit(boolean flag);
+
+ /** Return non-configurable properties of this PersistenceManagerFactory.
* Properties with keys VendorName and VersionNumber are required. Other
* keys are optional.
* @return the non-configurable properties of this