Markus Schmider wrote:I would have expected that the entity in the DB has the name "bla" but it has "fasel".
And no OptimisticLockException has been thrown.
Some questions:
- is the version number increased after the first update?
- how many SQL UPDATE statements are executed?
Markus Schmider wrote:I see two updates in the log
And what about the parameters used for this query? What's the version of the entity after the first update? And what's the version of the Eintrag instance referred by eintrag2 before the update is executed?
It might be useful for other ranchers if you provided the (relevant) portion of the EintragDAO class too (as it contains the transaction configuration).
Because this is an EJB each method has the default TransactionAttribute Required. This means that a Tx begins with each method and ends when the method returns.
Markus Schmider wrote:Because this is an EJB each method has the default TransactionAttribute Required. This means that a Tx begins with each method and ends when the method returns.
Thanks for coming back and sharing your solution. It might be helpful for other ranchers. Have a cow!