public class DefaultTransaction extends java.lang.Object implements Transaction
限定符和类型 | 字段和说明 |
---|---|
protected java.sql.Connection |
connection |
protected javax.sql.DataSource |
dataSource |
protected java.lang.Integer |
isolationLevel |
protected TransactionManager |
manager |
构造器和说明 |
---|
DefaultTransaction(java.lang.Integer isolationLevel,
javax.sql.DataSource dataSource,
TransactionManager manager) |
限定符和类型 | 方法和说明 |
---|---|
protected void |
clear() |
void |
close()
关闭事务
|
void |
commit()
提交事务
|
java.sql.Connection |
getConnection()
获取连接对象
|
java.lang.Integer |
getIsolationLevel()
获取事务级别
|
void |
rollback()
回滚事务
|
protected java.sql.Connection connection
protected final javax.sql.DataSource dataSource
protected final java.lang.Integer isolationLevel
protected final TransactionManager manager
public DefaultTransaction(java.lang.Integer isolationLevel, javax.sql.DataSource dataSource, TransactionManager manager)
public java.lang.Integer getIsolationLevel()
Transaction
getIsolationLevel
在接口中 Transaction
public void commit()
Transaction
commit
在接口中 Transaction
public void rollback()
Transaction
rollback
在接口中 Transaction
public void close()
Transaction
close
在接口中 java.lang.AutoCloseable
close
在接口中 Transaction
protected void clear()
public java.sql.Connection getConnection() throws java.sql.SQLException
Transaction
getConnection
在接口中 Transaction
java.sql.SQLException