Package org.openbp.server.context

Examples of org.openbp.server.context.TokenContextService.saveContext()


        case ControlLink.TA_COMMIT_BEGIN:
        begin = true;
        // Fallthrough

        case ControlLink.TA_COMMIT:
        contextService.saveContext(context);
        engine.commit();
        break;

        case ControlLink.TA_ROLLBACK_BEGIN:
        begin = true;
View Full Code Here


      {
        // There is a suspension request for the next transaction control, serve it.
        LogUtil.trace(getClass(), "Suspending token (transaction suspend). [{0}]", context);

        engine.changeTokenState(context, LifecycleState.SUSPENDED, LifecycleRequest.NONE);
        contextService.saveContext(context);
        engine.commit();
      }
    }

    if (context.getCurrentSocket() == oldCurrentSocket)
View Full Code Here

    Object contextId = context.getId();
    engine.rollback();

    context = contextService.getContextById(contextId);
    engine.changeTokenState(context, lifecycleState, LifecycleRequest.NONE);
    contextService.saveContext(context);
    engine.commit();

    // TODO Fix 3 What to do with child/root context? Maybe call endToken with a parameter?
  }
View Full Code Here

    {
      // Our top-level context ends here (and will implicitely end all child contexts)
      rootContext.setLifecycleRequest(LifecycleRequest.STOP);

      TokenContextService contextService = getEngine().getTokenContextService();
      contextService.saveContext(rootContext);
    }
  }
}
View Full Code Here

        // Continue the parent context in a new thread
        parentContext.setCurrentSocket(parentNextSocket);
        parentContext.setLifecycleRequest(LifecycleRequest.RESUME);

        TokenContextService contextService = getEngine().getTokenContextService();
        contextService.saveContext(parentContext);
      }
    }
    else
    {
      nextSocket = node.getDefaultExitSocket();
View Full Code Here

      }
    }

    if (updateContext)
    {
      contextService.saveContext(dbContext);
      if (isCommitTokenContextChangesEnabled())
      {
        engine.commit();
      }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.