Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread ServerRequest
Wed, Sep 12 2012 7:40 AMPermanent Link

Ronald

Hi,

I have a ServerRequest that I excute and right after the call to
ServerRequest.Execute, I change something in the Request.Content.Values and
I call ServerRequest.Execute again (same instance of TServerRequest). The
first is not executed, only the second (the request sends an email). If I do
not execute the second, the first is executed correct.

Do I abuse TServerRequest?

Greetings,
Ronald
Wed, Sep 12 2012 8:09 AMPermanent Link

Mark Brooks

Slikware

Avatar

<<I have a ServerRequest that I excute and right after the call to
ServerRequest.Execute, I change something in the Request.Content.Values and
I call ServerRequest.Execute again (same instance of TServerRequest). The
first is not executed, only the second (the request sends an email). If I do
not execute the second, the first is executed correct.>>

I have used a TServerRequestQueue for this scenario which forces serialization.
Wed, Sep 12 2012 3:08 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ronald,

<< Do I abuse TServerRequest? >>

Short answer - yes. Smile Always remember that web browser functionality is
100% asynchronous, which means that you have to wait until the OnComplete
fires for the TServerRequest before you can proceed with re-using the
component for another request.

As Mark stated, a better way to execute multiple requests in a serialized
fashion is to use the TServerRequestQueue component instead.  It manages the
whole "I'm done with this one, now do this one" type of process without
forcing you to deal with it.

If you have any other questions, please let me know.

Tim Young
Elevate Software
www.elevatesoft.com
Image