• 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; } }
  • 相关阅读:
    Linux oracle操作
    Job
    Oracle创建表空间和用户并分配权限
    Oracle赋予用户查询另一个用户所有表的权限
    plsql中文乱码解决方案
    PLSQL创建Oracle定时任务,定时执行存储过程
    fcntl函数参数F_GETPIPE_SZ、F_SETPIPE_SZ报错引出的关于linux-specific头文件的使用方法
    从Windows Server 2008 迁移mantis到CentOS 6.8
    从Windows Server 2008 迁移VisualSVN到CentOS 6.8
    CentOS 6.8上开启NFS服务给不同用户使用的曲线设置方法
  • 原文地址:https://www.cnblogs.com/shaohz2014/p/3716633.html
Copyright © 2020-2023  润新知