Hi Stéphane and thanks for the report. First, let's look at your example.
- fireEvent() fires an event but the notification is deferred until the transaction completes successfully
- during javax.transaction.Synchronization.afterCompletion(int) the onEvent() observer is invoked and because it's annotated with @Transactional a new transaction should exist for this notification only
- but then Weld attempts to notify the observer again and yields IllegalAccessError and this should not happen
Would it be possible to share the source of your TransactionServices, UserTransaction and transactional interceptor? It's hard to guess without the context.
The synchronization observer is set when an event is fired
Which part of the code do you have in mind? |