Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 87970 invoked from network); 24 Feb 2005 07:34:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 24 Feb 2005 07:34:06 -0000 Received: (qmail 53462 invoked by uid 500); 24 Feb 2005 07:34:05 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 53430 invoked by uid 500); 24 Feb 2005 07:34:05 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 53415 invoked by uid 99); 24 Feb 2005 07:34:04 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of samisa.abeysinghe@gmail.com designates 64.233.184.201 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.201) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 23 Feb 2005 23:34:03 -0800 Received: by wproxy.gmail.com with SMTP id 37so86408wra for ; Wed, 23 Feb 2005 23:34:01 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=abELdjePLIvLjgePk68UZEQncoVKgK1sBS9TqoKJwq50HxqGZ2wI/HgV0x37rkW8BaJPmRd9K3kGc8SV8icUMkbqRDu7GqvwT1z7XYn7lgU2z8KhryZOgsei5l/f0ARmbtsUHU9VrR3/kGsJjp3BpMI2aQOLI+ooRZ86g8vRzHw= Received: by 10.54.42.20 with SMTP id p20mr229966wrp; Wed, 23 Feb 2005 23:34:00 -0800 (PST) Received: by 10.54.28.26 with HTTP; Wed, 23 Feb 2005 23:34:00 -0800 (PST) Message-ID: Date: Thu, 24 Feb 2005 13:34:00 +0600 From: Samisa Abeysinghe Reply-To: Samisa Abeysinghe To: Apache AXIS C User List Subject: Re: Client stub reuse In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Tim, Please see the answeres below: On Thu, 24 Feb 2005 09:54:00 +1000, Tim Bartley wrote: > > Hi, > > Are there any limitations on the reuse of client stub objects? > > For example support I have Foo.wsdl and generate a client stub class Foo. Is > it safe to do: > > Foo stub; > > while (1) { > char* url = ; > if (tried all servers) { > return error; > } > > stub.setEndpoint(url); > try { > stub.invoke(); > return success; > } > catch (server unavailable) { > continue; > } > catch (...) { > return error; > } > } > > I expect that the stubs are re-entrant but not thread safe i.e. I expect to > use exactly one, long lived, stub object per-thread (yes, I realize the code > above doesn't quite achieve that). > This is possible. The Stubs are supposed to be re-entrant and the scenario you are talking about should work. > Also, are transport connections e.g. in HTTP 1.1. transport, reused between > method invocations? This particularly important for SSL where connection set > up overhead can be very high. I assume they are (which is why I want to do > the above) but thought I'd check. > Yes, if HTTP/1.1 is being used connection is reused. It checks if the URL has been changed between calls and if not it keeps the connection. In case of HTTP/1.0, if keep-alive HTTP header is set, then the conection is reused. Else it is closed as per the HTTP semantics. Thanks, Samisa... > Thanks, > > Tim > -- > IBM Tivoli Access Manager Development > Gold Coast Development Lab, Australia > +61-7-5552-4001 phone > +61-7-5571-0420 fax