我有bean管理的事務無狀態Bean和方法是這樣的:UserTransaction如何傳播?
@Stateless
@TransactionManagement(TransactionManagementType.BEAN)
public class ... {
@Resource
private UserTransaction ut;
@EJB
private OtherStatelessBeanLocal other;
public void invokeSomeMethods()
ut.begin();
...
// invoke other bean's methods here.
other.method();
...
ut.commit();
}
}
那麼如何UserTransaction
傳播到OtherStatelessBeanLocal
豆?
好它沒有,對吧? – 2014-11-11 22:32:17