Uploaded image for project: 'iBatis for Java [READ ONLY]'
  1. iBatis for Java [READ ONLY]
  2. IBATIS-228

Exception is thrown by TransactionManager when multiple commits are issued against a started transaction.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.6
    • 2.1.7
    • Core
    • None

    Description

      The following exception is thrown when issuing multiple commits against a started transaction.

      com.ibatis.common.jdbc.exception.NestedSQLException:
      Could not commit transaction. Cause:
      com.ibatis.sqlmap.engine.transaction.TransactionException:
      TransactionManager could not commit. No transaction
      is started.

      The problem is that the TransactionManager is throwing this exception in all cases except when the Transaction State is STATE_STARTED. In this scenario, the transaction has been started, but its state is STATE_COMMITTED.

      Clinton asked me to log this issue and attach my fix. The fix is in the TransactionManager.commit method and allows a commit to be performed if the Transaction state is either STATE_STARTED or STATE_COMMITTED.

      Attachments

        1. TransactionManager.java
          5 kB
          Jeff Roberts

        Activity

          People

            cbegin Clinton Begin
            jeff_roberts_apache Jeff Roberts
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: