3 Replies Latest reply on Oct 26, 2007 3:46 AM by flash_ox

    A4j Polling and Reverse Proxy

    flash_ox

      Hi,

      I'm working on an thin client application based on Java/JSF/Ajax4jsf.

      This application is kind of 'real-time', so i use to send a periodical XmlHttpRequest (trough a a4j:poll tag) to check the state of some indicators to refresh some elements on the main JSP page.

      This application will be accessed from a portal. The users log themselves in on this portal and then, a reverse-proxy maintain the user's session as long as he is active. This is done with a cookie.

      Every time the user send a Http Request, the cookie is initialized. If no request is sent during 20 mins, the session is no longer maintained by the reverse-proxy and the cookie is deleted.

      I'm facing a problem because my application send a Http Request (XmlHttpRequest trough the a4j:poll) every second, so the user's session will never times out.

      Is there a way to implement polling on a different port than the HTTP Port (80) or by bypassing XmlHttpRequest at all? In this way, the reverse-proxy will not be aware of the polling.

      I hope my explanation is understandable.

      Any advice should be helpful.

      Thanks by advance.

        • 1. Re: A4j Polling and Reverse Proxy

          Hi,
          I had the same problem some time ago: The session should expire after a couple of minutes of inactivity. But the poll counts as activity, so I can't measure the "real" user activity.

          I solved it manually with a self made timer in my bean and which is resetted by clicking a button and so on and NOT by polling.

          • 2. Re: A4j Polling and Reverse Proxy
            flash_ox

            Thanks for your answer fmarwede,

            But this solution doesn't solve my problem.

            There are other applications that are running at the same time and managed by the same cookie.

            I want more than logging out my user from my application. I want not to be interfering with the reserve proxy's session management by hiding my "Http polling".

            • 3. Re: A4j Polling and Reverse Proxy
              flash_ox

              any additionnal suggestion?

              Thanks by advance.