[cdi-dev] Support Request (and Conversation?) Scope in @Singleton @Startup @PostConstruct methods
Pete Muir
pmuir at redhat.com
Tue Mar 6 04:30:35 EST 2012
Please file a CDI issue :-)
On 2 Mar 2012, at 13:36, Guido Bonazza wrote:
> Hello everyone!
> Checking out the CDI 1.0 spec and actually trying it on JBoss AS 7.1.0.Final it seems to me that the Request Scope is not active in @Singleton @Startup @PostConstruct method, so I'd like to propose this use case to be supported in the next version of CDI.
> Moreover, quoting https://issues.jboss.org/browse/CDI-148 ("There is no reason why the ConversationScope should be any less available than the RequestScope"), I think that conversation scope should be available too in this context. It would be very useful, for example, when you have an EntityManager produced in conversation scope (mostly used in JSF contexts), to be allowed to use it @Singleton @Startup @PostConstruct methods.
> Of course there should be some limitations in this case (long running conversation promotion shouldn't be allowed for example), but the basic case should be supported in my opinion.
>
> Thanks for the attention,
> Guido
>
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
More information about the cdi-dev
mailing list