Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-3070

Quickstart for transaction driver should not be using reflection

    Details

    • Type: Enhancement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 5.9.5.Final
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ochaloup Ondrej Chaloupka
                Reporter:
                ochaloup Ondrej Chaloupka
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: