Announcement Announcement Module
Collapse
No announcement yet.
Semaphore checking in Synchronous job Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Semaphore checking in Synchronous job

    I have a job that runs fine when I run it with the SimpleAsyncTaskExecutor.

    When I run it with a SyncTaskExecutor it fails though because in the TaskletStep on line 405 Spring Batch does a semaphore.acquire().

    I'm not sure that this should even be executing since the comment right above it states:
    Code:
    // If the step operations are asynchronous then we need
    // to synchronize changes to the step execution (at a
    // minimum). Take the lock *before* changing the step
    // execution.
    There doesn't seem to be a check to see if the operation is even an async operation at this point.

    I'm wondering if this is a bug? Since I'm running SyncTaskExecutor I would think semaphore's are not needed.

    Am I correct in this assumption or do I perhaps have something else going on?

  • #2
    Semaphore checking in Synchronous job

    Hi,

    I have experienced same. I am launching the job from tasklet step of another job. I have put it in Jira. Just have a lookto URL https://jira.springsource.org/browse/BATCH-1819. It seems to be a bug in spring latest 2.1.8.

    Thanks,
    Sanjaya

    Comment

    Working...
    X