You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by jo...@apache.org on 2006/02/05 23:15:28 UTC

svn commit: r375119 - /jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java

Author: joerg
Date: Sun Feb  5 14:15:26 2006
New Revision: 375119

URL: http://svn.apache.org/viewcvs?rev=375119&view=rev
Log:
a bit of clean up

Modified:
    jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java

Modified: jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java?rev=375119&r1=375118&r2=375119&view=diff
==============================================================================
--- jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java (original)
+++ jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java Sun Feb  5 14:15:26 2006
@@ -687,7 +687,7 @@
             context.isLightWeight = true;
             // XXX higher isolation might be needed to make sure upgrade to commit lock always works
             context.isolationLevel = ISOLATION_LEVEL_READ_COMMITTED;
-//            context.isolationLevel = ISOLATION_LEVEL_REPEATABLE_READ;
+            // context.isolationLevel = ISOLATION_LEVEL_REPEATABLE_READ;
             globalTransactions.put(txId, context);
         }
 
@@ -780,12 +780,6 @@
         }
     }
 
-    /*
-     * --- public methods of interface StreamableResourceManager ---
-     *
-     *  
-     */
-
     public InputStream readResource(Object resourceId) throws ResourceManagerException {
         // create temporary light weight tx
         Object txId;
@@ -797,7 +791,7 @@
             context.isLightWeight = true;
             // XXX higher isolation might be needed to make sure upgrade to commit lock always works
             context.isolationLevel = ISOLATION_LEVEL_READ_COMMITTED;
-//            context.isolationLevel = ISOLATION_LEVEL_REPEATABLE_READ;
+            // context.isolationLevel = ISOLATION_LEVEL_REPEATABLE_READ;
             globalTransactions.put(txId, context);
         }
 
@@ -833,9 +827,6 @@
         lockResource(resourceId, txId, false);
 
         String resourcePath = getPathForWrite(txId, resourceId);
-        if (resourcePath == null) {
-            throw new ResourceManagerException("No such resource at '" + resourceId + "'", ERR_NO_SUCH_RESOURCE, txId);
-        }
 
         File file = new File(resourcePath);
         try {
@@ -1056,7 +1047,7 @@
         String txChangePath = getChangePath(txId, resourceId);
         String txDeletePath = getDeletePath(txId, resourceId);
 
-        // now, this is gets bit complicated:
+        // now, this gets a bit complicated:
 
         boolean changeExists = FileHelper.fileExists(txChangePath);
         boolean deleteExists = FileHelper.fileExists(txDeletePath);
@@ -1090,7 +1081,7 @@
 
         if (changeExists) {
             return txChangePath;
-        } else if ((mainExists && !deleteExists)) {
+        } else if (mainExists && !deleteExists) {
             return mainPath;
         } else {
             return null;
@@ -1607,5 +1598,7 @@
             return is.markSupported();
 
         }
+
     }
+
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org