Re: Session state

From: Tim <dh_jaxrpc_at_UGCS.NET>
Date: Fri, 29 Nov 2002 09:07:38 -0800

Couple of questions:

1) How do you know you get a different HttpSession? Do you print out the
HttpSession object and its address is different all the time? This seems
to be normal in Tomcat. Try instead putting some object in the HttpSession
and then retrieve it again on a subsequent request.

2) You also have to use the *same* Stub/Proxy to make all requests.
Session tracking seems to be done on a per stub/proxy basis, which is
correct, I was afraid it would not work like this :)


Stub hello = getProxy();

hello._setProperty(maintain.session, true);

// start a new session on this call
// use the same session on this call

// create a new stub which will keep its own session
hello = getProxy();

hello._setProperty(maintain.session, true);

// this will create a new session
// and this will use the newly created session again

This works with the latest verion of the JWSDP.

I hope it helps. Good luck!

On Thu, 28 Nov 2002, Helen Hunter wrote:
> Hi all,
> I am trying to maintain a session b/w my client and service.
> I set the maintain_session_property on the client stub and use the
> ServiceEndpointContext to getHttpSession. The getHttpSession returns a new
> session for each request. Is there anything that I am missing? Does the
> latest implementation of jax-rpc support this? Can someone please help.
> thank you.
> --helen
> _________________________________________________________________
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*