zoukankan      html  css  js  c++  java
  • DefaultTransactionStatus源码

    package org.springframework.transaction.support;
    
    import org.springframework.transaction.NestedTransactionNotSupportedException;
    import org.springframework.transaction.SavepointManager;
    
    public class DefaultTransactionStatus extends AbstractTransactionStatus
    {
      private final Object transaction;
      private final boolean newTransaction;
      private final boolean newSynchronization;
      private final boolean readOnly;
      private final boolean debug;
      private final Object suspendedResources;
    
      public DefaultTransactionStatus(Object transaction, boolean newTransaction, 
          boolean newSynchronization, boolean readOnly, boolean debug, Object suspendedResources) { this.transaction = transaction; this.newTransaction = newTransaction; this.newSynchronization = newSynchronization; this.readOnly = readOnly; this.debug = debug; this.suspendedResources = suspendedResources; } public Object getTransaction() { return this.transaction; } public boolean hasTransaction() { return this.transaction != null; } public boolean isNewTransaction() { return (hasTransaction()) && (this.newTransaction); } public boolean isNewSynchronization() { return this.newSynchronization; } public boolean isReadOnly() { return this.readOnly; } public boolean isDebug() { return this.debug; } public Object getSuspendedResources() { return this.suspendedResources; } public boolean isGlobalRollbackOnly() { return ((this.transaction instanceof SmartTransactionObject)) && (((SmartTransactionObject)this.transaction).isRollbackOnly()); } protected SavepointManager getSavepointManager() { if (!isTransactionSavepointManager()) { throw new NestedTransactionNotSupportedException("Transaction object [" + getTransaction() + "] does not support savepoints"); } return (SavepointManager)getTransaction(); } public boolean isTransactionSavepointManager() { return getTransaction() instanceof SavepointManager; } }
  • 相关阅读:
    做一个项目什么最重要(代码部分最多占40%)
    二叉树遍历:已知前序和中序,求后序
    [每日一题] OCP1z0-047 :2013-08-24 FLASHBACK—TABLE/PRIMARY KEY(FOREIGN KEY?)......98
    商业价值:苹果iTV,再一次改变世界?
    Nginx负载均衡简易方法
    Qt之设置窗口背景
    python mongodb ubuntu
    生物-生理-衰老:百科
    C#基础:线程之异步回调(委托)
    C#:同步调用、异步调用、异步回调
  • 原文地址:https://www.cnblogs.com/shaohz2014/p/3716633.html
Copyright © 2011-2022 走看看