`
x_root
  • 浏览: 125223 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

说说ejb的事务传播机制

    博客分类:
  • Java
EJB 
阅读更多
说说ejb的事务传播机制
1、MANDATORY
Support a current transaction; throw an exception if no current transaction exists.
就是说支持当前的事务,如果当前没有事务,则会抛出一个异常;

2、REQUIRED
Support a current transaction; create a new one if none exists.
支持当前事务,如果当前没有事务,则创建一个新的事务;

3、REQUIRES_NEW
Create a new transaction, suspending the current transaction if one exists.
支持当前事务,如果当前有事务,则挂起当前事务,并创建一个新的事务;

4、SUPPORTS
Support a current transaction; execute non-transactionally if none exists.
支持当前事务,如果当前事务不存在,则以非事务的方式运行;

5、NOT_SUPPORTED
Do not support a current transaction; rather always execute non-transactionally.
不支持当前事务,总是以非事务的方式运行;

6、NEVER
Do not support a current transaction; throw an exception if a current transaction
不支持当前事务,如果当前存在事务,则抛出异常;
分享到:
评论
1 楼 x_root 2011-07-08  
javax.ejb.TransactionAttributeType

相关推荐

Global site tag (gtag.js) - Google Analytics