0 Replies Latest reply on Jan 20, 2013 8:50 PM by Jubril Adisa

    Transaction RollBack

    Jubril Adisa Novice

      I am using Seam 2.3 , In my code i have

       

      try{

                          Session session=retrieveSession();

                          Query query=session.createSQLQuery("delete from favourite where user_id=:userId and dest_userId=:destUserId");

                          query.setParameter("userId", userId);

                          query.setParameter("destUserId", destUserId);

                          query.executeUpdate();

                          int i=10/0;

                          }catch(Exception e){

                                    throw new DatabaseException(e);

                          }

       

      I discovered that even though an error occured int i=10/0, A rollback did not occur, The record was deleted, Please how do i ensure that rollback occurs whenever my application encounters an error

       

      Jubril