struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burak Doğruöz" <zec...@gmail.com>
Subject Re: Execute and wait interceptor and calling an action more than once
Date Mon, 21 Jul 2008 18:27:05 GMT
I don't think that it can be done with an ajax approach. With ajax or not,
concurrent requests for the same action name returns first action's result.

I tried this simple scenario with an action which outputs its query
parameter. I also added a thread.sleep in execute method to gain extra time
to call the same action more than once.

When i triggered the same action with different parameters in 2 separate
browsers, first one redirected to the wait page as expected. At that point i
triggered the second copy. When they both returned  from wait page, both
output were first action's parameter.

I think ajax/div approach would show the same behaviour with the above.

However, the wildcard action mapping seems to separate the wait and returns.
when i mapped the action name like myaction* and called myaction1 and
myaction2 at the same time like before, they seem to return with their
respective results. i guess, this can also be used to separate the key.

Thanks for responses.

2008/7/21 Dave Newton <newton.dave@yahoo.com>:

> --- On Mon, 7/21/08, Burak Doğruöz wrote:
> > The constraint here is about ExecAndWaitInterceptor storing
> > and returning multiple copies of one certain action. This
> > constraint is already in the documentation. We are looking
> > for a turn around.
>
> I was referring to the better solution, Jeremy's Ajax idea.
>
> > there may be no certain result that which browser will show
> > which request.
>
> It may be enough to subclass the interceptor and override
> getBackgroundProcessName(...) (like to use a request parameter to help form
> the session key, etc.) but I haven't tried this.
>
> Dave
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message