Hi,
I've never used 'removeSessionObject', so some/all of this is speculation:

In the course of a web event (not meaning a web event method, but the whole 
sequence between receiving the request from the browser and spitting out 
html), user session objects are retrieved either directly from the 
persistence engine (PE) or from the a local hash table that contains values 
previously fetched from the PE.  My understanding is that 
'putUserSessionObject' is executed against the local hashtable, and then 
the PE is updated at the end of the web event.

It could be that 'removeUserSessionObject' removes the session object from 
the local hash table, and then the session object is removed from the PE 
only as part of the reconciliation of the local hash table and the PE at 
the end of the web event.  If you execute 'remove' followed by 'get' in the 
same web event, it could be that ND first checks the local hash table, 
finds that the session object is not there (because you removed it), then 
goes out and finds it in the PE, from which the session object has not yet 
been removed.

workarounds (assuming that any of the above is true):
-- after removing a session object, don't try to retrieve it in the same 
web event.
-- instead of actually removing a session object, set it to a value that 
means 'removed'.  Then develop a central utility method that does a get on 
the session object and returns the same value (or null) whether the session 
object does not exist, or if it exists with the 'removed' value.

-- Curt Springer, Team ND


At 06:18 PM 7/29/99 +0530, Krupesha  C wrote:
>I have a problem, where in the user session object retains its value even
>after it is killed. The else part in the following code is being executed
>always. Any body has experienced a similar problem?
>
>
>CSpider.removeUserSessionObject("RR85_TRANSFER");
>if (CSpider.getUserSessionObject("RR85_TRANSFER") == null)
>{
>         log(" SessionObject RR85_TRANSFER is null");
>}
>else
>{
>         log("SessionObject RR85_TRANSFER is not null");
>}
>
>log("Value after removal =" +
>CSpider.getUserSessionObject("RR85_TRANSFER"));
>
>The value of the session object is also being printed at the last line.
>The same code worked fine when I removed the session object twice.
>
>Thanks for your suggestions,
>Krupesha
>_________________________________________________________________________
>
>For help in using, subscribing, and unsubscribing to the discussion
>forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>
>For dire need help, email: [EMAIL PROTECTED]

_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to