Hi, here's my code. I want to show an error message if it's impossible to commit. But it seems my action still display the 'success' result.
can anybody help me? public String intercept(ActionInvocation invocation) throws Exception { String retour = Action.ERROR; try { sf.getCurrentSession().beginTransaction(); retour = invocation.invoke(); sf.getCurrentSession().getTransaction().commit(); } catch(Exception e) { try{ Transaction tx = sf.getCurrentSession().getTransaction(); if(tx != null && tx.isActive()) { tx.rollback(); } }catch (Exception e1) { e1.printStackTrace(); } retour = Action.ERROR; } return retour; } --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org