I call asynchronus transactional method and observe transaction commit event. Method ends sucessfuly, but instead of execution onTransactionCommit method i receive:
WELD-000401 Failure while notifying an observer of event
JBoss EAP 6.4.0.GA (AS 7.5.0.Final)
Hire is my code template:
public class WeldExceptionProblemTest {
@Asynchronous
public void asynchMethod() {
}
public void onTransactionCommit(@Observes(during = TransactionPhase.AFTER_COMPLETION) TestEvent event) {
}
private class TestEvent {
}
}
Use try...catch(RuntimeException) block inside asynchMethod. I had an exception there.