JBAS014279: Invalid transaction attribute type REQUIRED on SFSB lifecyle method Method ... after applying JBoss EAP 6.4 CP17
Environment
Red Hat JBoss Enterprise Application Platform 6.4 CP17
Issue
We are seeing this warning logged when we deploy our EJB2 style Stateful EJB after applying Cumulative Patch (CP) 17
EJB 2 deployment that does not specify transaction attribute for lifecycle methods such as: ejbActivate, ejbRemove, ejbPassivate are logging this warning.
WARN [org.jboss.as.ejb3] (ServerService Thread Pool -- 50) JBAS014279: Invalid transaction attribute type REQUIRED on SFSB lifecyle method Method ejbRemove(), valid types are REQUIRES_NEW and NOT_SUPPORTED. Method will be treated as NOT_SUPPORTED.
WARN [org.jboss.as.ejb3] (ServerService Thread Pool -- 50) JBAS014279: Invalid transaction attribute type REQUIRED on SFSB lifecyle method Method ejbPassivate(), valid types are REQUIRES_NEW and NOT_SUPPORTED. Method will be treated as NOT_SUPPORTED.
WARN [org.jboss.as.ejb3] (ServerService Thread Pool -- 50) JBAS014279: Invalid transaction attribute type REQUIRED on SFSB lifecyle method Method ejbActivate(), valid types are REQUIRES_NEW and NOT_SUPPORTED. Method will be treated as NOT_SUPPORTED.
Resolution
The issue will be fixed in the next available cumulative patch CP19
As the warning only occurs on the lifecycle meethods ejbRemove, ejbPassivate, ejbActivate there is likely no negative effect of the warning.
A workaround is to explicit set the lifecycle methods to RequiresNew or NotSupported in the ejb-jar.xml for example:
<container-transaction>
<method>
<ejb-name>StatefulBean</ejb-name>
<method-name>ejbRemove</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>StatefulBean</ejb-name>
<method-name>ejbPassivate</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>StatefulBean</ejb-name>
<method-name>ejbActivate</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
Root Cause
This bug This content is not included.Wrong Transaction behaviour for EJBs if JTS is enabled was fixed in CP17 but had an unintended consequence of causing This content is not included.Default SFSB Lifecycle methods transaction attribute causing warnings
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.