Re: getting stale data (jdbc / innodb)
Posted by: Christian Pflugradt
Date: May 13, 2014 12:01AM

Thank you both for your replies!

I wasn't aware that most of the time other connections still had open transactions / were reading data. At the time of testing I was the only end user connected and the queries executed by the backend service usually finish within mili seconds. However I never explicitely committed a select statement and autocommit is set to false so that maybe kept the state from updating.

I made two changes:
- I explicitely set the transaction level to Connection.TRANSACTION_READ_COMMITTED in the central connection management class
- I added a connection.commit() after every selection

Now it's working as expected.

Best regards,
Christian

Options: ReplyQuote


Subject
Written By
Posted
Re: getting stale data (jdbc / innodb)
May 13, 2014 12:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.