Bob Hall wrote:
>
> I don't have much Comet experience but given that it can pause and resume
> processing of a given request, would it be possible to bind your execution
> context to that 'request' and re-bind it to the 'new' Thread when request
> processing resumes?
>
That would be my quest
Bob Hall wrote:
>
> Have you considered using ThreadLocal?
>
Yes. But the problem with comet is that it may switch threads "mid request";
a request can be suspended, the thread freed up, and after a while the
request is resumed, but by probably a different thread. So I cannot bind the
request
Joseph Morgan-2 wrote:
>
> Sounds to me you simply need to create a POJO to contain the execution
> context state
The issue is not the storage, but access to the storage. How would I, at any
place in the execution, access it, without passing the context to each
method.
--
View this message
I often use (abuse?) the fact that a single thread is used to completely
handle a request, by binding objects to the thread.
Not all code down the line of a request is aware that it is running inside a
web server. I have utility classes that are used in standalone applications
and web application