You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2007/05/02 13:51:34 UTC
[jira] Updated: (SM-928) ProviderProcessor leaks memory for https
endpoints
[ https://issues.apache.org/activemq/browse/SM-928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet updated SM-928:
-------------------------------
Fix Version/s: 3.2
3.1.1
> ProviderProcessor leaks memory for https endpoints
> --------------------------------------------------
>
> Key: SM-928
> URL: https://issues.apache.org/activemq/browse/SM-928
> Project: ServiceMix
> Issue Type: Bug
> Components: servicemix-http
> Affects Versions: 3.1
> Reporter: Dejan Predovic
> Fix For: 3.1.1, 3.2
>
>
> ProviderProcessor creates a new CommonsHttpSSLSocketFactory/Protocol instance for each message. These instances are in turn used as a part of HttpHost equals/hashCode identity. HttpHost instances are internally cached by MultiThreadedHttpConnectionManager and having new CommonsHttpSSLSocketFactory creates a new cache instance for every call.
> Making Protocol an instance variable and changing:
> {code}
> if (uri.getScheme().equals("https")) {
> ProtocolSocketFactory sf = new CommonsHttpSSLSocketFactory(
> endpoint.getSsl(),
> endpoint.getKeystoreManager());
> Protocol protocol = new Protocol("https", sf, 443);
> HttpHost httphost = new HttpHost(uri.getHost(), uri.getPort(), protocol);
> host = new HostConfiguration();
> host.setHost(httphost);
> } else {
> {code}
> to:
> {code}
> if (uri.getScheme().equals("https")) {
> synchronized (this) {
> if (protocol == null) {
> ProtocolSocketFactory sf = new CommonsHttpSSLSocketFactory(
> endpoint.getSsl(),
> endpoint.getKeystoreManager());
> protocol = new Protocol("https", sf, 443);
> }
> }
> HttpHost httphost = new HttpHost(uri.getHost(), uri.getPort(), protocol);
> host = new HostConfiguration();
> host.setHost(httphost);
> } else {
> {code}
> seems to work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.