[jboss-jira] [JBoss JIRA] (WFLY-4127) @TransactionAttribute ignored on SFSB PostConstruct lifecycle callback

Martin Kouba (JIRA) issues at jboss.org
Wed Dec 3 07:23:40 EST 2014


    [ https://issues.jboss.org/browse/WFLY-4127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13024686#comment-13024686 ] 

Martin Kouba commented on WFLY-4127:
------------------------------------

[~swd847] Well, I see no active transaction. But it seems that it's not a regression - changing the default value from REQUIRED to NOT_SUPPORTED just revealed  that {{org.jboss.as.ejb3.component.EJBComponentCreateService}} does not consider non-public lifecycle callback methods when building transaction attributes map and so the default value is applied (it was originally REQUIRED and that's the reason why the TCK test passed before).

See alse EJB 3.2 spec, section 8.3.7 "Specification of the Transaction Attributes for a Bean’s Methods":
{quote}
For a stateful session bean, the transaction attributes are specified for the PostConstruct, PreDestroy, PrePassivate or PostActivate lifecycle callback interceptor methods, if any.
{quote}

And Interceptors 1.2 spec, section 2.6 "Interceptors for Lifecycle Event Callbacks":
{quote}
Lifecycle callback interceptor methods can have public, private, protected, or package level access.
{quote}

Anyway, I'm not also sure whether NOT_SUPPORTED should be the default value for SFSB (see my comment about {{StatefulComponentDescription}} in the description).

> @TransactionAttribute ignored on SFSB PostConstruct lifecycle callback
> ----------------------------------------------------------------------
>
>                 Key: WFLY-4127
>                 URL: https://issues.jboss.org/browse/WFLY-4127
>             Project: WildFly
>          Issue Type: Bug
>          Components: EJB
>            Reporter: Martin Kouba
>            Assignee: Stuart Douglas
>
> This is a regression introduced in this commit:
> https://github.com/wildfly/wildfly/commit/456a624d98eaa5f5fc016ad7520290177e3771f6
> Most probably {{StatefulComponentDescription}} should not pass treatRequiredAsRequiresNew=false to {{org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.Factory}} constructor.
> There is a CDI TCK test which can be used as a reproducer:
> https://github.com/cdi-spec/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/LifecycleCallbackInterceptorTest.java



--
This message was sent by Atlassian JIRA
(v6.3.8#6338)



More information about the jboss-jira mailing list