You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Almeida, Timothy" <ti...@firepond.com> on 2003/02/20 22:05:48 UTC

Session Scope

I'm attempting to deploy a simple 'hello world type' service to run in
"session scope", but it doesn't appear to be working. ('request' &
'application' scope settings work as I would expect them to.)
If make two consecutive calls to the same method of a service for which the
scope is specified to be 'session', it results in the 'service object' being
instantiated twice -- once for each call invocation.
* Is this a known bug by any chance? (I'm using Axis Release 1.0)
* Am I possibly omitting to do something? (Allowing cookies to be stored for
example.)
* Or am I just misunderstanding how this should work?

Here's the relevant section of the server-config.wsdd file:
 <service name="Greeter" provider="java:RPC">
  <parameter name="allowedMethods" value="*"/>
  <parameter name="scope" value="session"/>
  <parameter name="className" value="server.Hello"/>
 </service>


I badly need session state to be maintained for another less frivolous
service I'm working on.
Any advice/insights would be much appreciated...
Thanks,
Tim

Re: Session Scope

Posted by Barry Levinson <ba...@levinson.us>.
Yes, you need to allow cookies to be stored.  See archives of this list 
for a more in depth answer.

--Barry

Almeida, Timothy wrote:

>I'm attempting to deploy a simple 'hello world type' service to run in
>"session scope", but it doesn't appear to be working. ('request' &
>'application' scope settings work as I would expect them to.)
>If make two consecutive calls to the same method of a service for which the
>scope is specified to be 'session', it results in the 'service object' being
>instantiated twice -- once for each call invocation.
>* Is this a known bug by any chance? (I'm using Axis Release 1.0)
>* Am I possibly omitting to do something? (Allowing cookies to be stored for
>example.)
>* Or am I just misunderstanding how this should work?
>
>Here's the relevant section of the server-config.wsdd file:
> <service name="Greeter" provider="java:RPC">
>  <parameter name="allowedMethods" value="*"/>
>  <parameter name="scope" value="session"/>
>  <parameter name="className" value="server.Hello"/>
> </service>
>
>
>I badly need session state to be maintained for another less frivolous
>service I'm working on.
>Any advice/insights would be much appreciated...
>Thanks,
>Tim
>
>  
>