I'm working on a legacy Java application using H2 to save and store data, and have to add an autonomous commit for a single record between savepoints.
The scenario is as follows:
1. screen 1 creates savepoint 1 and allows inserts/updates and rollback to savepoint 1
2. screen 2 accessed from screen 1 creates savepoint 2 and allows inserts/updates and rollback to savepoint 2
3. based on user action, each of the screens needs to be able to insert and commit a single row for auditing, without committing savepoint 1 or 2
Any suggestions how that can be achieved? Is there a way to commit a single savepoint instead of all, like you can roll back to a savepoint?
Note: I can't change how the screens work or redesign the application.