Package org.jbpm.tx

Examples of org.jbpm.tx.TxService


  /**
   * mark this transaction for rollback only in the persistence service. The {@link #close()} operation will then perform a rollback.
   */
  public void setRollbackOnly()
  {
    TxService txService = (services != null ? services.getTxService() : null);
    if (txService != null)
    {
      txService.setRollbackOnly();
    }
    else
    {
      throw new JbpmException("no transaction service configured");
    }
View Full Code Here


                }
                jbpmContext.getSession().flush() ;
            }
            finally
            {
                final TxService txService = jbpmContext.getServices().getTxService() ;
                final boolean exceptionExpected = txService.isRollbackOnly() ;
                try
                {
                    jbpmContext.close() ;
                }
                catch (final JbpmException je)
View Full Code Here

  /**
   * mark this transaction for rollback only in the persistence service.
   * The {@link #close()} operation will then perform a rollback.
   */
  public void setRollbackOnly() {
    TxService txService = (services!=null ? services.getTxService() : null);
    if (txService!=null) {
      txService.setRollbackOnly();
    } else {
      throw new JbpmException("no transaction service configured");
    }
  }
View Full Code Here

  }

  public void close() {
    log.debug("closing jcr session");
   
    TxService txService = (services!=null ? services.getTxService() : null);
    if (txService!=null) {
      if (txService.isRollbackOnly()) {
        log.debug("refreshing jcr session because tx service is marked with rollback-only");
        try {
          session.refresh(false);
        } catch (Exception e) {
          // NOTE that Error's are not caught because that might halt the JVM and mask the original Error.
View Full Code Here

  /**
   * @deprecated use {@link org.jbpm.tx.TxService} instead.
   */
  public boolean isRollbackOnly() {
    TxService txService = (services!=null ? services.getTxService() : null);
    if (txService==null) {
      throw new JbpmException("no jbpm tx service configured");
    }
    return txService.isRollbackOnly();
  }
View Full Code Here

  }
  /**
   * @deprecated use {@link org.jbpm.tx.TxService} instead.
   */
  public void setRollbackOnly() {
    TxService txService = (services!=null ? services.getTxService() : null);
    if (txService==null) {
      throw new JbpmException("no jbpm tx service configured");
    }
    txService.setRollbackOnly();
  }
View Full Code Here

  /**
   * mark this transaction for rollback only in the persistence service.
   * The {@link #close()} operation will then perform a rollback.
   */
  public void setRollbackOnly() {
    TxService txService = (services!=null ? services.getTxService() : null);
    if (txService!=null) {
      txService.setRollbackOnly();
    } else {
      throw new JbpmException("no transaction service configured");
    }
  }
View Full Code Here

  /**
   * @deprecated use {@link org.jbpm.tx.TxService} instead.
   */
  public boolean isRollbackOnly() {
    TxService txService = (services!=null ? services.getTxService() : null);
    if (txService==null) {
      throw new JbpmException("no jbpm tx service configured");
    }
    return txService.isRollbackOnly();
  }
View Full Code Here

  }
  /**
   * @deprecated use {@link org.jbpm.tx.TxService} instead.
   */
  public void setRollbackOnly() {
    TxService txService = (services!=null ? services.getTxService() : null);
    if (txService==null) {
      throw new JbpmException("no jbpm tx service configured");
    }
    txService.setRollbackOnly();
  }
View Full Code Here

TOP

Related Classes of org.jbpm.tx.TxService

Copyright © 2018 www.massapicom. 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.