geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Jencks (JIRA)" <j...@apache.org>
Subject [jira] Commented: (GERONIMO-2516) MCFConnectionInterceptor is calling destroy() in connectionClosed()
Date Sat, 28 Oct 2006 08:46:17 GMT
    [ http://issues.apache.org/jira/browse/GERONIMO-2516?page=comments#action_12445351 ] 
            
David Jencks commented on GERONIMO-2516:
----------------------------------------

Why do you think this code is wrong?  MCFConnectionInterceptor is always the last interceptor,
and returnConnection on it will only be called if any pooling interceptors have decided that
they want to discard the connection.  Therefore no matter what the ConnectionReturnAction
the only thing to do is to destroy the connection.  If you have a different point of view
please explain.

> MCFConnectionInterceptor is calling destroy() in connectionClosed()
> -------------------------------------------------------------------
>
>                 Key: GERONIMO-2516
>                 URL: http://issues.apache.org/jira/browse/GERONIMO-2516
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: connector
>    Affects Versions: 1.1
>         Environment: Windows XP, Eclipse 3.2.1, WTP 1.5, Geronimo 1.1
>            Reporter: Romano Silva
>
> MCFConnectionInterceptor is calling destroy() in connectionClosed() while it shouldn't.
Actually, it's not checking the connectionReturnAction argument..
> I would change returnConnection to:
> public void returnConnection(
>             ConnectionInfo connectionInfo,
>             ConnectionReturnAction connectionReturnAction) {
>         ManagedConnectionInfo mci = connectionInfo.getManagedConnectionInfo();
>         ManagedConnection mc = mci.getManagedConnection();
>         try {
>             if (connectionReturnAction == ConnectionReturnAction.DESTROY)
>             {
>                 mc.destroy();
>             }
>         } catch (ResourceException e) {
>             //log and forget
>         } catch (Error e) {
>             throw e;
>         } catch (Throwable t) {
>             //log and forget
>         }
>     }

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

        

Mime
View raw message