You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Rick McGuire (JIRA)" <ji...@apache.org> on 2008/01/15 11:41:34 UTC
[jira] Created: (GERONIMO-3749) Global session cache can cause
multiple client instances to reuse incorrectly configured connections.
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
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.
[jira] Resolved: (GERONIMO-3749) Global session cache can cause
multiple client instances to reuse incorrectly configured connections.
Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-3749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick McGuire resolved GERONIMO-3749.
------------------------------------
Resolution: Fixed
Committed revision 612419.
> 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.
[jira] Commented: (GERONIMO-3749) Global session cache can cause
multiple client instances to reuse incorrectly configured connections.
Posted by "Sangjin Lee (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Updated: (GERONIMO-3749) Global session cache can cause
multiple client instances to reuse incorrectly configured connections.
Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-3749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick McGuire updated GERONIMO-3749:
-----------------------------------
Attachment: 3749.patch
Potential fix to this problem.
> 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.