[jboss-cvs] JBossCache/src/org/jboss/cache ...
Manik Surtani
manik at jboss.org
Wed May 23 14:44:56 EDT 2007
User: msurtani
Date: 07/05/23 14:44:56
Modified: src/org/jboss/cache CacheImpl.java
Log:
BR method opts
Revision Changes Path
1.75 +18 -44 JBossCache/src/org/jboss/cache/CacheImpl.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheImpl.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/CacheImpl.java,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -b -r1.74 -r1.75
--- CacheImpl.java 23 May 2007 15:22:05 -0000 1.74
+++ CacheImpl.java 23 May 2007 18:44:55 -0000 1.75
@@ -2817,59 +2817,28 @@
public void _remoteAssignToBuddyGroup(BuddyGroup group, Map<Fqn, byte[]> state) throws Exception
{
- InvocationContext ctx = getInvocationContext();
- try
- {
- // these are remote calls and as such, should have their origins marked as remote.
- ctx.setOriginLocal(false);
if (buddyManager != null)
buddyManager.handleAssignToBuddyGroup(group, state);
else if (log.isWarnEnabled())
log.warn("Received assignToBuddyGroup call from group owner [" + group.getDataOwner() + "] but buddy replication is not enabled on this node!");
}
- finally
- {
- ctx.setOriginLocal(true);
- }
-
- }
public void _remoteRemoveFromBuddyGroup(String groupName) throws BuddyNotInitException
{
- InvocationContext ctx = getInvocationContext();
- try
- {
- // these are remote calls and as such, should have their origins marked as remote.
- ctx.setOriginLocal(false);
if (buddyManager != null)
buddyManager.handleRemoveFromBuddyGroup(groupName);
else if (log.isWarnEnabled())
log.warn("Received removeFromBuddyGroup call for group name [" + groupName + "] but buddy replication is not enabled on this node!");
- }
- finally
- {
- ctx.setOriginLocal(true);
- }
}
public void _remoteAnnounceBuddyPoolName(Address address, String buddyPoolName)
{
- InvocationContext ctx = getInvocationContext();
- try
- {
- // these are remote calls and as such, should have their origins marked as remote.
- ctx.setOriginLocal(false);
if (buddyManager != null)
buddyManager.handlePoolNameBroadcast(address, buddyPoolName);
else if (log.isWarnEnabled())
log.warn("Received annouceBuddyPoolName call from [" + address + "] but buddy replication is not enabled on this node!");
}
- finally
- {
- ctx.setOriginLocal(true);
- }
- }
public void _dataGravitationCleanup(GlobalTransaction gtx, Fqn primary, Fqn backup) throws Exception
{
@@ -3732,6 +3701,10 @@
* Invokes a method against this object. Contains the logger_ic for handling
* the various use cases, e.g. mode (local, repl_async, repl_sync),
* transaction (yes or no) and locking (yes or no).
+ * <p/>
+ * Only sets originLocal on the invocation context IF this is explicitly passed in as <tt>false</tt>
+ * If passed in as <tt>true</tt> then it is not set; but whatever default exists in the invocation
+ * context is used. For example, it may be set prior to calling invokeMethod()
*/
protected Object invokeMethod(MethodCall m, boolean originLocal) throws CacheException
{
@@ -3741,7 +3714,8 @@
try
{
ctx.setMethodCall(m);
- ctx.setOriginLocal(originLocal);
+ // only set this if originLocal is EXPLICITLY passed in as FALSE. Otherwise leave it as a default.
+ if (!originLocal) ctx.setOriginLocal(false);
return interceptor_chain.invoke(ctx);
}
catch (CacheException e)
More information about the jboss-cvs-commits
mailing list