[cdi-dev] concurrecy utilities 4 EE and cdi scopes
Romain Manni-Bucau
rmannibucau at gmail.com
Tue Jun 18 05:04:24 EDT 2013
i think/hope it will behave this way excepted thanks to the ContextService
it can be synchronous too but since the context can change you can get
different instances. Would be great to get some really explicit thing about
it IMO.
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*
2013/6/18 Martin Kouba <mkouba at redhat.com>
> I think this is specified in 2.3 Container Thread Context:
> "The types of contexts to be propagated from a contextualizing
> application component include JNDI naming
> context, classloader, and security information. Containers must support
> propagation of these context types. In
> addition, containers can choose to support propagation of other types of
> context."
>
> Furthermore the CDI spec states in 6.7 Context management for built-in
> scopes:
> "The context does not propagate across remote method invocations or to
> asynchronous processes
> such as JMS message listeners or EJB timer service timeouts."
>
> So I don't think any of @RequestScoped, @SessionScoped and
> @ConversationScoped tasks should work... However this would contradict
> the CDI-related section 2.3.2.1, where @RequestScoped CDI beans are not
> recommended but also not forbidden.
>
> Martin
>
> Dne 17.6.2013 16:31, Romain Manni-Bucau napsal(a):
> > Hi guys,
> >
> > reading concurrency utilities i understand the container should
> > propagate the caller "context" (no link with cdi contexts) but it
> > doesn't defined explicitly what it is. So here is the question: are CDI
> > contexts (scopes) included in this "context"? - i think to request,
> > session, conversation scopes in particular.
> >
> > Since you can submit a request scope bean (bad idea but allowed
> > explicitely) i tend to think it should be done but then the request
> > scope is broken (since that's a thread scope by design) so not sure
> > where is the issue if there is one or if i missed something.
> >
> > Any idea?
> >
> > /Romain Manni-Bucau/
> > /Twitter: @rmannibucau <https://twitter.com/rmannibucau>/
> > /Blog: //http://rmannibucau.wordpress.com//
> > /LinkedIn: //_http://fr.linkedin.com/in/rmannibucau_/
> > /Github: https://github.com/rmannibucau/
> >
> >
> >
> > _______________________________________________
> > cdi-dev mailing list
> > cdi-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/cdi-dev
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20130618/122d8db5/attachment.html
More information about the cdi-dev
mailing list