3 Replies Latest reply on Jan 24, 2014 4:06 PM by Wolf-Dieter Fink

    EJB "shutdown exception" is not caught by EJB interceptors

    Nicky Mølholm Newbie

      Hi Guys,

       

      This might be "working as designed". However I was a bit surprised of the interceptor precedence here.

       

      Using: JBoss AS 7.2 Final.

       

      I have a "BeanA" that invokes a method on "BeanB" in a @Timeout method. Both beans are EJB session beans.

       

      Upon shutdown of the application server, BeanA receives this exception:

      javax.ejb.EJBException: JBAS014559: Invocation cannot proceed as component is shutting down
      

       

      I hoped that I could write a default EJB  interceptor that catches this exception. But it turns out that the BeanB EJB proxy never get's to call my interceptor - since an internal EJB stack interceptor blows up first....

       

      ( My intention is to perform some internal translation to a typesafe EJBException subclass )

       

      Anyways - is it possible to instruct JBoss AS 7.2 to give application interceptors precedence to system interceptors ? If not - then that would be nice (regarding security concerns...cannot imagine any loopholes here...)