title: Seam centralized exceptions
body: <p>i'm using seam 2.2, primefaces as view presentation layer.
  I would write some kind of infrastructure in order to capture all exceptions.
  For example i put in a facelets following piece of code:</p>
  
  <pre><code>&lt;p:commandButton actionListener="#{mySeamController.aMethod()}"
  </code></pre>
  
  <p>in MySeamController class, the above method:</p>
  
  <pre><code>public void aMethod()
  {
      throw new NullPointerException();
  }
  </code></pre>
  
  <p>in the controller i write a method:</p>
  
  <pre><code> @Observer("myapp.exceptions.exception")
   public void onSystemException(Exception e)
   {  
    System.out.println("a exception was occurred");
  
   }
  </code></pre>
  
  <p>i write a class to catch exceptions:</p>
  
  <pre><code>@Scope(ScopeType.APPLICATION)
  @BypassInterceptors
  @Install( precedence = Install.MOCK, classDependencies = "javax.faces.context.FacesContext")
  @Name("org.jboss.seam.exception.exceptions")
  public class ExceptionHandler extends org.jboss.seam.exception.Exceptions{
  
  
   private static final long serialVersionUID = 1L;
   @Logger
      Log log;
  
   public void handle(Exception e) throws Exception 
   {            
    Events.instance().raiseEvent("myapp.exceptions.exception", e);
    super.handle(e);
  
   }
  }
  </code></pre>
  
  <p>but i've noticed taht when i use an actionListener</p>
  
  <pre><code>&lt;p:commandButton actionListener="#{mySeamController.aMethod()}"
  </code></pre>
  
  <p>instead of an action </p>
  
  <pre><code>&lt;p:commandButton action="#{mySeamController.aMethod()}"
  </code></pre>
  
  <p>no exception was observed by ExceptionHandler class.
  Why? Can anyone help?
  Best regards</p>