In short... I have the following case:
@Stateless
@Local(A.class)
@TransactionAttribute(TransactionAttributeType.MANDATORY)
Class A{
...
}
@Stateless
@Local({ B.class })
@Specializes
@TransactionAttribute(TransactionAttributeType.REQUIRED)
Class B extends A{
...
}
The annotation @TransactionAttribute(TransactionAttributeType.REQUIRED)
is not applied to the methods of the class B. Those methods do not override methods of class A and they are public and are being called from the client.
IMHO this should work but it doesn't. It seems the TransactionAttribute annotation is taken from the class A and it seems the only way to set the REQUIRED
transaction type, is to put the annotation at method level . Why
is that?
UPDATE: I also noticed that not even the same (in my case MANDATORY) transaction attribute works.
Thanks!