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

gavin.king@jboss.com do-not-reply at jboss.com
Wed Aug 2 12:56:51 EDT 2006


You would need to do:

anonymous wrote :     public String delete() {
  |         
  |         try {
  |             em.remove(anEntitiy);
  |             em.flush();
  |         } catch (Exception ex) {
  |             ctx.setRollbackOnly();
  |             ...addMessage("Deletion failed!");
  |         }
  |         return "finished";
  |     }



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962557#3962557

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962557



More information about the jboss-user mailing list