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 21:12:48 GMT
Can you elaborate what do you mean "the stub is thread-safe" ?

Does that mean the stub will serialize the invocation to the server.  In 
other words, if two client threads are calling the stub, the stub will wait 
until getting back the response of the first request before sending the 
second request. (of course, the second thread needs to wait).

Or the stub will fire out the second request before it gets the response 
from the first one.

In the former case, the service implementation need NOT be aware of the 
multi-threading situation with the expense of performance.  What is the 
behavior of the current AXIS implementation ??

Best regards,
Ricky


At 01:20 PM 9/13/2002 -0700, Alan Moore wrote:
>I think the stubs themselves are threadsafe so you should be able to share
>them between your threads in a given app.
>
>If you are looking to share them between JVM's, that isn't possible without
>quite a bit of effort.
>
>alan
>
> > -----Original Message-----
> > From: Slawomir Lisznianski [mailto:slisznianski@asyncnet.com]
> > Sent: Friday, September 13, 2002 1:00 PM
> > To: axis-user@xml.apache.org
> > Subject: RE: Axis session scope possibly broken?
> >
> >
> > 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=sl
>isznianski


Mime
View raw message