[jboss-user] [JBoss Seam] - Re: How to catch exception when deleting?

2006-08-03 Thread bfo81
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

[jboss-user] [JBoss Seam] - Re: How to catch exception when deleting?

2006-08-02 Thread [EMAIL PROTECTED]
You would need to do: anonymous wrote : public String delete() { | | try { | em.remove(anEntitiy); | em.flush(); | } catch (Exception ex) { | ctx.setRollbackOnly(); | ...addMessage("Deletion failed!"); |

[jboss-user] [JBoss Seam] - Re: How to catch exception when deleting?

2006-08-02 Thread bfo81
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