aspose file tools*
The moose likes Object Relational Mapping and the fly likes The open transaction does not read the updated value from external transaction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "The open transaction does not read the updated value from external transaction" Watch "The open transaction does not read the updated value from external transaction" New topic
Author

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

Ashutosh Kr.
Greenhorn

Joined: Apr 14, 2008
Posts: 1
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The open transaction does not read the updated value from external transaction