[
https://issues.apache.org/jira/browse/DELTASPIKE-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17123701#comment-17123701
]
Mark Struberg commented on DELTASPIKE-1410:
-------------------------------------------
Hi!
passing Request Context objects to another thread is problematic.
The main problem is that any {{@RequestScoped}} object is guaranteed to be only
accessed from a single thread at a time. But if you have concurrent threads,
then this guarantee cannot be fulfilled.
Often you also do not want to propagate all RequestScoped Contextual Instances
but only a few certain ones. Like the current User etc.
> Support for CdiAwareExecutorService
> -----------------------------------
>
> Key: DELTASPIKE-1410
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1410
> Project: DeltaSpike
> Issue Type: New Feature
> Security Level: public(Regular issues)
> Components: Core
> Reporter: Syed Shah
> Priority: Trivial
>
> Not sure if this is appropriate for the DeltaSpike project, but it'd be
> helpful if DeltaSpike provided a CdiAwareExecutorService that could
> automatically propagate the current request context down to any runnables
> passed down to spawned threads.
> Is this something that could be added?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)