0 Replies Latest reply on Aug 8, 2012 2:18 PM by Phillip Davey

    What to expect when you are excepting

    Phillip Davey Newbie

      I have a specific issue but I'm also looking for a general explaination, possibly even at an architectural level, of Seam exception handling.

       

      The issue is: within an actionlistener, a NPE is thrown and left unhandled by the application.  This NPE is wrapped up in an ELException by facelets el's TagMethodExpression.  The ELException is then handled and an AbortProcessingException is raised, then swallowed within the UIViewRoot.  The SeamPhaseListener then commits because setRollbackOnly was never called.  As this NPE occurs halfway through the processing, the entities are in an inconsistent state.

       

      In several situations, specifically Hibernate/JPA-based exceptions, are properly handled and rollback, but why not NPE?

       

      I know there are application exceptions and system exceptions and the ExceptionFilter - but none of this comes into play with this NPE.  http://seamframework.org/Documentation/UnifiedErrorPageAndExceptionHandling talks about the JSF 1.2 spec requiring certain behavior, is this one of those?  I'm concerned that I'll never know when I can depend on rollbacks occurring when an HTTP request has some failure in the processing.

       

      Any takers?  Want to see my stack traces (logged only, which plays into the JSF 1.2 spec behavior possbility)?

       

      Thanks,

      Phil