[jboss-user] [JBoss Seam] - Seam remoting and ajax4jsf

kgalligan do-not-reply at jboss.com
Thu Jun 28 11:47:27 EDT 2007


We have a page that uses seam remoting to get update info about the data, then if an update is required, we have an 'a4j:jsFunction' defined with a reRender to redisplay the main table.

This works fine for a while, but after an extended period of time, it seems like the conversation gets lost.  After that, you have to reload the whole page to reset everything.

Here are some more technical details:

We have a long running conversation with one major stateful bean with the page data held in it.  On the front end, we have facelets with an html table built with ui:repeat (not dataTable).

Every few seconds we make a seam remoting call.  We look at the data returned, and if a page update is required, we trigger that with the ...

  | <a4j:jsFunction name="a4jRerenderTable" reRender="dataDisplay" oncomplete="rerenderReturn()" timeout="10000"/>
  | 
  | (some html)
  | 
  | <s:div id="dataDisplay">
  | 
  | (data in table here)
  | 
  | </s:div>
  | 

when the page is loaded, seam remoting is set with the conversation id.  Also, we cut down on this problem significantly by batching seam remote requests while the a4j function was running.  To do that, we call:

Seam.Remoting.startBatch();

Then call the a4j method to rerender the table.  Inside 'rerenderReturn()', we call 'Seam.Remoting.executeBatch();'.  This cut back on the issue significantly, which lead me to assume there was some sort of issue with one stepping on the other on the server end.  However, we still get the issue once in a while.

So, assuming it was an issue with calling the same conversation over and over, here are some thoughts:

- We call seam remote methods too fast.  The calls are run pretty close together.  On occasion, they could easily be called right around the same time.

- Not waiting long enough before/after ajax4jsf call (or something like that)

That's about all I can think of.  My plan now is to actually run this whole thing faster to try to reproduce the issue (repro is a major problem.  We generally only see it after its been sitting there for a while).

Thanks in advance.  Any thoughts would be greatly appreciated.

-Kevin

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058814#4058814

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058814



More information about the jboss-user mailing list