axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricky Ho <r...@cisco.com>
Subject RE: Axis session scope possibly broken?
Date Fri, 13 Sep 2002 20:58:50 GMT
Are you thinking about a single Java class that "implemented" 2 different 
Java interfaces (one for each PortType) ? ... and you want two client stubs 
(one for each PortType) to reach the same object ?  I'm be very interested 
what is the use case behind that.

If your answer of the above question is "NO", then using a different 
JSESSIONID actually doesn't matter.  The JSESSIONID is used to locate the 
previous object to serve your current request.  If different PortType will 
have implemented by different classes, then the object will be different 
anyway (even though they use the same JSESSIONID).

Web Services is "stateless" in nature.  For simple web services scenario 
(once off, sync, request/response invocation), I don't see why there is a 
need to share data between PortTypes.  For more sophisticated B2B 
conversation scenarios, the "state" are typically maintained inside a 
"process instance" by matching the incoming message against some 
correlation set.  Either cases, I don't see a need to maintain the "state" 
at the HTTP Session level.  Doing so will have the following limitation ...
1) Your service cannot be moved to other transport than HTTP
2) The "state" can only be shared across services invocation from the 
"SAME" user.
3) You may put a trap that encourage people doing a lot of fine grain 
service invocation.

Best regards,
Ricky

At 02:59 PM 9/13/2002 -0500, you wrote:
>Thank you for your response.
>
>According to what you've written, the behavior I'm
>experiencing is correct. However, it seems odd and unexpected
>to me.
>The fact that JSESSIONID is maintained individually by each
>stub instance has, in my opinion, negative implications on
>application design. For example, how would you easily share
>data (such as security authentication info, etc) among server
>portType instances if they don't share the same session?
>
>Slawek
>
>---- Original message ----
> >Date: Fri, 13 Sep 2002 12:30:10 -0700
> >From: Alan Moore <amoore@ciphergen.com>
> >Subject: RE: Axis session scope possibly broken?
> >To: "'axis-user@xml.apache.org'" <axis-user@xml.apache.org>
> >
> >You need to make sure you have done the following:
> >
> >1) marked the service as <parameter name="scope"
>value="Session"/> in
> >server-config.wsdd (via AdminClient/yourService.wsdd)
> >
> >2) flagged the stubs in the client to setMaintainSession(true);
> >
> >And (I think) by implication:
> >
> >3) once you have obtained and marked a stub instance with
> >setMaintainSession(true) you need to reuse the same stub for
>subsequent
> >calls to the service in order to stay in the same session
>context.
> >
> >I could be wrong about this last point since my code keeps
>the same stub
> >instance around. Unless there is some endpoint/stub caching
>trickery going
> >on, it only makes sense that the JSESSIONID is maintained in
>the stub
> >instance.
> >
> >AFAIK, each stub instance is going to be associated with a
>different
> >JSESSIONID. The fact that two stub instances are obtained
>from the same
> >Locator doesn't make them part of the same session. There
>should be a 1-1
> >relationship between stub <-> JSESSIONID.
> >
> >Your post wasn't exactly clear on what your code is doing or
>expecting.
> >Please elaborate.
> >
> >Good luck!
> >
> >alan
> >
> >> -----Original Message-----
> >> From: Slawomir Lisznianski [mailto:slisznianski@asyncnet.com]
> >> Sent: Friday, September 13, 2002 9:29 AM
> >> To: Axis
> >> Subject: Axis session scope possibly broken?
> >>
> >>
> >> Hello,
> >>
> >> Why does the value of JSESSIONID cookie change per requested
> >> portType within a WebService?
> >>
> >> I used the same Service instance, with the maintainSession
> >> property set to true, when obtaining different port stubs via
> >> the Locator and still calls on those stubs had a different
> >> JSESSIONID sent out.
> >>
> >> JSESSIONID value was the same when making calls on the same
> >> portType only.
> >>
> >> Any idea?
> >> Slawomir Lisznianski
> >> AsyncNet Inc.
> >>
> >> PGP key available at:
> >> http://keyserver.pgp.com/pks/lookup?op=get&exact=off&search=sl
> >> isznianski
> >>
>Slawomir Lisznianski
>AsyncNet Inc.
>
>PGP key available at: 
>http://keyserver.pgp.com/pks/lookup?op=get&exact=off&search=slisznianski


Mime
View raw message