Uploaded image for project: 'Spring Batch'
  1. Spring Batch
  2. BATCH-1668

Check for existing transaction when job is started (and fail if present by default)

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 2.1.5
    • Fix Version/s: 2.1.6
    • Component/s: Core
    • Labels:
      None

      Description

      I have a suspicion that this may be configuration related, but the outcome is certainly something I'd consider a bug...

      This is in a JTA context, and I'm assuming that this is relevant...

      I have a batch job which integration testing with 3 items, and a chunk size of 2.

      The first chunk is processed, and then I get a deadlock at semaphore.acquire() at TaskletStep.java:390

      The reason for this, is that afterCompletion() hasn't been called, because the transaction didn't commit, because it wasn't a new one.

      Seems to me that if this is a configuration issue, then I shouldn't be able to create this scenario...

      Does Spring Batch really intend to move on to the next chunk at this point?

        Attachments

          Activity

            People

            • Assignee:
              david_syer Dave Syer
              Reporter:
              nealeu Neale Upstone
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: