Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-5080

Need to check transaction status on SQL operations

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • JBossAS-4.2.3.GA
    • JBossAS-4.2.2.GA
    • JCA service
    • None

    Description

      In 4.2.x the transaction timeout rollsback the transaction rather than marking it rollback only.

      This means that for the local transaction datasource the connection has effectively moved onto the next
      transaction.

      Actual code:
      Connection c = datasource.getConnection();
      // tx timeout here
      Statement s = createStatement();
      s.executeUpdate(); // should not work

      Actual Code executed in 4.0.x
      Connection c = pool.getConnection();
      // tx timeout here
      transaction.setRollbackOnly();
      Statement s = createStatement();
      s.executeUpdate();
      tx.rollback(); // Rollsback the update

      Actual Code executed in 4.2.x
      Connection c = pool.getConnection();
      // tx timeout here
      transaction.rollback();
      Statement s = createStatement();
      s.executeUpdate(); // happens "in the next local transaction"

      Attachments

        Issue Links

          Activity

            People

              adrian.brock Adrian Brock (Inactive)
              adrian.brock Adrian Brock (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: