[jboss-cvs] JBossAS SVN: r99004 - branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/file.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jan 4 14:46:15 EST 2010


Author: bstansberry at jboss.com
Date: 2010-01-04 14:46:14 -0500 (Mon, 04 Jan 2010)
New Revision: 99004

Modified:
   branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/file/AddContentStreamAction.java
Log:
[JBPAPP-3328] Farming's AddContentStreamAction should not close stream

Modified: branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/file/AddContentStreamAction.java
===================================================================
--- branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/file/AddContentStreamAction.java	2010-01-04 19:42:47 UTC (rev 99003)
+++ branches/JBPAPP_5_0/system/src/main/org/jboss/system/server/profileservice/repository/clustered/local/file/AddContentStreamAction.java	2010-01-04 19:46:14 UTC (rev 99004)
@@ -105,97 +105,6 @@
       return log;
    }
 
-   @Override
-   protected void doCancel()
-   {
-      try
-      {
-         super.doCancel();
-      }
-      finally
-      {
-         safeCloseStream();
-      }
-   }
-
-   @Override
-   protected void doCommit()
-   {
-      try
-      {
-         super.doCommit();
-      }
-      finally
-      {
-         safeCloseStream();
-      }
-   }
-
-   @Override
-   protected void doComplete() throws Exception
-   {
-      try
-      {
-         super.doComplete();
-      }
-      finally
-      {
-         safeCloseStream();
-      }
-   }
-
-   @Override
-   protected boolean doPrepare()
-   {
-      try
-      {
-         return super.doPrepare();
-      }
-      finally
-      {
-         safeCloseStream();
-      }
-   }
-
-   @Override
-   protected void doRollbackFromCancelled()
-   {
-      try
-      {
-         super.doRollbackFromCancelled();
-      }
-      finally
-      {
-         safeCloseStream();
-      }
-   }
-
-   @Override
-   protected void doRollbackFromOpen()
-   {
-      try
-      {
-         super.doRollbackFromOpen();
-      }
-      finally
-      {
-         safeCloseStream();
-      }
-   }
-
-   @Override
-   protected void doRollbackFromRollbackOnly()
-   {
-      try
-      {
-         super.doRollbackFromRollbackOnly();
-      }
-      finally
-      {
-         safeCloseStream();
-      }
-   }
-
    private synchronized InputStream getInputStream() throws IOException
    {
       State s = getState();
@@ -205,22 +114,5 @@
       }
       return stream;
    }
-   
-   private synchronized void safeCloseStream()
-   {
-      synchronized (stream)
-      {
-         try
-         {
-            stream.close();
-         }
-         catch (IOException e)
-         {
-            ContentModification mod = getRepositoryContentModification();
-            log.debug("Caught exception closing stream for " + mod.getRootName() + 
-                  " " + mod.getItem().getRelativePath(), e);
-         }
-      }
-   }
 
 }




More information about the jboss-cvs-commits mailing list