[cdi-dev] concurrecy utilities 4 EE and cdi scopes
Martin Kouba
mkouba at redhat.com
Tue Jun 18 04:55:19 EDT 2013
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
>
More information about the cdi-dev
mailing list