You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Magyar, Bence" <bn...@yahoo.com> on 2005/11/29 22:03:09 UTC

Java client does not re-use TCP/IP connections.

Sorry,
  I'm quite new with all of this.  I've created a java client to my tomcat web service using the Java2WSDL2 utility and WSDL2Java utility.  Correct me if I'm wrong, I believe this is called the "stub" client model.  At any rate, my main() function in my client looks like:
   
  // get the web service...
   service = new WSDefinitionServiceLocator();
   
   // Now use the service to get a stub to the service
   ws = service.getMyWebService();
      
   Stub s = (Stub) ws;
   s.setMaintainSession(true);
   
  After this is set up, I can correctly call methods on my service such as 
   
  ws.Method1();
  ws.Method2();
   
  For each one of these invocations, my client creates a new TCP/IP connection to the service instead of reusing the existing one.  Am I missing some critical parameter 
  in my Stub class?  I'm not sure how else to configure the client.  If anyone could 
  point me in the right direction, it would be much appreciated. Thanks!
   
  B.M
   
   
  

"Caldarale, Charles R" <Ch...@unisys.com> wrote:  > From: Magyar, Bence [mailto:bnc_uconn@yahoo.com] 
> Subject: RE: web client running out of ports! (timeout exception)
>
> Shouldn't I be getting persistent, reusable connections as 
> the default with HTTP/1.1?

I'm sure you are - but it's the client's responsibility to reuse them;
all the server has to do is expect more traffic on the connection, which
appears to be what it's doing.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org




		
---------------------------------
 Yahoo! Music Unlimited - Access over 1 million songs. Try it free.

Re: Java client does not re-use TCP/IP connections.

Posted by Tim Funk <fu...@joedog.org>.
This has nothing to do with tomcat. Please use the appropriate list.

-Tim

Magyar, Bence wrote:
> Sorry,
>   I'm quite new with all of this.  I've created a java client to my tomcat web service using the Java2WSDL2 utility and WSDL2Java utility.  Correct me if I'm wrong, I believe this is called the "stub" client model.  At any rate, my main() function in my client looks like:
>    
>   // get the web service...
>    service = new WSDefinitionServiceLocator();
>    
>    // Now use the service to get a stub to the service
>    ws = service.getMyWebService();
>       
>    Stub s = (Stub) ws;
>    s.setMaintainSession(true);
>    
>   After this is set up, I can correctly call methods on my service such as 
>    
>   ws.Method1();
>   ws.Method2();
>    
>   For each one of these invocations, my client creates a new TCP/IP connection to the service instead of reusing the existing one.  Am I missing some critical parameter 
>   in my Stub class?  I'm not sure how else to configure the client.  If anyone could 
>   point me in the right direction, it would be much appreciated. Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org