Hi.
I’ve investigated a database in a corrupt state. And to my surprise, it seems that there are not transactions with Active Objects in Jira?
So, basically what happens:
- I run my code in a ActiveObjects.executeInTransaction().
- A few entities are inserted.
- Once insert of Entity fails, because a validation error. The request fails with a en exception.
We do not swallow the exception. - And Surprise, the transaction isn’t rolled back / or is never started. The first few entities where created, but the overall state is now inconsistent.
- Now other parts of the App start to fail, because they see a invalid state.
I’ve found multiple references that Jira doesn’t support transaction with Active Objects:
- In the Active Objects documentation:
JIRA currently does not support transactions for Active Objects (as of JIRA 6.0).
Is this still the case? This is really a ‘bad suprise’ to wake up =(.
This basically should be a big warning sign in the docs about this missing feature.
PS: The work around mentioned this JIRA issue still does work: https://jira.atlassian.com/browse/JRASERVER-25808