Package javax.batch.runtime.context

Examples of javax.batch.runtime.context.StepContext


    when(propertyContext.getStepProperties("step3")).thenReturn(props);

    StepSynchronizationManager.register(new StepExecution("step3", new JobExecution(5L), 3L));

    StepContext context1 = factory.getObject();
    StepContext context2 = factory.getObject();

    assertTrue(context1 == context2);
    assertEquals(3L, context1.getStepExecutionId());
    assertEquals("value1", context1.getProperties().get("key1"));
View Full Code Here


        @Override
        public StepContext call() throws Exception {
          try {
            StepSynchronizationManager.register(new StepExecution("step" + count, new JobExecution(count)));
            StepContext context = factory.getObject();
            Thread.sleep(1000L);
            return context;
          } catch (Throwable ignore) {
            return null;
          }finally {
View Full Code Here

        @Override
        public StepContext call() throws Exception {
          try {
            StepSynchronizationManager.register(new StepExecution("step" + count, new JobExecution(count)));
            StepContext context = factory.getObject();
            Thread.sleep(1000L);
            return context;
          } catch (Throwable ignore) {
            return null;
          }finally {
View Full Code Here

    if(curStepExecution == null) {
      throw new FactoryBeanNotInitializedException("A StepExecution is required");
    }

    StepContext context = contextHolder.get();

    // If the current context applies to the current step, use it
    if(context != null && context.getStepExecutionId() == curStepExecution.getId()) {
      return context;
    }

    Properties stepProperties = batchPropertyContext.getStepProperties(curStepExecution.getStepName());
View Full Code Here

TOP

Related Classes of javax.batch.runtime.context.StepContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.