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

Jesper Pedersen (JIRA) jira-events at lists.jboss.org
Fri Sep 5 09:41:41 EDT 2008


     [ https://jira.jboss.org/jira/browse/JBAS-4871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesper Pedersen resolved JBAS-4871.
-----------------------------------

    Fix Version/s: JBossAS-5.0.0.CR2
                   JBossAS-4.2.4.GA
       Resolution: Done


> TransactionIsolation is not reset when Connection is returned to the pool
> -------------------------------------------------------------------------
>
>                 Key: JBAS-4871
>                 URL: https://jira.jboss.org/jira/browse/JBAS-4871
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: JCA service
>    Affects Versions: JBossAS-4.0.5.GA
>            Reporter: Diego Belfer
>            Assignee: Jesper Pedersen
>             Fix For: JBossAS-5.0.0.CR2, JBossAS-4.2.4.GA
>
>
> 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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list