Jan Martiska [
https://community.jboss.org/people/jmartisk] created the discussion
"Re: Unable to catch RuntimeException in client EJB"
To view the discussion, visit:
https://community.jboss.org/message/783835#783835
--------------------------------------------------------------
Oh yeah, I kind of thought so.. I guess you can't catch the exception if it goes from
the onPostInsert callback, because that metod is called asynchronously to any of your
other invocations - after you finish your EJB call.
I guess you can either
- try to throw the exception earlier than during commit, for example right from the
"save" method?
- use bean-managed transactions and try to do the commit yourself in the end of the
"save" method - and if the commit fails, you can parse the exception from it.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/783835#783835]
Start a new discussion in EJB3 at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]