Skip to content
Permalink
Browse files
BATCHEE-114 make Contexts Typed etc
  • Loading branch information
struberg committed Dec 21, 2016
1 parent 1a6634f commit 1a3cfd9f5c882fda9b6970a0af7b6e024a04665a
Showing 4 changed files with 10 additions and 0 deletions.
@@ -23,7 +23,10 @@
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicInteger;

import javax.enterprise.inject.Typed;


@Typed
public class JobContextImpl extends BaseContext {

private ConcurrentMap<Long, AtomicInteger> jobReferences = new ConcurrentHashMap<Long, AtomicInteger>();
@@ -20,6 +20,9 @@

import java.lang.annotation.Annotation;

import javax.enterprise.inject.Typed;

@Typed
public class StepContextImpl extends BaseContext {

private ThreadLocal<Long> currentStepContext = new ThreadLocal<Long>();
@@ -19,10 +19,12 @@
import org.apache.batchee.cdi.impl.BatchEEScopeExtension;

import javax.batch.api.listener.JobListener;
import javax.enterprise.context.Dependent;
import javax.inject.Inject;
import javax.inject.Named;

@Named
@Dependent
public class AfterJobScopeListener implements JobListener {

private @Inject BatchEEScopeExtension scopeExtension;
@@ -20,10 +20,12 @@

import javax.batch.api.listener.JobListener;
import javax.batch.runtime.context.JobContext;
import javax.enterprise.context.Dependent;
import javax.inject.Inject;
import javax.inject.Named;

@Named
@Dependent
public class BeforeJobScopeListener implements JobListener {

private @Inject JobContext jobContext;

0 comments on commit 1a3cfd9

Please sign in to comment.