BeanTest icon indicating copy to clipboard operation
BeanTest copied to clipboard

TransactionalInterceptor should be executed around other interceptors

Open agori opened this issue 11 years ago • 4 comments

EJB interceptors of a transactional EJB bean should be executed inside the same transaction of the intercepted bean. In BeanTest this doesn't happen because it seems that the TransactionalInterceptor is executed before application specific interceptors.

If the application specific interceptor works with the EntityManager, you get

javax.persistence.TransactionRequiredException: no transaction is in progress

agori avatar May 29 '14 07:05 agori

We need to take a look at this. Maybe we need global interceptors to achieve this functionality.

carlosbarragan avatar Jun 02 '14 11:06 carlosbarragan

@carlosbarragan a word and a blow :wink: Please have a look in #10.

qaiser42 avatar Nov 02 '14 09:11 qaiser42

This commit fixes the reported problem but opens another one: @ExcludeClassInterceptors is no more working and I suspect that per method EJB interceptors are not working as well.Thanks to the Murphy's Law, I have both ;)

agori avatar Nov 10 '14 08:11 agori

Hi @agori, thx for your fast feedback :) I will asap fix my shortcomings.

qaiser42 avatar Nov 10 '14 17:11 qaiser42