1 Reply Latest reply on Dec 11, 2009 8:47 PM by jschellSomeoneStoleMyAlias

    No display due to long running Actions

      I have a small issue in my application.
      Please help providing the solution for the following problematic scenario faced in my application.

      My project is generally a report generation project,
      arch used: our-own architecture(similar to struts)
      Server: deployed in tomcat server..

      On clicking a button from X.jsp, it triggers the action with the request = REQ1
      so in my configuration Xml file it checks for it and executes the corresponding Action classes and it should display the Presentation(Jsp)
      What happens is , the action class execution is taking more than 10 min, becaz of which i am getting blank screen.
      From the action to jsp , it is executing without any error, which i could see in the log files..

      Actions taken:
      improved the performance of the query, but cudnt reduce much time..
      session time is 180min, and connection timeout set to an hr. - No change- It seems this doesnt have to do anything with this.

      my Observance:
      I guess, as per arch, it is executing till jsp, but it seems that HttpRequest is getting timedout becaz of long running actions.

      Please help to find the cause and approach method to resolve this issue.

      Note: no issues to wait till 10min.. but need to get the values (reports) in the screeen..

      Thanks in advance.....
        • 1. Re: No display due to long running Actions
          Design is inappropriate.

          Long running processes, and specifically reports, shouldn't rely on session connections.

          Instead the following should be done.
          - Process initiation (user request), post a task request to a task request queue. Return a unique identifier to requestor.
          - Separate process processes tasks in the task queue.
          - Requestor (such as a gui) periodically polls using the indentifier to see if the task is complete.
          - When the task is complete the requestor asks for the results (GUI displays them.)

          The problem with extending timeouts is that there are valid error scenarios where long timeouts will mean resources not returned to the system for long periods of time when they should have been.

          Per your current solution there is probably some other timeout somewhere. Could be several. The JSP forum might be a better place to ask where all of the possible timeouts could be.