Results 1 to 4 of 4

Thread: Spring Batch Integration samples

  1. #1
    Join Date
    Jun 2011
    Location
    Sydney, Australia
    Posts
    32

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

    Default

    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

  3. #3
    Join Date
    Jun 2011
    Location
    Sydney, Australia
    Posts
    32

    Default

    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.

  4. #4

    Default

    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

Posting Permissions

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