Wednesday, March 10, 2010

AJAX & Seam's Conversation Time Out

I've been struggling so much with Seam's conversation time out error that I began to abhor to use anything that is AJAX. Maybe my problem does not entirely lie on AJAX. Maybe it can also be caused by the fact that I used the properties of AJAX a lot on my web design without realizing the side effects.

One should have a strict control of AJAX events if one wants to incorporate AJAX functionality into the web pages. That is, you should clearly planned and set out about how the updates and re-rendering should happen. If you did not, what could possibly happen is that multiple ajax events can simultaneously happen and create a deadlock situation for conversations if you use Seam and AJAX together. I have a big web page with a lot of events and AJAX functions. Now, it's hard for me to trace back what is causing the problem. One way to solve it is to rewrite the whole page, piece by piece, by putting strict control over AJAX events. But at this point in my project, it'll be too much to handle.

A piece of advice that I want to give to those who plan on or have been using AJAX supports is that make sure you use eventQueues attribute of AJAX to organize your AJAX calls. This does not solve the problems at times, but it definitely helps. Also manually re-render the portion of the page instead of using auto re-render offered by . If you have a small page, using 's auto re-render property might be harmless, but it can cause you big problems if you use it a lot on a complicated page.

No comments:

Post a Comment