Giovanni Azua wrote:
Hah!! I wish these restrictions would pop up on my face rather than
having to discover them in the hard way :)
http://struts.apache.org/2.x/docs/execute-and-wait-interceptor.html sez:
This interceptor works on a per-session basis. That means that the
same action name (myLongRunningAction, in the above example) cannot
be run more than once at a time in a given session.
Giovanni Azua wrote:
> Could this restriction be overcome? maybe finding a way to pair the
> requests, maybe using a request id in the Session ... can I make an
> improvement request perhaps also work on it?
I'd suggest adding some sort of token that is handed back and forth from
server to client to server in order to correlate requests and their
corresponding threads. Be very careful how you try to use the session
here, though:
http://struts.apache.org/2.x/docs/execute-and-wait-interceptor.html sez:
> Important: Because the action will be running in a seperate thread,
> you can't use ActionContext because it is a ThreadLocal. This means
> if you need to access, for example, session data, you need to
> implement SessionAware rather than calling ActionContext.getSesion().
I looked into this last year at some point and found it was less trivial
than I had hoped :-). I don't currently have the time to dig in and fix
it, but we would of course all appreciate someone trying to remove this
limitation.
(Maybe if the token is not available it could display a "wait-list" page
that lists links to the corresponding action's threads associated with
the current session?)
Whether or not you can provide patches to fix this, it can't hurt to add
a JIRA request detailing the issues involved.
Of course a workaround/hack you could use to sidestep this would be to
replicate your action with different names...
I'm not sure exactly what the restriction is--maybe you can define a
wildcarded action so that there are multiple available?
<action name="someAction-*" class="com.examples.SomeAction">
<interceptor-ref name="completeStack"/>
<interceptor-ref name="execAndWait"/>
<result name="wait">longRunningAction-wait.jsp</result>
<result name="success">longRunningAction-success.jsp</result>
</action>
-Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]