Just some more info

I am also adding

  <parameter name="scope" value="session"/>

to the wsdd file while deploying

If I don't add this destroy being called as expected for every request

-----Original Message-----
From: Chandra Talluri [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 4:56 PM
To: Axis-User (E-mail)
Subject: How to maintain the session using HttpClient in AXIS, with
Tomcat Server

Hi,

Using CommonsHTTPSender& HttpClint I can open a connection and do multiple
requests/responses without closing. But Now I can not able to maintain the
session. In every call I get a new session

Actually for every call on server side I get a new ServletEndpointContext :(

In the client I am calling stub.setMaintainSession(true);

Server code snippet is

public class Processor implements ServiceLifecycle
{
    public void doIt(String pid,String name)
    {
        System.out.println("Context :" + this.context.toString());// Every
time I get new one
        javax.servlet.http.HttpSession session = context.getHttpSession();
        System.out.println(session.getId());// Obviously this is different

    }

    public void destroy()  //never called
    {
        System.out.println("Called Destroy");
        this.context = null;
    }

    public void init(Object ctx) throws javax.xml.rpc.ServiceException
    {
       if(this.context == null);
       {
         System.out.println("Called Init"); //For every call it comes here
         this.context = (ServletEndpointContext) ctx;
       }
    }
    private ServletEndpointContext context = null;

}

This is problem is not there If I use HTTPSender. But that won't keep
connections open :(

Thanks in advance
-Chandra Talluri
NetNumber.com, Inc.
650 Suffolk Street
Suite 307
Lowell, MA 01854
Tel: 978-848-2841
[EMAIL PROTECTED]
http://www.netnumber.com


Reply via email to