Skip to content

Handling JacisStaleObjectExceptions #26

Answered by JanWiemer
fullben asked this question in Q&A
Discussion options

You must be logged in to vote

Generally retrying the whole transaction is the solution for stale object exceptions when using optimistic locking (similar e.g. in hibernate...). I also always use a helper class starting the transaction, executing a task and finally committing the transaction. This helper class also cares about the retry. The helper class looks similar to your suggestion (I usually add an increasing delay between the retries). I implemented the helper class outside the store since I usually use it with global JTA transactions and the helper class is more general.

Anyway I will think about adding a helper class (or method) doing the same for local transactions...
See: #28 (comment)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@fullben
Comment options

@JanWiemer
Comment options

@fullben
Comment options

Answer selected by fullben
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants