0 Replies Latest reply on Jan 26, 2007 1:18 AM by maxjj

    Ejb Transaction problem

    maxjj

      hi All
      I am using EJB/JBoss with Netbean.
      i want to write my own Transaction in the session bean. i have declare my code as follows...
      UserTransaction ut=Context.getUserTransaction();
      try{
      ut.begin();
      Lhome.create(id,name,age);
      ut.commit();
      }catch(Exception e){
      try{
      ut.rollback();
      }catch(exception e){
      }
      }

      when i insert duplicate entry in to the create method it will not produce any error and insert other records in to the database. it does not rollback.

      is there any JBoss Xml file to Edit accept ejb-jar.xml ?
      please help .....
      dush