geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sangjin Lee (JIRA)" <j...@apache.org>
Subject [jira] Commented: (GERONIMO-3749) Global session cache can cause multiple client instances to reuse incorrectly configured connections.
Date Tue, 15 Jan 2008 19:39:36 GMT

    [ https://issues.apache.org/jira/browse/GERONIMO-3749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12559196#action_12559196
] 

Sangjin Lee commented on GERONIMO-3749:
---------------------------------------

It looks good to me.  A couple of minor things.

- AsyncHttpClient.getCachedConnection() takes a SessionCache as an argument.  I don't think
this is necessary as the SessionCache is an instance variable of AsyncHttpClient?  So I might
suggest something like

+    private ConnectFuture getCachedConnection(HttpRequestMessage message) {
+        IoSession cached = sessionCache.getActiveSession(message);
         if (cached == null) {
             return null;
         }


- We will need to reflect this API change to the Geronimo sample code that we have...

> Global session cache can cause multiple client instances to reuse incorrectly configured
connections.
> -----------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-3749
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3749
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: AsyncHttpClient
>            Reporter: Rick McGuire
>            Priority: Minor
>         Attachments: 3749.patch
>
>
> The current connection reuse mechanism relies on a single global session class per process
(or really, per class loader that loads the ahc code) to store all of the i/o sessions indexed
by host/port.  Since the selection is made based totally on host and port, it is possible
that one ahc client could end up reusing a connection created by a client with a completely
different connection configuration.  Caching should be implemented using a instance-based
cache rather than a single global session cache. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message