Examples of TransactionCallbackWithoutResult


Examples of com.starflow.wf.engine.transaction.TransactionCallbackWithoutResult

  /**
   * {@inheritDoc}
   */
  public void terminateProcess(long processInstId) {
    final ProcessInstance processInstance = procInstRep.findProcessInstance(processInstId);
    transactionTemplate.execute(new TransactionCallbackWithoutResult() {
      @Override
      protected void doInTransactionWithoutResult(TransactionStatus status) {
        EventUtil.publishProcessTerminalEvent(processEngine, processInstance);
      }
    });
View Full Code Here

Examples of com.starflow.wf.engine.transaction.TransactionCallbackWithoutResult

   
    final ProcessInstance processInstance = this.procInstRep.findProcessInstance(workItem.getProcessInstId());
    final ProcessDefine processDefine = this.procDefRep.findProcessDefine(processInstance.getProcessDefId());
    final ActivityElement activityXml = processDefine.getProcessObject().getActivitys().get(activityInst.getActivityDefId());
   
    transactionTemplate.execute(new TransactionCallbackWithoutResult() {
      @Override
      protected void doInTransactionWithoutResult(TransactionStatus status) {
        workItemRep.updateWorkItemStateAndEndTime(workItem.getWorkItemId(), userId, StarFlowState.WORKITEM_COMPLETED, new Date());
       
        //发布环节结束事件
View Full Code Here

Examples of helpers.TransactionCallbackWithoutResult

   
    @Override
    public void doJob() {
        Logger.info("BEGIN JOB JobFetchUserTimeline for member %s", member);
        for (final Account account : accounts) {
            txTemplate.execute(new TransactionCallbackWithoutResult() {
                public void doInTransaction() {
                    StatusActivity.fetchForAccount(account.id);
                }
            });
        }
View Full Code Here

Examples of org.springframework.transaction.support.TransactionCallbackWithoutResult

    final List l = new ArrayList();
    l.add("test");
    assertTrue("Hasn't thread session", !TransactionSynchronizationManager.hasResource(sf));
    assertTrue("JTA synchronizations not active", !TransactionSynchronizationManager.isSynchronizationActive());

    tt.execute(new TransactionCallbackWithoutResult() {
      protected void doInTransactionWithoutResult(TransactionStatus status) {
        assertTrue("Has thread session", TransactionSynchronizationManager.hasResource(sf));
        JcrTemplate template = new JcrTemplate(sf);
        template.save();
      }
View Full Code Here

Examples of org.springframework.transaction.support.TransactionCallbackWithoutResult

    l.add("test");
    assertTrue("Hasn't thread session", !TransactionSynchronizationManager.hasResource(sf));
    assertTrue("JTA synchronizations not active", !TransactionSynchronizationManager.isSynchronizationActive());

    try {
      tt.execute(new TransactionCallbackWithoutResult() {
        protected void doInTransactionWithoutResult(TransactionStatus status) {
          assertTrue("Has thread session", TransactionSynchronizationManager.hasResource(sf));
          JcrTemplate template = new JcrTemplate(sf);
          template.execute(new JcrCallback() {
            public Object doInJcr(Session se) throws RepositoryException {
View Full Code Here

Examples of org.springframework.transaction.support.TransactionCallbackWithoutResult

    final List l = new ArrayList();
    l.add("test");
    assertTrue("Hasn't thread session", !TransactionSynchronizationManager.hasResource(sf));
    assertTrue("JTA synchronizations not active", !TransactionSynchronizationManager.isSynchronizationActive());

    tt.execute(new TransactionCallbackWithoutResult() {
      protected void doInTransactionWithoutResult(TransactionStatus status) {
        assertTrue("Has thread session", TransactionSynchronizationManager.hasResource(sf));
        JcrTemplate template = new JcrTemplate(sf);
        template.execute(new JcrCallback() {
          public Object doInJcr(Session se) throws RepositoryException {
View Full Code Here

Examples of org.springframework.transaction.support.TransactionCallbackWithoutResult

    assertTrue("Hasn't thread session", !TransactionSynchronizationManager.hasResource(sf));
    assertTrue("JTA synchronizations not active", !TransactionSynchronizationManager.isSynchronizationActive());

    tt.setIsolationLevel(TransactionDefinition.ISOLATION_SERIALIZABLE);
    try {
      tt.execute(new TransactionCallbackWithoutResult() {
        protected void doInTransactionWithoutResult(TransactionStatus status) {
          assertTrue("Has thread session", TransactionSynchronizationManager.hasResource(sf));
          JcrTemplate template = new JcrTemplate(sf);
          template.execute(new JcrCallback() {
            public Object doInJcr(Session session) throws RepositoryException {
View Full Code Here

Examples of org.springframework.transaction.support.TransactionCallbackWithoutResult

    UserTxSessionHolder uTx = new UserTxSessionHolder(session);
    TransactionSynchronizationManager.bindResource(sf, uTx);

    assertTrue("Has thread session", TransactionSynchronizationManager.hasResource(sf));

    tt.execute(new TransactionCallbackWithoutResult() {
      protected void doInTransactionWithoutResult(TransactionStatus status) {
        assertTrue("Has thread session", TransactionSynchronizationManager.hasResource(sf));
        JcrTemplate template = new JcrTemplate(sf);
        template.save();
      }
View Full Code Here

Examples of org.springframework.transaction.support.TransactionCallbackWithoutResult

    assertTrue("Has thread session", TransactionSynchronizationManager.hasResource(sf));
    uTx.setRollbackOnly();

    try {
      tt.execute(new TransactionCallbackWithoutResult() {
        protected void doInTransactionWithoutResult(TransactionStatus status) {
          assertTrue("Has thread session", TransactionSynchronizationManager.hasResource(sf));
          JcrTemplate template = new JcrTemplate(sf);
          template.save();
        }
View Full Code Here

Examples of org.springframework.transaction.support.TransactionCallbackWithoutResult

    public void deleteScheduledEvent(final int scheduledEventId) {
        ScheduledEventVO se = getScheduledEvent(scheduledEventId);
        final ExtendedJdbcTemplate ejt2 = ejt;
        if (se != null) {
            getTransactionTemplate().execute(new TransactionCallbackWithoutResult() {
                @Override
                protected void doInTransactionWithoutResult(TransactionStatus status) {
                    ejt2.update("delete from eventHandlers where eventTypeName=? and eventTypeRef1=?", new Object[] {
                            ScheduledEventType.TYPE_NAME, scheduledEventId });
                    ejt2.update("delete from scheduledEvents where id=?", new Object[] { scheduledEventId });
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.