You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Prashanth.S" <su...@yahoo.com> on 2004/10/04 12:27:47 UTC
Coonection pooling
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!
[OT] Re: Coonection pooling
Posted by Michael McGrady <mi...@michaelmcgrady.com>.
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
>
>
Re: Coonection pooling
Posted by DG...@EvergreenInvestments.com.
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" <su...@yahoo.com>
10/04/2004 12:17 PM
Please respond to
"Struts Users Mailing List" <us...@struts.apache.org>
To
Struts Users Mailing List <us...@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 <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
Re: Coonection pooling
Posted by "Prashanth.S" <su...@yahoo.com>.
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
Re: Coonection pooling
Posted by Michael McGrady <mi...@michaelmcgrady.com>.
Pooling HTTP connections probably does not make sense. The class
HttpURLConnection says as follows:
public abstract class *HttpURLConnection*
extends URLConnection
<http://java.sun.com/j2se/1.4.2/docs/api/java/net/URLConnection.html>
A URLConnection with support for HTTP-specific features. See the
spec <http://www.w3.org/pub/WWW/Protocols/> 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()|
<http://java.sun.com/j2se/1.4.2/docs/api/java/net/HttpURLConnection.html#disconnect%28%29>
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!
>
>