java ee - Does CDI @Transactional REQUIRES_NEW works in local methods -
does cdi @transactional(transactional.txtype.requires_new) works when called inside same bean:
@transactional public void method1() { for(...) { method2(); } } @transactional(transactional.txtype.requires_new) public void method2() { ... }
i suppose doesn't works because local calls can't intercepted proxy. in case recommeded usage pattern if want manage each call of method2 in new transaction. obvious 1 create bean, it's don't like.
interception of local method calls not work cdi , cannot inject class directly (cyclic dependency). see cdi call interceptor annotated method within same instance
the self injection issue still open, see https://issues.jboss.org/browse/cdi-414
Comments
Post a Comment