8 Replies Latest reply on Apr 3, 2008 8:27 PM by Sean McDaniel

    Seam Remoting and exception propagation

    Sean McDaniel Newbie

      Hello All,


      I'm working on an ExtJs to Seam bridge and have some questions regarding error handling in the Seam Remoting layer.  I notice that when exceptions are encountered on the server my registered callback for the remote invocation is not invoked.  I looked into this issue with firebug and noticed that when an exception is raised a response is not returned to the underlying XHR. 


      My initial strategy with this is to return Json from a POJO Seam component using detached entities fetched from a SLSB.  All of this is working just fine and I have a great solution using an extension of the Ext.data.DataProxy to popluate Ext stores which back many of its widgets.  However when things go bad Seam Remoting isn't giving me any feedback so I can respond these unexpected conditions.


      As I work out these last issues I was hoping that I could get some answers from the group as to how best deal with this.  I'm very much a noob with Seam.  In struts 2 I would get a 500 status and would be able to deal with this accordingly.  My initial design ideas here are to use a combination of annotations and put some around advice on these @WebRemote methods to deal with exceptions in a graceful way so that atleast my callback gets invoked with something like {success:false}.


      I was hoping to extend this solution to provide a more RPC style of interaction that Seam Remoting seems to be leaning towards.  In this case I will also need a way to deal with server side errors.


      I hope this makes sense and look forward to any feedback the group has to offer.  Feel free to hit me up with questions if anything in this post isn't clear.


      Tia,
      Sean