Results 1 to 2 of 2

Thread: Spring Batch in Websphere

Hybrid View

  1. #1
    Join Date
    Apr 2010
    Posts
    3

    Default Spring Batch in Websphere

    Hi,
    We are developing a poc for executing springbatch in a websphere environment. We currently have the code in jse using spring batch. This is also a prototype. We want to execute this in websphere for various reasons. At this client, the client does not want us to integrate any scheduling tool.

    Here is what I have done.
    1. I have created a spring mvc project and in the controller I have this piece of code.

    ------------------------------------
    JobParameter jobParameter = new JobParameter(new Date());
    Map<String, JobParameter> myParams = new HashMap<String, JobParameter>();
    myParams.put("jobStartDate", jobParameter);
    JobParameters jobParams = new JobParameters(myParams);

    long startTime = System.currentTimeMillis();
    logger.debug("DEBUG-Adarsh: startTime:" + startTime);
    jobLauncher.run(postingTCJob, jobParams);
    long endTime = System.currentTimeMillis();
    -------------------------------------

    The problem is the jobLauncher.run passes control to the Itemreader which uses the JDBCCursorItemReader and executes the sql specified in property. WE have also specified a rowMapper property specified for the itemreader. The control does not go to the class defined by the rowMapper property.

    Any ideas or help will be really appreciated. We are using using default TaskExecutor i.e. SyncTaskExecutor. Since this is a POC, we don't mind extending the http timeout as we are measuring the performance in websphere vs standalone springbatch.

    Thanks,
    Adarsh

  2. #2
    Join Date
    Apr 2010
    Posts
    3

    Default

    The issue was the step id was not unique. Moreover log4j is not working with spring batch in websphere and so we were not able to debug without putting System.out statements.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •