Hi all.
I can't quite get my head around what can happen with data during (and after) a transaction.
Any advice (or reading material), as always, would be appreciated.
[Using
JBoss 4.2.3 with EJB3/Hibernate JPA].
If during a transaction, we refresh a cache of data from the DB which we've added a value to during the transaction (thus it's not actually persisted yet, but 'available' within the transaction) but this data is also refreshed in another concurrent
thread, what is the final outcome of the cache data?
Is it
a) the transaction's update and subsequent refresh from the DB, ignoring the other thread's update
b) the other thread's update, removing the transaction's changes
c) due to the 'isolation' in ACID, the data that's 'touched' within the cache class cannot be edited until the transaction is complete (the other thread is locked until the transaction is copleted)
d) something else
I'm hoping, and believe from the
EJB spec, that it's c) but I just want a little clarification.
Many thanks...
Btw is this more suited to a different forum, say the EJB one?