Does CDI @Transactional(Transactional.TxType.REQUIRES_NEW) works when is called inside the same bean:
@Transactional
public void method1() {
for(...) {
method2();
}
}
@Transactional(Transactional.TxType.REQUIRES_NEW)
public void method2() {
...
}
I suppose it doesn't works because local calls can't be intercepted by the proxy. In that case what is the recommeded usage pattern if I want to manage each call of method2 in a new transaction. The obvious one is to create another bean, but it's something I don't like.