Hi,

I'm looking for some ideas (perhaps a pattern) to refactor a Struts 1.0
based application, that has to deal with long duration transactions,
without modifying settings in user's browsers and proxies.

Some transactions are taking too much time to complete. "Too much time" 
accounts for anything that lasts more than 5 minutes. For example, IE 
timeouts after 5 minutes if it does not receive a valid response from the 
server. Some proxies also will drop the connection after a given time.

Currently, the application works this way: when you invoke "longProcess",
the ProcessAction class enters in a long transaction. Sadly, the browser
or the proxy get impatient and either timeout the connection or repeat
the request.

    <action path="/longProcess"
            type="ProcessAction"
            parameter="longProcess"
            validate="false">
      <forward name="success"
               path="/WEB-INF/process/success.jsp"
               redirect="false"/>
      <forward name="failure"
               path="/WEB-INF/procesos/error.jsp"
               redirect="false" />
    </action>


There are many process like this, and they are some complex. Also, the
application has been in production for some months, and as you can realize
we are not plenty of time to make an extensive refactoring and testing of it.

Initially, we tried sending a pulse to the client (a blank space), but since
we were not sendig a valid response (it lacks HTTP headers) although IE
seemed to be happy with it, the proxy stated that it didn't understand
the server response. Also, if the proxy were performing some kind of buffering
this pulse never reached the client.

We realize we need to redirect the browser to a page that indicates it to
reload while the transaction is running, and finally redirect to the "success"
or "failure" forward, but we are not so clear about the best way to solve
this. 


Any ideas are welcome. Thanks in advance,


Javier

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

Reply via email to