Results 1 to 2 of 2

Thread: Transaction not rolled back

Hybrid View

  1. #1
    Join Date
    Jul 2007
    Posts
    15

    Default 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. #2
    Join Date
    Jul 2007
    Posts
    15

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •