Announcement Announcement Module
No announcement yet.
how can I trigger a job out of transaction? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • how can I trigger a job out of transaction?

    Hello, I want to trigger some jobs after the transaction is commited, how I can do?

    I try to use StepListenerSupport to do this, but all the after methods will be called before the transaction is committed except the afterStep method. But if I use afterStep method to trigger my job, it will be triggered once but not be triggered after each commit cycle.

    Can spring batch provide other approach to handle this case?
    Last edited by hhc_gz; Nov 27th, 2008, 01:00 AM.

  • #2
    It seems like you should be using some kind of scheduler to solve this.


    • #3
      Scheduler? Can you give me more info for this?


      • #4
        You want to launch a job after every commit? And block until it finishes (preventing the driver step from proceeding)? I suppose you could use a transactional ChunkListener with Propagation.REQUIRES_NEW?


        • #5
          Did I say REQUIRES_NEW? I meant NOT_SUPPORTED. Still not sure why you would want to do that though.