[jboss-dev-forums] [JBoss AS 7 Development] - Re: <error-page> not working for javax.ejb.NoSuchEJBException: JBAS016055

Stephen Coy do-not-reply at jboss.com
Wed Oct 31 23:58:28 EDT 2012


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&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20121031/fdf6e681/attachment.html 


More information about the jboss-dev-forums mailing list