[jboss-jira] [JBoss JIRA] Created: (JBAS-4871) TransactionIsolation is not reset when Connection is returned to the pool

Diego Belfer (JIRA) jira-events at lists.jboss.org
Wed Oct 17 16:41:03 EDT 2007


TransactionIsolation is not reset when Connection is returned to the pool
-------------------------------------------------------------------------

                 Key: JBAS-4871
                 URL: http://jira.jboss.com/jira/browse/JBAS-4871
             Project: JBoss Application Server
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: JBossAS-4.0.5.GA
            Reporter: Diego Belfer


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);
            }
         }
      }
   }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list