JBoss Community

Re: not working for javax.ejb.NoSuchEJBException: JBAS016055

created by Stephen Coy in JBoss AS 7 Development - View the full discussion

You can't catch this particular exception in an error page because it is happening in a background thread rather than the request processing thread.

 

With respect to your original problem, you need to be careful with exception handling in stateful EJBs because the container will unceremoniously remove it if a java.lang.RuntimeException is thrown from it. This is because the bean is then considered to be in an inconsistent state.

 

If it's normal to expect a transaction failure from time to time (duplicate keys comes to mind here) then you may be better off performing that particular operation from a stateless EJB.

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community