On the face of it, I think that the return on this optmization effort will be miniscule.  However, you may have already optimized the other 99.9% of your application.

Dennis



"Prashanth.S" <suman291857@yahoo.com>

10/04/2004 12:17 PM
Please respond to
"Struts Users Mailing List" <user@struts.apache.org>

To
Struts Users Mailing List <user@struts.apache.org>
cc
Subject
Re: Coonection pooling





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 <mike@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