This content has been marked as final.
Show 2 replies
-
1. Re: Unable to catch exception in remove method
markfoerstein Apr 23, 2007 2:05 PM (in response to jpviragine)"jpviragine" wrote:
Hi, I'm unable to catch exceptions in remove method (SLSB):public void remove(T entity) { try { entityManager.remove(entity); } catch (Exception e) { log.error("Error!"); } }
The class/method that invoke the above code never appears in stack trace.
Any idea?
Thanks,
Joao Paulo
Hi Joao, Im brazilian too.
The problem is that you're not flushing the entity manager. This is discussed in another topic. There's no way you can catch that exception without flushing the entity manager.
Take a look at this topic, maybe it should help you:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=100188&postdays=0&postorder=asc&start=10
See posts starting from April, 12.
And search the forum for "entiyManager.flush" or something. You should find what you need. -
2. Re: Unable to catch exception in remove method
jpviragine Apr 24, 2007 6:43 AM (in response to jpviragine)Thanks a lot.