Announcement Announcement Module
Collapse
No announcement yet.
Transaction not rolled back Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Transaction not rolled back

    We have our own transactioninterceptor that proxys certain classes for our services. I have an ItemReader that does an update using one of these wrapped service classes. ( Note - the ItemReader is not wrapped/proxied via the transacitoninterceptor). I then have the reader throw an exception, yet the update transaction is not rolled back for some reason. I was expecting the transaction to be rolled back automatically. It's not clear to me how Spring Batch interacts with our transaction interceptor.

    Thoughts? Here is the job code. Am I missing a parm of some sort?

    Code:
      <job id="fsaFile" xmlns="http://www.springframework.org/schema/batch">
    
            <step id="fsaStep1">
                <tasklet>
                    <chunk reader="fsaReader" writer="fsaWriter" commit-interval="1">
                        <streams>
                            <stream ref="fsaReader"/>
                            <stream ref="fsaDelagateReader"/>
                        </streams>
    
                    </chunk>
                </tasklet>
            </step>
        </job>

  • #2
    Ok. I think I figured it out. I was not using the same datasource for Spring Batch as I was being used in my container. Whoopsie.

    Comment

    Working...
    X