Thanks for that hint, Gavin. It works now (*) and I learned something (once
more after one of your posts) ;).
Btw, for those who have the same problem and read this: ctx is the EJB Session
Context, and you can get it via
@Resource
| private SessionContext ctx;
Don't mistake that for the Seam
You would need to do:
anonymous wrote : public String delete() {
|
| try {
| em.remove(anEntitiy);
| em.flush();
| } catch (Exception ex) {
| ctx.setRollbackOnly();
| ...addMessage("Deletion failed!");
|
Well, I just had a look over the stacktrace again and something jumped into my
eye:
at $Proxy112.loeschen(Unknown Source)
|
| or in english:
|
| at $Proxy112.delete(Unknown Source)
|
It seems like the container replaces the delete method by some kind of proxy
that doesn't catch exc