Situation:

A user issues a get (Get-1) which takes 30 seconds to complete.
2 seconds later, user presses STOP and issues another get (Get-2)
which only takes 10 seconds to complete.

Suppose both Get-1 and Get-2 USE information in the session
and PUT information in the session.  

I believe JServ handles this with two threads and I believe
the two threads will be colliding on the session variables.

Possible Solution:
        1) create a deep-copy of the session
        2) each thread use/update their own copy
        3) when processing of the GET request is complete,
        each thread updates the session with their copy.
        EXCEPT, do not update if the timestamp in the session
        is newer than the timestamp in the copy.
        AND, make sure that step 3 is done in a threadsafe manner.
        
This puts quite a burden on the servlet developer to not use the session
and only use the copy -- and, it seems like a rather awkward solution.

Anybody know of a better solution? 

-Nick Ide (National Library of Medicine)


------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:       [EMAIL PROTECTED]

Reply via email to