1 Reply Latest reply on Feb 3, 2012 3:22 AM by haisheng mi

    how to create a Authorization ExceptionHandler for seam-remoting?

    mi haisheng Newbie
      Here's an example of an Authorization exception handler that creates a JSF error message:

      --------------
      @HandlesExceptions
      public class ExceptionHandler {
         @Inject FacesContext facesContext;
         public void handleAuthorizationException(@Handles CaughtException<AuthorizationException> evt) {
            facesContext.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,
                  "You do not have the necessary permissions to perform that operation", ""));
            evt.handled();     
         }
      }
      --------------

      i use seam-remoting instead of JSF.so my question is how to create a Authorization ExceptionHandler for seam-remoting?