0 Replies Latest reply on Feb 22, 2006 12:46 PM by cagean cagean

    Using A Transaction

    cagean cagean Newbie

      I need to know how to use a transaction when i'm going to do some inserts, updates or deletes y diferents databases, but the all databases are in postgres, so the function will be some like this:

      UserTransaction ut = new UserTransaction();

      try{

      ut.begin();

      // I get the diferents datasources and the conections
      // execute the insert, delete, or update

      ut.commit();
      catch(Exception e)
      {
      ut.rollback()
      }

      }

      The code does not throw any exceptions but, the commit is not executed.
      just do nothing

      What Happend??????'