Author: manik.surtani(a)jboss.com
Date: 2008-04-22 20:06:30 -0400 (Tue, 22 Apr 2008)
New Revision: 5634
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java
Log:
Fixed replication queue handling
Modified: core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java 2008-04-22
23:56:54 UTC (rev 5633)
+++
core/trunk/src/main/java/org/jboss/cache/commands/remote/ReplicateCommand.java 2008-04-23
00:06:30 UTC (rev 5634)
@@ -80,15 +80,22 @@
{
if (trace) log.trace("Invoking command " + cacheCommand + ", with
originLocal flag set to false.");
- Object retVal = invoker.invokeRemote(cacheCommand);
- // we only need to return values for a set of remote calls; not every call.
- if (returnValueForRemoteCall(cacheCommand))
+ if (cacheCommand instanceof DirectCommand)
{
- result = retVal;
+ result = ((DirectCommand) cacheCommand).performDirectly();
}
else
{
- result = null;
+ Object retVal = invoker.invokeRemote(cacheCommand);
+ // we only need to return values for a set of remote calls; not every call.
+ if (returnValueForRemoteCall(cacheCommand))
+ {
+ result = retVal;
+ }
+ else
+ {
+ result = null;
+ }
}
}
catch (Throwable ex)
Show replies by date