public final class LocalTxUtil
extends Object
本地事务工具类
- Since:
- 3.5.0
- Author:
- TaoYu
-
Constructor Summary
Constructors
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
LocalTxUtil
public LocalTxUtil()
-
Method Details
-
randomUUID
public static UUID randomUUID()
随机生成UUID
- Returns:
- UUID
-
startTransaction
public static String startTransaction()
手动开启事务
- Returns:
- 事务ID
-
commit
手动提交事务
- Parameters:
xid - 事务ID
- Throws:
Exception
-
rollback
手动回滚事务
- Parameters:
xid - 事务ID
- Throws:
Exception