batchee-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Struberg (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BATCHEE-35) add a CDI scope which spans a split execution
Date Mon, 05 May 2014 11:45:15 GMT

    [ https://issues.apache.org/jira/browse/BATCHEE-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989432#comment-13989432
] 

Mark Struberg commented on BATCHEE-35:
--------------------------------------

I'll sum up:

@StepScoped: 1 per step. If the step is executed in parallel via e.g. 10 Partitions, then
they share the same contextual instance.
@RequestScoped: 1 per 'Request' (==Thread). But if 3 Flow Steps get executed on the same thread,
then they will share the same Contextual Instance.

So what we miss is something like @PartitionScoped which is 1 Contextual Instance per Step
or Batchlet Partition.

> add a CDI scope which spans a split execution
> ---------------------------------------------
>
>                 Key: BATCHEE-35
>                 URL: https://issues.apache.org/jira/browse/BATCHEE-35
>             Project: BatchEE
>          Issue Type: New Feature
>          Components: batchee-extensions
>    Affects Versions: 0.2-incubating
>            Reporter: Mark Struberg
>
> We have @StepScoped, @JobScoped and from CDI itself we have @RequestScoped.
> If a Step gets executed in form of a Split, then we have multiple Threads running the
same Step. How do we account for that? A @StepScoped is too 'wide'.
> A @RequestScoped could probably work, but is there any chance that multiple steps use
the same thread without exiting them between two steps? 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message