Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The open transaction does not read the updated value from external transaction

 
Ashutosh Kr.
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a testcase which use the JPA Transaction Manager, transaction annotation to open a transaction.

once the transaction is open, that is the flow is inside the method , I put a breakpoint.
Now I modify the first name of teh record that is going to be fetched from the method from DB visualizer.(It is on auto commit).

now I release the break point , and let it read the value from the database. I see the hibernate select query in then console, but when i see the first name, then it has the old value.

I am using this test case to replicate my issue.

I have tried different isolation level, like read_commited, read_uncommited.

I am not able to understand why is it not fetching the updated value when the value was updated after the transaction was open, but not closed.

The behavior is of repeatable read. I have tried changing the isolation level while taking connection as well through transaction manger, but nothing helps.

I am able to make the isolation level more strict to Serializable , but not to read committed.

Please advice.

I am using SPring , JPA, Hibernate as the JPA implementer . The database is DB2
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic