读书人

说说ejb的事宜传播机制

发布时间: 2012-08-29 08:40:14 作者: rapoo

说说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

读书人网 >软件架构设计

热点推荐