coreRuntime/src/sc/sync/SyncManager.java
public static RemoteResult invokeRemoteDest(ScopeDefinition def, ScopeContext scopeCtx, String destName, String syncGroup, Object obj, Object type, String methName, Object retType, String paramSig, Object...args) {
      SyncManager mgr = getSyncManager(destName);
      int scopeId;
      SyncContext ctx = null;
      if (scopeCtx == null) {
         if (def == null && obj != null) {
            scopeId = getScopeIdForSyncInst(obj);
            if (scopeId == -1)
               scopeId = GlobalScopeDefinition.getGlobalScopeDefinition().scopeId;
         }
         else if (def != null)
            scopeId = def.scopeId;
         else
            scopeId = GlobalScopeDefinition.getGlobalScopeDefinition().scopeId;

         ctx = mgr == null ? SyncManager.getDefaultSyncContext() : mgr.getSyncContext(scopeId, true);
      }
      else {
         if (mgr == null)
            mgr = SyncManager.getDefaultSyncManager();
         ctx = mgr.getSyncContextFromScopeContext(scopeCtx, true);
      }
      if (ctx == null) {
         throw new IllegalArgumentException("No SyncContext for scope ctx: " + scopeCtx);
      }
      return ctx.invokeRemote(syncGroup, obj, type, methName, retType, paramSig, args);
   }
/**
    * Called either with a scopeDefinition (to choose the current context in that scope), or an explicit ScopeContext as the target of the call,
    * or pass null for both to choose the default scope, default context.
    */
Called either with a scopeDefinition (to choose the current context in that scope), or an explicit ScopeContext as the target of the call,
or pass null for both to choose the default scope, default context.
Called either with a scopeDefinition ( to choose the current context in that scope ) or an explicit ScopeContext as the target of the call or pass null for both to choose the default scope default context .
public static RemoteResult invokeRemoteDest(ScopeDefinition def, ScopeContext scopeCtx, String destName, String syncGroup, Object obj, Object type, String methName, Object retType, String paramSig, Object...args) {
      SyncManager mgr = getSyncManager(destName);
      int scopeId;
      SyncContext ctx = null;
      if (scopeCtx == null) {
         if (def == null && obj != null) {
            scopeId = getScopeIdForSyncInst(obj);
            if (scopeId == -1)
               scopeId = GlobalScopeDefinition.getGlobalScopeDefinition().scopeId;
         }
         else if (def != null)
            scopeId = def.scopeId;
         else
            scopeId = GlobalScopeDefinition.getGlobalScopeDefinition().scopeId;
         ctx = mgr == null ? SyncManager.getDefaultSyncContext() : mgr.getSyncContext(scopeId, true);
      }
      else {
         if (mgr == null)
            mgr = SyncManager.getDefaultSyncManager();
         ctx = mgr.getSyncContextFromScopeContext(scopeCtx, true);
      }
      if (ctx == null) {
         throw new IllegalArgumentException("No SyncContext for scope ctx: " + scopeCtx);
      }
      return ctx.invokeRemote(syncGroup, obj, type, methName, retType, paramSig, args);
   }
public static RemoteResult invokeRemoteDest ( ScopeDefinition def , ScopeContext scopeCtx , String destName , String syncGroup , Object obj , Object type , String methName , Object retType , String paramSig , Object ... args ) { SyncManager mgr = getSyncManager ( destName ) ; int scopeId ; SyncContext ctx = null ; if ( scopeCtx == null ) { if ( def == null && obj != null ) { scopeId = getScopeIdForSyncInst ( obj ) ; if ( scopeId == - 1 ) scopeId = GlobalScopeDefinition . getGlobalScopeDefinition ( ) . scopeId ; } else if ( def != null ) scopeId = def . scopeId ; else scopeId = GlobalScopeDefinition . getGlobalScopeDefinition ( ) . scopeId ; ctx = mgr == null ? SyncManager . getDefaultSyncContext ( ) : mgr . getSyncContext ( scopeId , true ) ; } else { if ( mgr == null ) mgr = SyncManager . getDefaultSyncManager ( ) ; ctx = mgr . getSyncContextFromScopeContext ( scopeCtx , true ) ; } if ( ctx == null ) { throw new IllegalArgumentException ( "No SyncContext for scope ctx: " + scopeCtx ) ; } return ctx . invokeRemote ( syncGroup , obj , type , methName , retType , paramSig , args ) ; }
Called either with a scopeDefinition (to choose the current context in that scope), or an explicit ScopeContext as the target of the call,
 or pass null for both to choose the default scope, default context.
Called either with a scopeDefinition ( to choose the current context in that scope ) or an explicit ScopeContext as the target of the call or pass null for both to choose the default scope default context .