axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glen Daniels" <>
Subject Re: Maintain session state between Calls
Date Thu, 29 Nov 2001 12:30:09 GMT
> for sharing data across calls.  As Glen pointed out we could
> place this data in the Call object it sticks around just as
> nicely as the messageContext - but my preference would be
> for it to be the messageContext since that's the object
> handlers know about (on the client and the server).  It also
> makes for a cleaner design because there's just one "bag"
> to search for your data - but what's simply to one man is
> complex to another.  (think wsdd :-) )

Hm.  OK, I'll try it a different way.

All these properties (cookies, etc) ARE in the MessageContext.  The Call object
has a list of properties which are persistent, and it sets them for each
request which gets sent down to the engine.  The pattern is:

1. Create call, set various properties on it
2. Call creates MessageContext
3. Call fills MessageContext in with its properties
4. Do the request
5. Clear the MessageContext
6. Go to step 3

It's not like we're actually asking the Handlers to go look at the Transport
object - they don't even really have an easy way to do that.  The only
difference in our approaches is that I believe the MessageContext should get
automatically cleaned out on each request so that we're sure only the right
stuff is in there, and you believe that everyone who puts anything in there is
responsible for making sure it goes away again.  So as far as the Handlers are
concerned, there's still only one bag.  Does that help clear it up?


View raw message