Announcement Announcement Module
Collapse
No announcement yet.
MessageBuilder with int-file:inbound-channel-adapter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • MessageBuilder with int-file:inbound-channel-adapter

    Hallo,

    I would like to generate a jobLaunchRequest Message in xml.
    I found (in soring Batch in action book) this code:

    Message<JobLaunchRequest> msg = MessageBuilder
    .withPayload(jobLaunchRequest).build();
    MessageChannel jobRequestsChannel = ctx.getBean(
    "job-requests",MessageChannel.class);
    jobRequestsChannel.send(msg);

    But i would like to configure it directly in xml. I woul like to lauch the jobs as soon a a file is found and process the file.
    Is this possible ?

    tnx

    ticino

  • #2
    Look at the sample app in Spring Batch Admin - it has a file poller that triggers a job launch. You can declare it in XML, but you still need a transformer to create the JobLaunchRequest (or similar).

    Comment


    • #3
      Yes, that's what i done after some tries.
      Poll a file, and then used a tranformer to generate a JobLauchRequest. Here http://forum.springsource.org/showth...dling-Messages you can see how i done it.
      Thanks for the reply anyway, is really an amazing framework.

      Comment

      Working...
      X