struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prashanth.S" <>
Subject Re: Coonection pooling
Date Mon, 04 Oct 2004 16:17:06 GMT
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.

Michael McGrady <> 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.

*See Also:*

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
>Do you Yahoo!?
> - Register online to vote today!

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message