[jboss-jira] [JBoss JIRA] Issue Comment Edited: (EJBTHREE-2236) NullPointerException in CMTTxInterceptor.mandatory() method when invoked on a lifecycle callback method
Carlo de Wolf (JIRA)
jira-events at lists.jboss.org
Tue Feb 1 04:50:39 EST 2011
[ https://issues.jboss.org/browse/EJBTHREE-2236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12579273#comment-12579273 ]
Carlo de Wolf edited comment on EJBTHREE-2236 at 2/1/11 4:49 AM:
-----------------------------------------------------------------
There is more subtlety to this bug:
EJB 3.1 FR 13.3.7 Specification of the Transaction Attributes for a Bean’s Methods
...
- a singleton session bean’s PostConstruct/PreDestroy lifecycle callback interceptor
methods
...
- For a singleton session bean’s PostConstruct/PreDestroy lifecycle callback interceptor meth-
ods, only the REQUIRED, REQUIRES_NEW, and NOT_SUPPORTED transaction attributes may be
used.
So a lifecycle callback running through 'mandatory' is something that should never happen.
See also EJB 3.1 FR 4.8.3. Specifying 'MANDATORY' on a lifecycle callback for a singleton is actually illegal.
The real bug is that tx attributes are not properly resolved, similar to EJBTHREE-2120.
was (Author: wolfc):
There is more subtlety to this bug:
EJB 3.1 FR 13.3.7 Specification of the Transaction Attributes for a Bean’s Methods
...
- a singleton session bean’s PostConstruct/PreDestroy lifecycle callback interceptor
methods
...
For a singleton session bean’s PostConstruct/PreDestroy lifecycle callback interceptor meth-
ods, only the REQUIRED, REQUIRES_NEW, and NOT_SUPPORTED transaction attributes may be
used.
So a lifecycle callback running through 'mandatory' is something that should never happen.
See also EJB 3.1 FR 4.8.3. Specifying 'MANDATORY' on a lifecycle callback for a singleton is actually illegal.
The real bug is that tx attributes are not properly resolved, similar to EJBTHREE-2120.
> NullPointerException in CMTTxInterceptor.mandatory() method when invoked on a lifecycle callback method
> -------------------------------------------------------------------------------------------------------
>
> Key: EJBTHREE-2236
> URL: https://issues.jboss.org/browse/EJBTHREE-2236
> Project: EJB 3.0
> Issue Type: Bug
> Components: transactions
> Environment: Apple Mac OS X, JBossAS 6.0.0.Final
> Reporter: Vidas .
> Assignee: jaikiran pai
> Fix For: depchain-1.0.0-alpha-44
>
>
> JBoss fails to call @PreDestroy lifecycle method, annotated with transaction attribute REQUIRES_NEW, while @Singleton bean is annotated with transaction attribute MANDATORY.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list