From: "Jenya Strokin" <[EMAIL PROTECTED]>
Sent: Thursday, July 18, 2002 9:10 AM
Subject: RE: How to close a response?


> Guys...... it works now, but I don't understand why)))
> I change code to synchronize the sharedSassionBean and didn't put any
magic
> methods for checking, and Servlet never send the same data twice. But
> process still running two times. So I still need to write this magic
method.
> Thanks for suggestions and help,
> Jenya

If your sharedSessionBean is unique to the session, then by synchronizing on
it you will serialize the requests. Each request coming in will get the
sharedSessionBean, and then immediately go into a race condition on the
synchronization. One of the requests will win, fulfill its request, and then
the second one will begin processing.

The trick is to somehow detect that you have to "identical" requests
overlapping. That way, perhaps, when the second request finally gets its
lock on the sharedSessionBean, it can detect that "nothings happened" and
perhaps do nothing. I'm not sure what the proper response is at this point.

Regards,

Will Hartung
([EMAIL PROTECTED])




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to