类 TransactionProxy
java.lang.Object
org.anyline.proxy.TransactionProxy
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidcommit(TransactionState state) 提交事务 同时释放连接(发生异常时,不会释放连接)static voidrollback(TransactionState state) 回滚事务 同时释放连接(发生异常时,不会释放连接)static TransactionStatestart()启动事务(默认数据源)static TransactionStatestart(int behavior) 启动事务(默认数据源)static TransactionState启动事务 * @param datasource 数据源 更多参数调用start(String datasource, TransactionDefine define)static TransactionState启动事务static TransactionStatestart(String datasource, TransactionDefine define) 启动事务static TransactionStatestart(TransactionDefine define) 启动事务(默认数据源)
-
构造器详细资料
-
TransactionProxy
public TransactionProxy()
-
-
方法详细资料
-
start
public static TransactionState start(String datasource, TransactionDefine define) throws SQLException 启动事务- 参数:
datasource- 数据源define- 事务定义相关参数- 返回:
- status 回溯或提交时需要
- 抛出:
SQLException
-
start
启动事务- 参数:
datasource- 数据源- 返回:
- behavior 事务传播方式
更多参数调用start(String datasource, TransactionDefine define) - 抛出:
SQLException
-
start
启动事务 * @param datasource 数据源 更多参数调用start(String datasource, TransactionDefine define)- 抛出:
SQLException
-
start
启动事务(默认数据源)- 参数:
define- 事务定义相关参数- 返回:
- status 回溯或提交时需要
- 抛出:
SQLException
-
start
启动事务(默认数据源)- 参数:
behavior- 事务传播方式
更多参数调用start(String datasource, TransactionDefine define)- 返回:
- status 回溯或提交时需要
- 抛出:
SQLException
-
start
启动事务(默认数据源)- 返回:
- status 回溯或提交时需要
- 抛出:
SQLException
-
commit
提交事务 同时释放连接(发生异常时,不会释放连接)- 参数:
state- 启动事务时返回status- 抛出:
Exception- 发生异常时,不会释放连接SQLException
-
rollback
回滚事务 同时释放连接(发生异常时,不会释放连接)- 参数:
state- 启动事务时返回status- 抛出:
Exception- 发生异常时,不会释放连接SQLException
-