Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 65735 invoked by uid 500); 8 Mar 2002 06:39:10 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 65724 invoked from network); 8 Mar 2002 06:39:10 -0000 Message-ID: <3C885CB6.BBAFD97E@fujixerox.co.jp> Date: Fri, 08 Mar 2002 15:39:50 +0900 From: Akira Hirose Organization: FX X-Mailer: Mozilla 4.78 [en] (WinNT; U) X-Accept-Language: ja,en MIME-Version: 1.0 To: axis-dev@xml.apache.org Subject: deploy problem. would not work. Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello, I tried to make the life span of a SOAP service object session wide without success. I wrote a test service and a test client. If parameter scope is "application" or "request", it works as I expected. But, when scope is "session", test program behaves the same way when scope is request. Would you mind tell me what is wrong. Or am I misunderstanding the meaning of "session" scope? I appreciate any advice. version: Axis-beta1-RC1, Apache Tomcat 4.0.1, JDK 1.3.1_01 Windows NT 4.0 SP6. Both service and client are running on identical machine. Detail: My test service is a Java class LifeSpanTest which has an integer variable and a getNext method which increment the variable and return the value. The client program Test.java repeats making getNext successive call to the service. When the LifeSpaceTest service is deployed with scope parameter "application", the client gives following result as I expected. clear test start (1): 1 (2): 2 test end test start (1): 3 (2): 4 test end and, if scope is "request", it gives following result as I expected. clear test start (1): 1 (2): 1 test end test start (1): 1 (2): 1 test end When I set scope "session", I expected, clear test start (1): 1 (2): 2 test end test start (1): 1 (2): 2 test end But, result was. clear test start (1): 1 (2): 1 test end test start (1): 1 (2): 1 test end Source code of the service LifeSpanTest.java, the deploy.wsdd, and the test client Test1.java is below. /* Test life span of a SOAP service object. */ public class LifeSpanTest { private int counter; public LifeSpanTest() { counter = 0; }; public int clear() { counter = 0; return counter; } public int getNext() { counter++; return counter; } } /* Client */ package localhost; public class Test1 { private static void clear() { try { int i; LifeSpanTestService locator = new LifeSpanTestServiceLocator(); LifeSpanTest svc = locator.getLifeSpanTest(); System.out.println("clear"); i = svc.clear(); } catch ( Exception e ) { System.err.print(e); } } private static void test() { try { int i; LifeSpanTestService locator = new LifeSpanTestServiceLocator(); LifeSpanTest svc = locator.getLifeSpanTest(); System.out.println("test start"); System.out.println("(1): "+ String.valueOf(svc.getNext()) ); System.out.println("(2): "+ String.valueOf(svc.getNext()) ); System.out.println("test end"); } catch ( Exception e ) { System.err.print(e); } } public static void main(String [] args) throws Exception { clear(); test(); test(); } } Thank you. /* akira.hirose */