用户事务如何传播?
我有一个具有bean管理事务的无状态bean,以及一个如下方法:
@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