"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&a...
See posts starting from April, 12.
And search the forum for "entiyManager.flush" or something. You should find what
you need.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039966#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...