Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 6322 invoked from network); 25 Jun 2010 22:47:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Jun 2010 22:47:56 -0000 Received: (qmail 36974 invoked by uid 500); 25 Jun 2010 22:47:56 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 36886 invoked by uid 500); 25 Jun 2010 22:47:55 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 36878 invoked by uid 99); 25 Jun 2010 22:47:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jun 2010 22:47:55 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_HELO_PASS,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jun 2010 22:47:50 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1OSHgH-0006Nb-Q9 for users@cxf.apache.org; Fri, 25 Jun 2010 15:47:29 -0700 Message-ID: <28997255.post@talk.nabble.com> Date: Fri, 25 Jun 2010 15:47:29 -0700 (PDT) From: Arnaud DSA To: users@cxf.apache.org Subject: Maintaining session in multi threaded application for Spring jaxws client MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: arnaud.dsa@gmail.com Hi, I used the cxf+spring sample : http://cxf.apache.org/docs/writing-a-service-with-spring.html And I need to: - share a the proxy amongst different threads - maintain sessions for each thread as I need to call three functions in sequence: login/execute/logout But I see in the doc (http://cxf.apache.org/faq.html#FAQ-AreJAXWSclientproxiesthreadsafe?) that the proxy is not thread safe in this case: ----- * Session support - if you turn on sessions support (see jaxws spec), the session cookie is stored in the conduit. Thus, it would fall into the above rules on conduit settings and thus be shared across threads. For the conduit issues, you COULD install a new ConduitSelector that uses a thread local or similar. That's a bit complex though. ----- The doc mentions a "complex" solution but I could not fin more information on this. I tried to manually handle the cookie by fetching it into a thread local and putting it back on each request instead of using maintainSession, but I could not get the session cookie from the client. My client is loaded from spring like this: ----- ----- ApplicationContext context = new ClassPathXmlApplicationContext("client.xml"); HelloWorld client = (HelloWorld) context.getBean("helloClient"); ----- I can cast the client to a BindingProvider, but I did not find a way to fetch the session cookie from here: BindingProvider bp = (BindingProvider) client; Could someone tell me how to fetch and set the session cookie from the client, or point me to another solution? Thanks in advance. -- Arnaud -- View this message in context: http://old.nabble.com/Maintaining-session-in-multi-threaded-application-for-Spring-jaxws-client-tp28997255p28997255.html Sent from the cxf-user mailing list archive at Nabble.com.