You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Simon MaticLangford <Si...@betfair.com> on 2008/07/07 17:23:28 UTC

HTTP Connection Pooling

Hi,

 

Is there anyway to get CXF to use an HTTP connection pool? Looking at the connection factory it appears to use url.openConnection() directly, but wondered if there is a way other that writing my own implementation of the interface? Specifically I want to reuse connections using a client certificate over SSL due to the overhead of establishing SSL connections.

 

Thanks

 

Simon

 

 

Simon Matić Langford

Java Development Lead

www.betfair.com <http://www.betfair.com/> 

 

Waterfront | Hammersmith Embankment | Chancellors Road | London | W6 9HP

 

The information in this e-mail and any attachment is confidential and is intended only for the named recipient(s). The e-mail may not be disclosed or used by any person other than the addressee, nor may it be copied in any way. If you are not a named recipient please notify the sender immediately and delete any copies of this message. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Any view or opinions presented are solely those of the author and do not necessarily represent those of Betfair. Betfair is the trading name of The Sporting Exchange Limited whose registered office is: Waterfront, Hammersmith Embankment, Chancellors Road, London W6 9HP. Registered in England with No. 3770548.


________________________________________________________________________
In order to protect our email recipients, Betfair Group use SkyScan from 
MessageLabs to scan all Incoming and Outgoing mail for viruses.

________________________________________________________________________

Re: HTTP Connection Pooling

Posted by Brice <br...@gmail.com>.
Very interesting subject, I also would like to know more about it.

Isn't there any conflict with the REST stateless requirement ? I hope not!


2008/7/7 Simon MaticLangford <Si...@betfair.com>:

> Hi,
>
>
>
> Is there anyway to get CXF to use an HTTP connection pool? Looking at the
> connection factory it appears to use url.openConnection() directly, but
> wondered if there is a way other that writing my own implementation of the
> interface? Specifically I want to reuse connections using a client
> certificate over SSL due to the overhead of establishing SSL connections.
>
>
>
> Thanks
>
>
>
> Simon
>
>
>
>
>
> Simon Matić Langford
>
> Java Development Lead
>
> www.betfair.com <http://www.betfair.com/>
>
>
>
> Waterfront | Hammersmith Embankment | Chancellors Road | London | W6 9HP
>
>
>
> The information in this e-mail and any attachment is confidential and is
> intended only for the named recipient(s). The e-mail may not be disclosed or
> used by any person other than the addressee, nor may it be copied in any
> way. If you are not a named recipient please notify the sender immediately
> and delete any copies of this message. Any unauthorized copying, disclosure
> or distribution of the material in this e-mail is strictly forbidden. Any
> view or opinions presented are solely those of the author and do not
> necessarily represent those of Betfair. Betfair is the trading name of The
> Sporting Exchange Limited whose registered office is: Waterfront,
> Hammersmith Embankment, Chancellors Road, London W6 9HP. Registered in
> England with No. 3770548.
>
>
> ________________________________________________________________________
> In order to protect our email recipients, Betfair Group use SkyScan from
> MessageLabs to scan all Incoming and Outgoing mail for viruses.
>
> ________________________________________________________________________




-- 
Bryce

Re: HTTP Connection Pooling

Posted by Daniel Kaplan <da...@disney.com>.
Great, thanks for the info. 



--
View this message in context: http://cxf.547215.n5.nabble.com/HTTP-Connection-Pooling-tp561783p5754834.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: HTTP Connection Pooling

Posted by abdulsattar <ab...@gmail.com>.
Hey Daniel, 

I am using cxf for my soap client. I know this thread is old but I had a
couple of related questions. 

-If the server sets the keep-alive and connection timetout is there any use
of resetting the values which supersede the server's values because the
server would anyways be respecting its values. 

-You say that we can use an interceptor to intercept and change the
keep-alive and timeout values on client side on server response. Can you
maybe write a code snippet how is this possible on the client side. Right
now I know that we can set a timeout and keep alive value on client port by
injecting HttpPolicy in the httpConduit that the client port uses. But from
your response it seemed like the server might be able to reset that value on
the client with its response since the client might respect the server's
values. Please let me know if there is any way for the client to reset the
values to enforce the client to always respect the initial values. 

Regards, 
Abdul





--
View this message in context: http://cxf.547215.n5.nabble.com/HTTP-Connection-Pooling-tp561783p5711620.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: HTTP Connection Pooling

Posted by Daniel Kulp <dk...@apache.org>.
BTW: there is a way to control the connection pooling, but it's a SERVER side 
thing.   Basically, if the server sends back a header of:

Keep-Alive: timeout=60, max=5

then the Java client will respect those values.    Right now in CXF, you would 
probably need to write an interceptor to set those values.   I just made a 
commit to trunk that expands the http configuration to include a setting to 
control this from the config file.

Dan




On Wednesday 17 December 2008 6:46:42 am Adrian Corcoran wrote:
> Hi,
> What was the design decision behind using java.net.URL. Is there a reason
> that apache-commons-httpclient was not used?
>
> Thanks,
>  Adrian
>
> On Mon, Dec 15, 2008 at 7:01 PM, Cyrille Le Clerc
> <cyrille.leclerc@pobox.com
>
> > wrote:
> >
> >
> > CXF relies on the out-of-the-box java.net URL and HttpURLConnection .
> >
> > The JVM offers connections pooling mechanisms called "HTTP Persistent
> > Connections". Basically, you have to define the JVM property
> > "http.maxConnections" (default 5) to a higher value.
> >
> > Details are available here :
> > http://java.sun.com/javase/6/docs/technotes/guides/net/http-keepalive.htm
> >l
> >
> > Hope this helps,
> >
> > Cyrille
> > --
> > Cyrille Le Clerc
> > cleclerc@xebia.fr
> >
> > pashpour wrote:
> > > Hi folks,
> > >    Any luck with HTTP pooling?
> > >
> > > Thanks,
> > >
> > > Pash
> > >
> > > Simon MaticLangford wrote:
> > >> Hi,
> > >>
> > >>
> > >>
> > >> Is there anyway to get CXF to use an HTTP connection pool? Looking at
> >
> > the
> >
> > >> connection factory it appears to use url.openConnection() directly,
> > >> but wondered if there is a way other that writing my own
> > >> implementation of the interface? Specifically I want to reuse
> > >> connections using a client certificate over SSL due to the overhead of
> > >> establishing SSL
> >
> > connections.
> >
> > >> Thanks
> > >>
> > >>
> > >>
> > >> Simon
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> Simon Matić Langford
> > >>
> > >> Java Development Lead
> > >>
> > >> www.betfair.com <http://www.betfair.com/>
> > >>
> > >>
> > >>
> > >> Waterfront | Hammersmith Embankment | Chancellors Road | London | W6
> > >> 9HP
> > >>
> > >>
> > >>
> > >> The information in this e-mail and any attachment is confidential and
> > >> is intended only for the named recipient(s). The e-mail may not be
> >
> > disclosed
> >
> > >> or used by any person other than the addressee, nor may it be copied
> > >> in any way. If you are not a named recipient please notify the sender
> > >> immediately and delete any copies of this message. Any unauthorized
> > >> copying, disclosure or distribution of the material in this e-mail is
> > >> strictly forbidden. Any view or opinions presented are solely those of
> > >> the author and do not necessarily represent those of Betfair. Betfair
> > >> is the trading name of The Sporting Exchange Limited whose registered
> >
> > office
> >
> > >> is: Waterfront, Hammersmith Embankment, Chancellors Road, London W6
> > >> 9HP. Registered in England with No. 3770548.
> > >>
> > >>
> > >> ______________________________________________________________________
> > >>__ In order to protect our email recipients, Betfair Group use SkyScan
> > >> from MessageLabs to scan all Incoming and Outgoing mail for viruses.
> > >>
> > >> ______________________________________________________________________
> > >>__
> >
> > --
> > View this message in context:
> > http://www.nabble.com/HTTP-Connection-Pooling-tp18319313p21019615.html
> > Sent from the cxf-user mailing list archive at Nabble.com.



-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: HTTP Connection Pooling

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday 17 December 2008 6:46:42 am Adrian Corcoran wrote:
> Hi,
> What was the design decision behind using java.net.URL. Is there a reason
> that apache-commons-httpclient was not used?

There were several reasons for using the java URLConnection instead of 
httpclient.   

1) Dependencies: we already get a lot of flak for the number of dependencies.   
Why add another dependency when something built into the JDK works fine 99% 
of the time?  

2) At the time, I think httpclient was at 2.x version which really kind of 
sucked.   

3) Since we were targetting Java 5 and most of the HTTP issues in the JDK that 
httpclient was working around were fixed for Java 5, there wasn't much of a 
compelling reason to use httpclient over the Java 5 URLConnection.

4) Request streaming: doing proper streaming with httpclient is HARD with the 
way our transports work.   Really, the only way to do it is to used piped 
streams and two threads.     Basically, in CXF, it's expected that a 
transport provides an OutputStream that the soap message and stuff is written 
to as it's produced.   This works GREAT with URLConnect.getOutputStream().   
httpclient, on the otherhand works the other way.   You give it an 
InputStream (or other block like a byte[] or File) that it reads from.    
Thus, to wire it into CXF would require one of:

a) transport provides a ByteArrayOutputStream or similar that CXF writes to 
then at close time, that's converted to a Entity and written out.     Thus, 
no streaming which would impact performance.

b) transport provides a PipedOutputStream on the current thread and uses a 
background thread with the corresponding PipedInputStream.   This allows 
streaming, but requires thread switches and such.

That all said, once 4.0 comes out, I've thought about investigating it a bit 
more mostly for the NIO stuff which can be useful for the async calls.   

Dan


>
> Thanks,
>  Adrian
>
> On Mon, Dec 15, 2008 at 7:01 PM, Cyrille Le Clerc
> <cyrille.leclerc@pobox.com
>
> > wrote:
> >
> >
> > CXF relies on the out-of-the-box java.net URL and HttpURLConnection .
> >
> > The JVM offers connections pooling mechanisms called "HTTP Persistent
> > Connections". Basically, you have to define the JVM property
> > "http.maxConnections" (default 5) to a higher value.
> >
> > Details are available here :
> > http://java.sun.com/javase/6/docs/technotes/guides/net/http-keepalive.htm
> >l
> >
> > Hope this helps,
> >
> > Cyrille
> > --
> > Cyrille Le Clerc
> > cleclerc@xebia.fr
> >
> > pashpour wrote:
> > > Hi folks,
> > >    Any luck with HTTP pooling?
> > >
> > > Thanks,
> > >
> > > Pash
> > >
> > > Simon MaticLangford wrote:
> > >> Hi,
> > >>
> > >>
> > >>
> > >> Is there anyway to get CXF to use an HTTP connection pool? Looking at
> >
> > the
> >
> > >> connection factory it appears to use url.openConnection() directly,
> > >> but wondered if there is a way other that writing my own
> > >> implementation of the interface? Specifically I want to reuse
> > >> connections using a client certificate over SSL due to the overhead of
> > >> establishing SSL
> >
> > connections.
> >
> > >> Thanks
> > >>
> > >>
> > >>
> > >> Simon
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> Simon Matić Langford
> > >>
> > >> Java Development Lead
> > >>
> > >> www.betfair.com <http://www.betfair.com/>
> > >>
> > >>
> > >>
> > >> Waterfront | Hammersmith Embankment | Chancellors Road | London | W6
> > >> 9HP
> > >>
> > >>
> > >>
> > >> The information in this e-mail and any attachment is confidential and
> > >> is intended only for the named recipient(s). The e-mail may not be
> >
> > disclosed
> >
> > >> or used by any person other than the addressee, nor may it be copied
> > >> in any way. If you are not a named recipient please notify the sender
> > >> immediately and delete any copies of this message. Any unauthorized
> > >> copying, disclosure or distribution of the material in this e-mail is
> > >> strictly forbidden. Any view or opinions presented are solely those of
> > >> the author and do not necessarily represent those of Betfair. Betfair
> > >> is the trading name of The Sporting Exchange Limited whose registered
> >
> > office
> >
> > >> is: Waterfront, Hammersmith Embankment, Chancellors Road, London W6
> > >> 9HP. Registered in England with No. 3770548.
> > >>
> > >>
> > >> ______________________________________________________________________
> > >>__ In order to protect our email recipients, Betfair Group use SkyScan
> > >> from MessageLabs to scan all Incoming and Outgoing mail for viruses.
> > >>
> > >> ______________________________________________________________________
> > >>__
> >
> > --
> > View this message in context:
> > http://www.nabble.com/HTTP-Connection-Pooling-tp18319313p21019615.html
> > Sent from the cxf-user mailing list archive at Nabble.com.



-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: HTTP Connection Pooling

Posted by Adrian Corcoran <ad...@gmail.com>.
Wow that issue has been around for a while!
So  how feasible would it be to plug one's own dispatch for http?

On Wed, Dec 17, 2008 at 1:11 PM, Cyrille Le Clerc <cyrille.leclerc@pobox.com
> wrote:

>
> Hekko Adrian,
>
> This new feature is tracked by "
> http://issues.apache.org/jira/browse/CXF-291 CXF-291 - Support Commons
> HTTP
> Client for HTTP conduit ".
>
> I note that Commons Http Client is under a complete rewrite and that
> version
> 4 is still in a beta status (beta 3 as of 2008/12/17). It may make sense to
> wait for the first release of version 4.
>
> More over, java.net.HttpURLConnection in Java 6 is getting closer to
> Commons
> Http Client even though I regret that the CookieHandler is statically set
> and that connection pool size ( http.maxConnections ) is only statically
> set
> at java.net.HttpURLConnection underlying layer initialisation.
>
> Cyrille
>
> --
> Cyrille Le Clerc
> cleclerc@xebia.fr
>
>
>
> Adrian C wrote:
> >
> > Hi,
> > What was the design decision behind using java.net.URL. Is there a reason
> > that apache-commons-httpclient was not used?
> >
> > Thanks,
> >  Adrian
> >
> > On Mon, Dec 15, 2008 at 7:01 PM, Cyrille Le Clerc
> > <cyrille.leclerc@pobox.com
> >> wrote:
> >
> >>
> >> CXF relies on the out-of-the-box java.net URL and HttpURLConnection .
> >>
> >> The JVM offers connections pooling mechanisms called "HTTP Persistent
> >> Connections". Basically, you have to define the JVM property
> >> "http.maxConnections" (default 5) to a higher value.
> >>
> >> Details are available here :
> >>
> http://java.sun.com/javase/6/docs/technotes/guides/net/http-keepalive.html
> >>
> >> Hope this helps,
> >>
> >> Cyrille
> >> --
> >> Cyrille Le Clerc
> >> cleclerc@xebia.fr
> >>
> >>
> >> pashpour wrote:
> >> >
> >> > Hi folks,
> >> >    Any luck with HTTP pooling?
> >> >
> >> > Thanks,
> >> >
> >> > Pash
> >> >
> >> > Simon MaticLangford wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >>
> >> >>
> >> >> Is there anyway to get CXF to use an HTTP connection pool? Looking at
> >> the
> >> >> connection factory it appears to use url.openConnection() directly,
> >> but
> >> >> wondered if there is a way other that writing my own implementation
> of
> >> >> the interface? Specifically I want to reuse connections using a
> client
> >> >> certificate over SSL due to the overhead of establishing SSL
> >> connections.
> >> >>
> >> >>
> >> >>
> >> >> Thanks
> >> >>
> >> >>
> >> >>
> >> >> Simon
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> Simon Matić Langford
> >> >>
> >> >> Java Development Lead
> >> >>
> >> >> www.betfair.com <http://www.betfair.com/>
> >> >>
> >> >>
> >> >>
> >> >> Waterfront | Hammersmith Embankment | Chancellors Road | London | W6
> >> 9HP
> >> >>
> >> >>
> >> >>
> >> >> The information in this e-mail and any attachment is confidential and
> >> is
> >> >> intended only for the named recipient(s). The e-mail may not be
> >> disclosed
> >> >> or used by any person other than the addressee, nor may it be copied
> >> in
> >> >> any way. If you are not a named recipient please notify the sender
> >> >> immediately and delete any copies of this message. Any unauthorized
> >> >> copying, disclosure or distribution of the material in this e-mail is
> >> >> strictly forbidden. Any view or opinions presented are solely those
> of
> >> >> the author and do not necessarily represent those of Betfair. Betfair
> >> is
> >> >> the trading name of The Sporting Exchange Limited whose registered
> >> office
> >> >> is: Waterfront, Hammersmith Embankment, Chancellors Road, London W6
> >> 9HP.
> >> >> Registered in England with No. 3770548.
> >> >>
> >> >>
> >> >>
> >> ________________________________________________________________________
> >> >> In order to protect our email recipients, Betfair Group use SkyScan
> >> from
> >> >> MessageLabs to scan all Incoming and Outgoing mail for viruses.
> >> >>
> >> >>
> >> ________________________________________________________________________
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/HTTP-Connection-Pooling-tp18319313p21019615.html
> >> Sent from the cxf-user mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/HTTP-Connection-Pooling-tp18319313p21052859.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: HTTP Connection Pooling

Posted by Cyrille Le Clerc <cy...@pobox.com>.
Hekko Adrian,

This new feature is tracked by "
http://issues.apache.org/jira/browse/CXF-291 CXF-291 - Support Commons HTTP
Client for HTTP conduit ".

I note that Commons Http Client is under a complete rewrite and that version
4 is still in a beta status (beta 3 as of 2008/12/17). It may make sense to
wait for the first release of version 4.

More over, java.net.HttpURLConnection in Java 6 is getting closer to Commons
Http Client even though I regret that the CookieHandler is statically set
and that connection pool size ( http.maxConnections ) is only statically set
at java.net.HttpURLConnection underlying layer initialisation.

Cyrille

--
Cyrille Le Clerc
cleclerc@xebia.fr



Adrian C wrote:
> 
> Hi,
> What was the design decision behind using java.net.URL. Is there a reason
> that apache-commons-httpclient was not used?
> 
> Thanks,
>  Adrian
> 
> On Mon, Dec 15, 2008 at 7:01 PM, Cyrille Le Clerc
> <cyrille.leclerc@pobox.com
>> wrote:
> 
>>
>> CXF relies on the out-of-the-box java.net URL and HttpURLConnection .
>>
>> The JVM offers connections pooling mechanisms called "HTTP Persistent
>> Connections". Basically, you have to define the JVM property
>> "http.maxConnections" (default 5) to a higher value.
>>
>> Details are available here :
>> http://java.sun.com/javase/6/docs/technotes/guides/net/http-keepalive.html
>>
>> Hope this helps,
>>
>> Cyrille
>> --
>> Cyrille Le Clerc
>> cleclerc@xebia.fr
>>
>>
>> pashpour wrote:
>> >
>> > Hi folks,
>> >    Any luck with HTTP pooling?
>> >
>> > Thanks,
>> >
>> > Pash
>> >
>> > Simon MaticLangford wrote:
>> >>
>> >> Hi,
>> >>
>> >>
>> >>
>> >> Is there anyway to get CXF to use an HTTP connection pool? Looking at
>> the
>> >> connection factory it appears to use url.openConnection() directly,
>> but
>> >> wondered if there is a way other that writing my own implementation of
>> >> the interface? Specifically I want to reuse connections using a client
>> >> certificate over SSL due to the overhead of establishing SSL
>> connections.
>> >>
>> >>
>> >>
>> >> Thanks
>> >>
>> >>
>> >>
>> >> Simon
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Simon Matić Langford
>> >>
>> >> Java Development Lead
>> >>
>> >> www.betfair.com <http://www.betfair.com/>
>> >>
>> >>
>> >>
>> >> Waterfront | Hammersmith Embankment | Chancellors Road | London | W6
>> 9HP
>> >>
>> >>
>> >>
>> >> The information in this e-mail and any attachment is confidential and
>> is
>> >> intended only for the named recipient(s). The e-mail may not be
>> disclosed
>> >> or used by any person other than the addressee, nor may it be copied
>> in
>> >> any way. If you are not a named recipient please notify the sender
>> >> immediately and delete any copies of this message. Any unauthorized
>> >> copying, disclosure or distribution of the material in this e-mail is
>> >> strictly forbidden. Any view or opinions presented are solely those of
>> >> the author and do not necessarily represent those of Betfair. Betfair
>> is
>> >> the trading name of The Sporting Exchange Limited whose registered
>> office
>> >> is: Waterfront, Hammersmith Embankment, Chancellors Road, London W6
>> 9HP.
>> >> Registered in England with No. 3770548.
>> >>
>> >>
>> >>
>> ________________________________________________________________________
>> >> In order to protect our email recipients, Betfair Group use SkyScan
>> from
>> >> MessageLabs to scan all Incoming and Outgoing mail for viruses.
>> >>
>> >>
>> ________________________________________________________________________
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/HTTP-Connection-Pooling-tp18319313p21019615.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/HTTP-Connection-Pooling-tp18319313p21052859.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: HTTP Connection Pooling

Posted by Adrian Corcoran <ad...@gmail.com>.
Hi,
What was the design decision behind using java.net.URL. Is there a reason
that apache-commons-httpclient was not used?

Thanks,
 Adrian

On Mon, Dec 15, 2008 at 7:01 PM, Cyrille Le Clerc <cyrille.leclerc@pobox.com
> wrote:

>
> CXF relies on the out-of-the-box java.net URL and HttpURLConnection .
>
> The JVM offers connections pooling mechanisms called "HTTP Persistent
> Connections". Basically, you have to define the JVM property
> "http.maxConnections" (default 5) to a higher value.
>
> Details are available here :
> http://java.sun.com/javase/6/docs/technotes/guides/net/http-keepalive.html
>
> Hope this helps,
>
> Cyrille
> --
> Cyrille Le Clerc
> cleclerc@xebia.fr
>
>
> pashpour wrote:
> >
> > Hi folks,
> >    Any luck with HTTP pooling?
> >
> > Thanks,
> >
> > Pash
> >
> > Simon MaticLangford wrote:
> >>
> >> Hi,
> >>
> >>
> >>
> >> Is there anyway to get CXF to use an HTTP connection pool? Looking at
> the
> >> connection factory it appears to use url.openConnection() directly, but
> >> wondered if there is a way other that writing my own implementation of
> >> the interface? Specifically I want to reuse connections using a client
> >> certificate over SSL due to the overhead of establishing SSL
> connections.
> >>
> >>
> >>
> >> Thanks
> >>
> >>
> >>
> >> Simon
> >>
> >>
> >>
> >>
> >>
> >> Simon Matić Langford
> >>
> >> Java Development Lead
> >>
> >> www.betfair.com <http://www.betfair.com/>
> >>
> >>
> >>
> >> Waterfront | Hammersmith Embankment | Chancellors Road | London | W6 9HP
> >>
> >>
> >>
> >> The information in this e-mail and any attachment is confidential and is
> >> intended only for the named recipient(s). The e-mail may not be
> disclosed
> >> or used by any person other than the addressee, nor may it be copied in
> >> any way. If you are not a named recipient please notify the sender
> >> immediately and delete any copies of this message. Any unauthorized
> >> copying, disclosure or distribution of the material in this e-mail is
> >> strictly forbidden. Any view or opinions presented are solely those of
> >> the author and do not necessarily represent those of Betfair. Betfair is
> >> the trading name of The Sporting Exchange Limited whose registered
> office
> >> is: Waterfront, Hammersmith Embankment, Chancellors Road, London W6 9HP.
> >> Registered in England with No. 3770548.
> >>
> >>
> >> ________________________________________________________________________
> >> In order to protect our email recipients, Betfair Group use SkyScan from
> >> MessageLabs to scan all Incoming and Outgoing mail for viruses.
> >>
> >> ________________________________________________________________________
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/HTTP-Connection-Pooling-tp18319313p21019615.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: HTTP Connection Pooling

Posted by Cyrille Le Clerc <cy...@pobox.com>.
CXF relies on the out-of-the-box java.net URL and HttpURLConnection .

The JVM offers connections pooling mechanisms called "HTTP Persistent
Connections". Basically, you have to define the JVM property
"http.maxConnections" (default 5) to a higher value.

Details are available here :
http://java.sun.com/javase/6/docs/technotes/guides/net/http-keepalive.html

Hope this helps,

Cyrille
--
Cyrille Le Clerc
cleclerc@xebia.fr


pashpour wrote:
> 
> Hi folks,
>    Any luck with HTTP pooling? 
> 
> Thanks,
> 
> Pash
> 
> Simon MaticLangford wrote:
>> 
>> Hi,
>> 
>>  
>> 
>> Is there anyway to get CXF to use an HTTP connection pool? Looking at the
>> connection factory it appears to use url.openConnection() directly, but
>> wondered if there is a way other that writing my own implementation of
>> the interface? Specifically I want to reuse connections using a client
>> certificate over SSL due to the overhead of establishing SSL connections.
>> 
>>  
>> 
>> Thanks
>> 
>>  
>> 
>> Simon
>> 
>>  
>> 
>>  
>> 
>> Simon Matić Langford
>> 
>> Java Development Lead
>> 
>> www.betfair.com <http://www.betfair.com/> 
>> 
>>  
>> 
>> Waterfront | Hammersmith Embankment | Chancellors Road | London | W6 9HP
>> 
>>  
>> 
>> The information in this e-mail and any attachment is confidential and is
>> intended only for the named recipient(s). The e-mail may not be disclosed
>> or used by any person other than the addressee, nor may it be copied in
>> any way. If you are not a named recipient please notify the sender
>> immediately and delete any copies of this message. Any unauthorized
>> copying, disclosure or distribution of the material in this e-mail is
>> strictly forbidden. Any view or opinions presented are solely those of
>> the author and do not necessarily represent those of Betfair. Betfair is
>> the trading name of The Sporting Exchange Limited whose registered office
>> is: Waterfront, Hammersmith Embankment, Chancellors Road, London W6 9HP.
>> Registered in England with No. 3770548.
>> 
>> 
>> ________________________________________________________________________
>> In order to protect our email recipients, Betfair Group use SkyScan from 
>> MessageLabs to scan all Incoming and Outgoing mail for viruses.
>> 
>> ________________________________________________________________________
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/HTTP-Connection-Pooling-tp18319313p21019615.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: HTTP Connection Pooling

Posted by pashpour <pa...@gmail.com>.
Hi folks,
   Any luck with HTTP pooling? 

Thanks,

Pash

Simon MaticLangford wrote:
> 
> Hi,
> 
>  
> 
> Is there anyway to get CXF to use an HTTP connection pool? Looking at the
> connection factory it appears to use url.openConnection() directly, but
> wondered if there is a way other that writing my own implementation of the
> interface? Specifically I want to reuse connections using a client
> certificate over SSL due to the overhead of establishing SSL connections.
> 
>  
> 
> Thanks
> 
>  
> 
> Simon
> 
>  
> 
>  
> 
> Simon Matić Langford
> 
> Java Development Lead
> 
> www.betfair.com <http://www.betfair.com/> 
> 
>  
> 
> Waterfront | Hammersmith Embankment | Chancellors Road | London | W6 9HP
> 
>  
> 
> The information in this e-mail and any attachment is confidential and is
> intended only for the named recipient(s). The e-mail may not be disclosed
> or used by any person other than the addressee, nor may it be copied in
> any way. If you are not a named recipient please notify the sender
> immediately and delete any copies of this message. Any unauthorized
> copying, disclosure or distribution of the material in this e-mail is
> strictly forbidden. Any view or opinions presented are solely those of the
> author and do not necessarily represent those of Betfair. Betfair is the
> trading name of The Sporting Exchange Limited whose registered office is:
> Waterfront, Hammersmith Embankment, Chancellors Road, London W6 9HP.
> Registered in England with No. 3770548.
> 
> 
> ________________________________________________________________________
> In order to protect our email recipients, Betfair Group use SkyScan from 
> MessageLabs to scan all Incoming and Outgoing mail for viruses.
> 
> ________________________________________________________________________
> 

-- 
View this message in context: http://www.nabble.com/HTTP-Connection-Pooling-tp18319313p20929855.html
Sent from the cxf-user mailing list archive at Nabble.com.