[
https://issues.jboss.org/browse/CDI-219?page=com.atlassian.jira.plugin.sy...
]
Joe Bergmark commented on CDI-219:
----------------------------------
Sorry for not being very clean on my (1).
What I meant was the treatment we have @PostConstruct was for it to always be active
during @PostConstruct for basically any bean. We didn't specify @Singleton or @Remote
etc. If we did the same for @PreDestroy, we could end up in a situation where some
Request Context is ending, which causes @PreDestroy to be called for a request scoped
bean, and a new request context to be created which feels a bit strange to me.
Support Request Scope for EJB @Singleton @PostConstruct methods
---------------------------------------------------------------
Key: CDI-219
URL:
https://issues.jboss.org/browse/CDI-219
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Contexts, Java EE integration
Affects Versions: 1.0
Reporter: Guido Bonazza
Assignee: Joe Bergmark
Fix For: 1.1.PRD
A Request context should be available in @PostConstruct methods of EJB Singletons.
This is a completion of section 6.7.1 of the CDI 1.0 spec, which covers @Asynchronous and
@Timeout EJB methods.
Probably the container should ensure that a new context is always created for the
@PostConstruct invocation, to be coherent with section 4.8.3 of the EJB 3.1 spec, which
specifies the transactional behavior of @Singleton @PostConstruct.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira