方法
|
TransactionAttribute可以使用的值
|
message-driven bean's message listener methods
| REQUIRED NOT_SUPPORTED |
EJB's timeout callback methods | REQUIRED REQUIRED_NEW
NOT_SUPPORTED
|
EJB's asynchronous business methods | REQUIRED |
singleton session bean's PostConstruct/PreDestroy lifecycle callbak interceptor methods | REQUIRED REQUIRED_NEW NOT_SUPPORTED |
If a EJB implements the javax.ejb.SessionSynchronization interfaces or uses at least one of the session synchronization annotations | REQUIRED REQUIRED_NEW MADATORY |
對於一個類別的方法所設定的transaction屬性,可以對於類別或該類別中處理商業邏輯的方法,或者兩者一起的方式來定義。
摘錄自EJB3.1 spec,p.359-360