[jboss-jira] [JBoss JIRA] Updated: (EJBTHREE-2070) PostConstruct (and PreDestroy) of a singleton bean don't run in a transaction context
Carlo de Wolf (JIRA)
jira-events at lists.jboss.org
Fri Dec 17 05:37:18 EST 2010
[ https://issues.jboss.org/browse/EJBTHREE-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carlo de Wolf updated EJBTHREE-2070:
------------------------------------
Priority: Critical (was: Major)
> PostConstruct (and PreDestroy) of a singleton bean don't run in a transaction context
> --------------------------------------------------------------------------------------
>
> Key: EJBTHREE-2070
> URL: https://issues.jboss.org/browse/EJBTHREE-2070
> Project: EJB 3.0
> Issue Type: Bug
> Components: singleton
> Affects Versions: EJB3_1 1.0.7
> Reporter: jaikiran pai
> Assignee: Carlo de Wolf
> Priority: Critical
> Fix For: EJB 3.1
>
>
> The EJB3.1 spec states:
> 4.8.3 Transaction Semantics of Initialization and Destruction
> PostConstruct and PreDestroy methods of Singletons with container-managed transactions are transac-
> tional. From the bean developer's view there is no client of a PostConstruct or PreDestroy method.
> A PostConstruct or PreDestroy method of a Singleton with container-managed transactions has transac-
> tion attribute REQUIRED, REQUIRES_NEW, or NOT_SUPPORTED (Required , RequiresNew, or
> NotSupported if the deployment descriptor is used to specify the transaction attribute).
> Note that the container must start a new transaction if the REQUIRED (Required) transaction
> attribute is used. This guarantees, for example, that the transactional behavior of the PostConstruct
> method is the same regardless of whether it is initialized eagerly at container startup time or as a side
> effect of a first client invocation on the Singleton. The REQUIRED transaction attribute value is
> allowed so that specification of a transaction attribute for the Singleton PostConstruct/PreDestroy
> methods can be defaulted.
> However, the current implementation of singleton (1.0.0-alpha-2) does *not* run the postconstruct and predestroy methods in a transaction context.
--
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