posted 18 years ago
Spec section 7.6.1 pg 79-81 and 17.6.5 pg 363-364.
Although the spec never comes out completely and says it, it looks like 'meaningful transaction context' includes:
- transactions created via container-managed transaction demarcation
- transactions created via bean-managed transaction demarcation
- methods executed in an unspecified transaction context
When reading HFE I started thinking that anything not in the first 2 categories was thus in the 3rd category, but in going through the spec I've concluded that doesn't add up. The spec seems to specifically single out some methods as executing in an unspecified transaction context to give the container vendor free reign as to how they'll deal with transactionality. There are other methods that lack a transaction context entirely (like the no-arg constructor for a bean, or setSessionContext), and those are the methods that can't access a resource manager.
Reid - SCJP2 (April 2002)