0 Replies Latest reply on Mar 2, 2007 11:49 AM by francesco milesi

    problem with Faces Messages in server interceptor

    francesco milesi Newbie

      Hi everybody,

      I created an interceptor of type InterceptorType.SERVER (I understand it should be the innermost, eg the one that directly calls the methods of my itercepted classes).
      The interceptor works fine, but when in its @AroundInvoke method I trap an exception, add a faces message using the following code

      FacesMessages facesMessages = (FacesMessages) Component.getInstance(FacesMessages.class);
      facesMessages.addFromResourceBundle(
       FacesMessage.SEVERITY_ERROR, "msgs.db.constraint", "", e.getMessage());
      


      and rethrow the exception, most of the time the message does not show up in the error page. It seams that if I set a breakpoint after adding the message, stop the execution for a while and then resume it I can see it. It looks like if I wait long enough I can see it, as if it is set by a concurrent thread.
      Is that possible? otherwise what's going on ? Did I do anything illegal, adding faces messages from my interceptor ?

      Thanks in advance for help

      Ciao Francesco