Announcement Announcement Module
Collapse
No announcement yet.
Transaction : Reading from database1 and writing to a database2 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Transaction : Reading from database1 and writing to a database2

    Hi all,
    I am new to spring transactioning. My use case is that during my batch process I need to read data (say one row at a time ) from database1 and write it to another database2. I want to do this as a single transaction, if possible. Is it possible to use Spring's declarative transaction management
    for transactioning ? or do I have to use JTA?.


    thanks

  • #2
    This is less of a question about Batch and more about general TX concerns and Spring. You could probably find a bunch of answers by searching in the Data Access forum.

    Short answer: to get full transactional behaviour you will need JTA, which Spring supports through the JtaTransactionManager.

    Here's where Batch comes in - with ItemOrientedStep we do not use declarative transaction management, but that shouldn't matter to you - you just need to inject a transaction manager (into the *StepFactoryBean).

    Comment

    Working...
    X