db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r231225 - in /incubator/jdo/trunk/runtime20/src/java/org/apache/jdo: impl/pm/PersistenceManagerFactoryImpl.java impl/pm/PersistenceManagerImpl.java pm/PersistenceManagerInternal.java
Date Wed, 10 Aug 2005 13:12:33 GMT
Author: mbo
Date: Wed Aug 10 06:12:24 2005
New Revision: 231225

URL: http://svn.apache.org/viewcvs?rev=231225&view=rev
Log:
Added method to set pm local store manager to PMInternal and PMImpl; Implemented PMF.isClosed

Modified:
    incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerFactoryImpl.java
    incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java
    incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/pm/PersistenceManagerInternal.java

Modified: incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerFactoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerFactoryImpl.java?rev=231225&r1=231224&r2=231225&view=diff
==============================================================================
--- incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerFactoryImpl.java
(original)
+++ incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerFactoryImpl.java
Wed Aug 10 06:12:24 2005
@@ -1696,8 +1696,9 @@
      * @since 2.0
      */
     public boolean isClosed() {
-        throw new UnsupportedOperationException(
-            "Method isClosed() is not yet implemented.");
+        synchronized(closeLock) {
+            return closed;
+        }
     }
 
     /** Assert that this PersistenceManagerFactory is not closed.  This

Modified: incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java?rev=231225&r1=231224&r2=231225&view=diff
==============================================================================
--- incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java
(original)
+++ incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/impl/pm/PersistenceManagerImpl.java
Wed Aug 10 06:12:24 2005
@@ -103,6 +103,11 @@
     private CacheManagerImpl _txCache = null;
 
     /**
+     * Reference to the StoreManager
+     */
+    private StoreManager _storeManager = null;
+    
+    /**
      * Flag for Query. 
      * Constructor defaults it to the PMF setting.
      */
@@ -1532,10 +1537,19 @@
     }
 
     /**
-    * @see org.apache.jdo.pm.PersistenceManagerInternal#getStoreManager()
-    */
+     * @see org.apache.jdo.pm.PersistenceManagerInternal#getStoreManager()
+     */
     public StoreManager getStoreManager() {
-        return pmf.getStoreManager(this);
+        return (_storeManager != null) ? _storeManager : 
+            pmf.getStoreManager(this);
+    }
+
+    /**
+     * @see org.apache.jdo.pm.PersistenceManagerInternal#setStoreManager(StoreManager)
+     */
+    public void setStoreManager(StoreManager storeManager) {
+        _storeManager = storeManager;
+        
     }
 
     //

Modified: incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/pm/PersistenceManagerInternal.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/pm/PersistenceManagerInternal.java?rev=231225&r1=231224&r2=231225&view=diff
==============================================================================
--- incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/pm/PersistenceManagerInternal.java
(original)
+++ incubator/jdo/trunk/runtime20/src/java/org/apache/jdo/pm/PersistenceManagerInternal.java
Wed Aug 10 06:12:24 2005
@@ -52,6 +52,14 @@
     public StoreManager getStoreManager();
 
     /**
+     * Sets a StoreManager that is ready to accept operations on it such
+     * as insert, etc.
+     * @param storeManager the StoreManager to be used by this
+     * PersistenceManager
+     */
+    public void setStoreManager(StoreManager storeManager);
+
+    /**
     * Provides a StateManagerInternal for the given Object Id.
     * @param oid the given Object Id.
     * @param pcClass Class of a PersistenceCapable instance to be created



Mime
View raw message