I am trying to understand what is the difference in behavior when applying transaction annotation to class vs. method (and at the property level even?). Does anyone have a solid connection for this, or maybe even catch these differences succinctly for me?
The hundreds of links I found regarding these annotations seem to discuss how to use them in configuration files rather than in the source. And in the rare case when the mention of them in the source is even mentioned, it is very worried.
Here is a concrete example of what I mean by class level:
@TransactionAttribute(TransactionAttributeType.REQUIRED) public class MyKickAssClass { }
and its associated method level:
public class MyOtherKickAssClass { @TransactionAttribute(TransactionAttributeType.REQUIRED) public void entryPointMethod() {
I can guess what this behavior is in these cases, but finding concrete explanations and examples was a headache.
We use JBoss.
Thanks in advance.
source share