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

  • Spring Batch Integration samples

    Hi,

    I have been exploring the batch and integration projects and it seems to be just what I wanted for our project. I have written some integration configs to load files. How do I get to fire a batch job from batch integration?

    I have been reading the spring-batch-integration page at http://static.springsource.org/sprin...ion/index.html, however cannot find any sample code.

    Are there any samples out there?

    Thanks

  • #2
    u can use the https://github.com/SpringSource/spring-batch-admin
    from http://static.springsource.org/sprin...epository.html and have a look at https://github.com/SpringSource/spri...gration/launch

    If you are going to be deploying spring-batch-admin you can use its json api

    Comment


    • #3
      Hi anshumania,

      Thanks for the reply. I have had a look at the batch admin before. I will be using the batch admin eventually but right now just wanted to get the batch and integration working together. I thought spring-batch-integration project was meant for that. I have configured my batch jobs and I have configured my integration jobs. Just wanted to integrate both together now.

      Comment


      • #4
        are spring-batch and spring-integration going to be in the same jvm ?
        then add the spring-batch-admin-manager jar as a dependency to your pom and send the job request params as a string to the StringToJobLaunchRequestAdapter and then feed it to the JobLaunchingMessageHandler which references your configured jobLauncher
        Code:
        <int:service-activator input-channel="job-launches"	output-channel="batchJobRequests">
        <bean	class="org.springframework.batch.admin.integration.StringToJobLaunchRequestAdapter">
        <property name="jobLocator" ref="jobRegistry" />
        </bean>
        </int:service-activator>
        
        <int:service-activator input-channel="batchJobRequests">
        <bean class="org.springframework.batch.integration.launch.JobLaunchingMessageHandler"><constructor-arg ref="jobLauncher" /></bean>
        </int:service-activator>
        Have a look at http://blog.springsource.com/2010/02...g-integration/ for other possibilities.

        HTH

        Comment

        Working...
        X