[
https://issues.apache.org/jira/browse/DELTASPIKE-745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14179804#comment-14179804
]
Mark Struberg commented on DELTASPIKE-745:
------------------------------------------
Hi John, txs for reviewing it.
I'm just having a hard time deciding how we like
startContext(SessionScoped.class) to behave.
Currently this is not defined at all and some containers share the
'dummysession' over n threads, others create a dummysession for each thread.
In hindsight of e.g. Batches, unit tests, quartz jobs, etc which can run in
parallel I tend more to say we shall give each thread it's own dummySession.
Wdyt?
At the end we might end up expanding our ContextControl API with a few more
methods:
* either a SessionHandler interface which might be used as callback
* a separate Object parameter for startContext and stopContext (which might
contain a real Session or a MockSession or just a String, depending on the
environment). That would allow us to explicitly define which threads would
share the same dummySession.
* separate methods to set up the various ThreadLocals to a certain thread.
All this is needed IF we like to have multiple Threads be able to share a
dummySession. Thus I guess we like to cut down and really create an own
dummySession for each thread for now. Additional ideas and thoughts are HIGHLY
welcome. We could also do a hangout...
> cdictr-weld ContextControl.startContext doesn't properly start RequestScoped
> context
> ------------------------------------------------------------------------------------
>
> Key: DELTASPIKE-745
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-745
> Project: DeltaSpike
> Issue Type: Bug
> Components: CdiControl
> Affects Versions: 1.0.3
> Reporter: Mark Struberg
> Assignee: Mark Struberg
> Priority: Minor
> Fix For: 1.0.4
>
>
> I added a multi threading test into our TCK to check if
> ContextControl#startContext works properly even for new threads.
> But this blows up with a ContextNotActiveException deep inside Weld.
> I need some help from Weld guys to check what we do wrong.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)