[jboss-cvs] JBossAS SVN: r97715 - in trunk: testsuite and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Dec 10 23:22:31 EST 2009


Author: bstansberry at jboss.com
Date: 2009-12-10 23:22:31 -0500 (Thu, 10 Dec 2009)
New Revision: 97715

Modified:
   trunk/cluster/src/main/java/org/jboss/profileservice/cluster/repository/DefaultRepositoryClusteringHandler.java
   trunk/testsuite/build.xml
Log:
[JBAS-7102] Send file chunks async

Modified: trunk/cluster/src/main/java/org/jboss/profileservice/cluster/repository/DefaultRepositoryClusteringHandler.java
===================================================================
--- trunk/cluster/src/main/java/org/jboss/profileservice/cluster/repository/DefaultRepositoryClusteringHandler.java	2009-12-11 03:13:08 UTC (rev 97714)
+++ trunk/cluster/src/main/java/org/jboss/profileservice/cluster/repository/DefaultRepositoryClusteringHandler.java	2009-12-11 04:22:31 UTC (rev 97715)
@@ -516,7 +516,7 @@
             {
                throw (NotSynchronizedException) rsp;
             }
-            else if (rsp instanceof List)
+            else if (rsp instanceof List<?>)
             {
                @SuppressWarnings("unchecked")
                List<ContentModification> mods = (List<ContentModification>) rsp;
@@ -668,15 +668,15 @@
                throw new RuntimeException("Synchronization " + id + " terminated");
             }
             
-            if (action instanceof SynchronizationReadAction)
+            if (action instanceof SynchronizationReadAction<?>)
             {
                executePush(id, (SynchronizationReadAction<?>) action);
             }
-            else if (action instanceof SynchronizationWriteAction)
+            else if (action instanceof SynchronizationWriteAction<?>)
             {
                executePull(id, (SynchronizationWriteAction<?>) action);
             }
-            else if (action instanceof SynchronizationRemoteAction)
+            else if (action instanceof SynchronizationRemoteAction<?>)
             {
                executeRemoteAction(id, (SynchronizationRemoteAction<?>) action);
             }
@@ -785,17 +785,24 @@
             ByteChunk chunk = action.getNextBytes();
          
             Object[] args = new Object[]{ id, action.getRepositoryContentModification().getItem(), chunk};
-            List<?> rsps = this.partition.callMethodOnCluster(getServiceHAName(), "pushBytes", args, PUSH_BYTES_TYPES, true);
-            for (Object rsp : rsps)
+            if (chunk.getByteCount() > -1)
             {
-               if (rsp instanceof NotSynchronizedException)
+               this.partition.callAsynchMethodOnCluster(getServiceHAName(), "pushBytes", args, PUSH_BYTES_TYPES, true);
+            }
+            else
+            {
+               List<?> rsps = this.partition.callMethodOnCluster(getServiceHAName(), "pushBytes", args, PUSH_BYTES_TYPES, true);
+               for (Object rsp : rsps)
                {
-                  continue;
+                  if (rsp instanceof NotSynchronizedException)
+                  {
+                     continue;
+                  }
+                  else if (rsp instanceof Throwable)
+                  {
+                     rethrowAsException((Throwable) rsp);
+                  }
                }
-               else if (rsp instanceof Throwable)
-               {
-                  rethrowAsException((Throwable) rsp);
-               }
             }
             lastRead = chunk.getByteCount();
          }

Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml	2009-12-11 03:13:08 UTC (rev 97714)
+++ trunk/testsuite/build.xml	2009-12-11 04:22:31 UTC (rev 97715)
@@ -1158,8 +1158,9 @@
    	<exclude name="org/jboss/test/classloader/leak/test/AopPreparedClassesClassloaderLeakUnitTestCase.class" if="sun-vm"/>
    	<exclude name="org/jboss/test/cluster/classloader/leak/test/*Field*TestCase.class" if="sun-vm"/>
    	
-   	<!-- The FarmedClusterHugeDeploymentUnitTestCase will fail on slaves with inadequate network buffers  -->
+   	<!-- The FarmedClusterHugeDeploymentUnitTestCase will fail on slaves with inadequate network buffers
       <exclude name="org/jboss/test/cluster/defaultcfg/profileservice/test/FarmedClusterHugeDeploymentUnitTestCase.class"/>
+        -->
    </patternset>
 
    <patternset id="aop-with-classloader.excludes">




More information about the jboss-cvs-commits mailing list