-
Nov 26th, 2008, 07:27 AM
#1
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 at 01:00 AM.
-
Nov 26th, 2008, 04:28 PM
#2
It seems like you should be using some kind of scheduler to solve this.
-
Nov 27th, 2008, 01:04 AM
#3
Scheduler? Can you give me more info for this?
-
Nov 27th, 2008, 02:37 AM
#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?
-
Nov 28th, 2008, 02:11 AM
#5
Did I say REQUIRES_NEW? I meant NOT_SUPPORTED. Still not sure why you would want to do that though.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules