[
https://issues.apache.org/jira/browse/HTTPCLIENT-643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536212
]
vadim62 edited comment on HTTPCLIENT-643 at 10/30/07 11:27 AM:
-----------------------------------------------------------------------
I see. This is what I did not mention: I registered http protocol with
MultiHomeProtocolSocketFactory and https with MultiHomeSSLProtocolSocketFactory.
// register custom http and https protocols
static
{
Protocol protocolHttp = new Protocol("http",
(ProtocolSocketFactory)new
MultiHomeProtocolSocketFactory(),
DEFAULT_HTTP_PORT);
Protocol.registerProtocol("http", protocolHttp);
Protocol protocolHttps = new Protocol("https",
(ProtocolSocketFactory)new
MultiHomeSSLProtocolSocketFactory(),
DEFAULT_HTTPS_PORT);
Protocol.registerProtocol("https", protocolHttps);
}
I did not need to change any code in HTTP Client (which I like a lot, nice
architecture!), just created these 2 Factories and registered in my other
class. In this case the MultiHomeProtocolSocketFactory#createSocket will be
called from ControllerThreadSocketFactory#createSocket.
was (Author: vadim62):
I see. This is what I did not mention: I registered http protocol with
MultiHomeProtocolSocketFactory and https with MultiHomeSSLProtocolSocketFactory.
// register custom http and https protocols
static
{
Protocol protocolHttp = new Protocol("http",
(ProtocolSocketFactory)new
MultiHomeProtocolSocketFactory(),
DEFAULT_HTTP_PORT);
Protocol.registerProtocol("http", protocolHttp);
Protocol protocolHttps = new Protocol("https",
(ProtocolSocketFactory)new
MultiHomeSSLProtocolSocketFactory(),
DEFAULT_HTTPS_PORT);
Protocol.registerProtocol("https", protocolHttps);
}
I did not need to change any code in HTTP Client (which I like a lot, nice
architecture!), just created these 2 Factories and registered in my other
class. In this case the MultiHomeProtocolSocketFactory.createSocket() will be
called from ControllerThreadSocketFactory.createSocket().
> Provide fail-over for multi-home remote servers (if one server in a farm goes
> down)
> -----------------------------------------------------------------------------------
>
> Key: HTTPCLIENT-643
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-643
> Project: HttpComponents HttpClient
> Issue Type: Improvement
> Components: HttpClient
> Affects Versions: 3.1 RC1
> Environment: All environments
> Reporter: Vadim Permakoff
> Priority: Minor
> Fix For: 4.0 Beta 1
>
> Attachments: MultiHomeProtocolSocketFactory.java,
> MultiHomeSSLProtocolSocketFactory.java
>
>
> The HTTP Client does not provide automatic fail-over for multi-home remote
> servers (web-farm) if one server in a farm goes down
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]