Stephen Coy [
https://community.jboss.org/people/sfcoy] created the discussion
"Re: <error-page> not working for javax.ejb.NoSuchEJBException:
JBAS016055"
To view the discussion, visit:
https://community.jboss.org/message/773359#773359
--------------------------------------------------------------
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
[
https://community.jboss.org/message/773359#773359]
Start a new discussion in JBoss AS 7 Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]