You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "M. P." <ap...@philippe.prados.name> on 2005/11/07 09:56:09 UTC
Proposed patch in HTTPSender
Hi,
I write an Axis plug-in for update the http client transport. This
plug-in add a *Load Balancing* and *Failover* with the client. You can
find the code and documentation here :
<http://www.philippe.prados.name/Langage/Java/Maven/LoadBalancingAxis/>
Home: http://www.philippe.prados.name/Langage/Java/Maven/LoadBalancingAxis/
Javadoc :
http://www.philippe.prados.name/Langage/Java/Maven/LoadBalancingAxis/apidocs/index.html
<http://www.philippe.prados.name/Langage/Java/Maven/LoadBalancingAxis//apidocs/index.html>
Source :
http://www.philippe.prados.name/Langage/Java/Maven/LoadBalancingAxis/xref/index.html
<http://www.philippe.prados.name/Langage/Java/Maven/LoadBalancingAxis//xref/index.html>
Download:
http://www.philippe.prados.name/Langage/Java/Maven/LoadBalancingAxis//en/downloads.html
With this jar file, the client can retry x times the request or change
to another server if some problems are detect.
The plug-in update the MessageContext.TRANS_URL property with the
destination IP, and call more than one time the super.invoke(). With
this strategy, the "Host:" header is set with the IP and not the hostname.
If the destination server use this header to distinguish different
virtual host, this strategy isn't correct. It's rarely the case in a
cluster architecture.
The patch I propose, declare a protected method to manipulate the Host
value.
Regards.
Philippe Prados
Re: Proposed patch in HTTPSender
Posted by Davanum Srinivas <da...@gmail.com>.
Please log a enhancement request in JIRA please.
thanks,
dims
On 11/7/05, M. P. <ap...@philippe.prados.name> wrote:
>
>
>
>
> Hi,
>
> I write an Axis plug-in for update the http client transport. This plug-in
> add a Load Balancing and Failover with the client. You can find the code and
> documentation here :
>
>
> Home:
> http://www.philippe.prados.name/Langage/Java/Maven/LoadBalancingAxis/
> Javadoc :
> http://www.philippe.prados.name/Langage/Java/Maven/LoadBalancingAxis/apidocs/index.html
> Source :
> http://www.philippe.prados.name/Langage/Java/Maven/LoadBalancingAxis/xref/index.html
> Download:
> http://www.philippe.prados.name/Langage/Java/Maven/LoadBalancingAxis//en/downloads.html
>
>
> With this jar file, the client can retry x times the request or change to
> another server if some problems are detect.
>
> The plug-in update the MessageContext.TRANS_URL property with the
> destination IP, and call more than one time the super.invoke(). With this
> strategy, the "Host:" header is set with the IP and not the hostname.
>
> If the destination server use this header to distinguish different virtual
> host, this strategy isn't correct. It's rarely the case in a cluster
> architecture.
>
> The patch I propose, declare a protected method to manipulate the Host
> value.
>
> Regards.
>
> Philippe Prados
> Index: HTTPSender.java
> ===================================================================
> RCS file:
> /home/cvspublic/ws-axis/java/src/org/apache/axis/transport/http/HTTPSender.java,v
> retrieving revision 1.134
> diff -r1.134 HTTPSender.java
> 359c359
> < .append(host)
> ---
> > .append(getHost(msgContext,host))
> 868a869,879
> > /**
> > * return the destination hostname.
> > *
> > * @param msgContext the context.
> > * @param host the default hostname.
> > * @return The hostname to use in Host: header.
> > */
> > protected String getHost(MessageContext msgContext,String host)
> > {
> > return host;
> > }
>
>
>
--
Davanum Srinivas : http://wso2.com/blogs/