-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
According to the EJB3 Specification:
=====================================================================================================================
If the bean class has superclasses, the following additional rules apply.
• A transaction attribute specified on a superclass S applies to the business methods defined by S. If a class-level transaction attribute is not specified on S, it is equivalent to specification of TransactionAttribute(REQUIRED) on S.
• A transaction attribute may be specified on a business method M defined by class S to override for method M the transaction attribute value explicitly or implicitly specified on the class S.
• If a method M of class S overrides a business method defined by a superclass of S, the transaction attribute of M is determined by the above rules as applied to class S.
13.3.7.2 Specification of Transaction Attributes in the Deployment Descriptor
The following is the description of the rules for the specification of transaction attributes in the deployment descriptor. (See Section 19.5 for the complete syntax of the deployment descriptor.)
Note that even in the absence of the use of annotations, it is not necessary to explicitly specify transaction attributes for all of the methods listed in section 13.3.7. If a transaction attribute is not specified for a method in an EJB 3.0 deployment descriptor, the transaction attribute defaults to Required.
If the deployment descriptor is used to override annotations, and transaction attributes are not specified for some methods, the values specified in annotations (whether explicit or defaulted) will apply for those methods.
=====================================================================================================================
The issue is :
1 . When I take the test of a SLSB which has a superclass and its transaction attribute is set to NEVER, I always get the method call in transaction attribute is set to REQUIRED(see the follow code for details).
2 . When I deploy an empty ejb-jar.xml and jboss.xml to META-INF directory, the SLSB's transaction attribute is set to SUPPORTS/NOT_SUPPORTED/NEVER.
PS:I using the EntityManager's persist method call for checking current method call is associated with a transaction.
- duplicates
-
AS7-899 Class hierarchy is not taken into account when determining transaction attributes
- Resolved
- relates to
-
EJBTHREE-2120 Tx logic doesn't take method-intf type into acount
- Closed