You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michael McGrady <mi...@michaelmcgrady.com> on 2004/10/04 18:26:24 UTC

[OT] Re: Coonection pooling

Can you give a few more specifics?  I am not sure what you are doing 
here and the context.  On pooling HttpConnection, you might look at 
http://jigsaw.w3.org/Doc/Programmer/api/org/w3c/www/protocol/http/HttpManager.html 
.  Are you intending to run this application within a webserver with Struts?

Michael McGrady

Prashanth.S wrote:

>Hi Mike,
>Thanks for the reply.Iam infact talking abiut pooling HTTPConnections.So as soon as the application starts up i will create some "n" number of connections.based on the traffic,i will increase or decrease the number of connections in the pool.The main advantage of this will be avoiding the overhead of connecting to the URL everytime i get a request.So this connect() time will be kept out of the client transaction.
>Let me know your views about this.
> 
>Thanks
>Prashanth
> 
>
>
>Michael McGrady <mi...@michaelmcgrady.com> wrote:
>Pooling HTTP connections probably does not make sense. The class 
>HttpURLConnection says as follows:
>
>public abstract class *HttpURLConnection*
>extends URLConnection
>
>
>A URLConnection with support for HTTP-specific features. See the
>spec for details.
>
>Each HttpURLConnection instance is used to make a single request but
>the underlying network connection to the HTTP server may be
>transparently shared by other instances. Calling the close() methods
>on the InputStream or OutputStream of an HttpURLConnection after a
>request may free network resources associated with this instance but
>has no effect on any shared persistent connection. Calling the
>disconnect() method may close the underlying socket if a persistent
>connection is otherwise idle at that time.
>
>*Since:*
>JDK1.1
>*See Also:*
>|disconnect()|
>
>
>I am not sure what you want to do, but under these circumstances, are 
>you sure you want to talk about pooling HTTP connections? I have 
>several applications in Struts that use HttpURLConnection extensively.
>
>I can never tell what is the rhyme or reason behind people that say some 
>things are off topic or on topic. I don't understand why HTTP 
>connections are off topic but file uploads, etc., etc., etc., are on 
>topic. This is NOT meant to be contancerous. I just really cannot tell 
>what is off topic and what is not in Struts generally. 
>
>There is, with this discussion, also numerous posts about back buttons. 
>I am okay with that. But, I personally don't see how one is more on 
>point re: Struts than the other. If someone has a definition that makes 
>sense of when we get these complaints and when we don't, that would be 
>appreciated. I cannot make sense of it.
>
>Michael McGrady
>
>Prashanth.S wrote:
>
>  
>
>>Hi all,
>>Is there any design pattern that can be followed in order to implement connection pooling.connection pooling doesnt mean only JDBC connections.Iam talking about general http connections to any external systems in order to send requests.
>>
>>Thanks in advance
>>Prashanth
>>
>>
>>
>>
>>---------------------------------
>>Do you Yahoo!?
>>vote.yahoo.com - Register online to vote today!
>>
>>
>>    
>>
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>  
>