Announcement Announcement Module
No announcement yet.
Spring Batch in Websphere Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Batch in Websphere

    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);, jobParams);
    long endTime = System.currentTimeMillis();

    The problem is the 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.


  • #2
    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.