-
Enhancement
-
Resolution: Done
-
Minor
-
None
-
None
-
None
Currently the quickstart of transaction driver standalone uses reflection for forcibly closing H2 connection. It was used as a way to overcome the H2 issues with XA connection.
As the quickstart tests recovery it arbitrary throws an exception. This makes issue for H2 as it consider the connection as unfinished but if we close it it does not care and sets autocommit to true and let all the changes being immediately propagated to database.
That's what we don't want as we test recovery and we expect recovery to finish the in-doubt data.
The issue is only for H2 behaviour. "Normal" databases as PostgreSQL makes checks on unfinished transaction in jdbc driver and their decisions are based on it.
Nevertheless using reflection is not a good habit and it's a hacky. For quickstarts it should not be the case. There needs to be a way how to avoid it.