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

TransactionIsolation is not reset when Connection is returned to the pool

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • JBossAS-5.0.0.CR2
    • JBossAS-4.0.5.GA
    • JCA service
    • None

    Description

      TransactionIsolation is not being reset when the JDBC connection is returned to the pool. Bug is indicated in the code.
      This was also reported in http://jira.jboss.com/jira/browse/JBAS-1123 and marked as closed but the bug is still there.

      public void cleanup() throws ResourceException
      {
      synchronized (handles)
      {
      for (Iterator i = handles.iterator(); i.hasNext(); )

      { WrappedConnection lc = (WrappedConnection)i.next(); lc.setManagedConnection(null); }

      handles.clear();
      }
      //reset all the properties we know about to defaults.
      synchronized (stateLock)
      {
      jdbcAutoCommit = true;
      jdbcReadOnly = readOnly;
      if (jdbcTransactionIsolation != transactionIsolation)
      {
      try

      { con.setTransactionIsolation(jdbcTransactionIsolation); <-- BUG: It should be con.setTransactionIsolation(transactionIsolation); jdbcTransactionIsolation = transactionIsolation; }

      catch (SQLException e)

      { mcf.log.warn("Error resetting transaction isolation ", e); }

      }
      }
      }

      Attachments

        Activity

          People

            jpederse@redhat.com Jesper Pedersen
            mural74 Diego Belfer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: