| 
      
      
      From: Gavin_King/Cirrus%<CI...@ci...> - 2002-02-28 09:40:50
      
     | 
| I think more along the lines of:
        Session session = sessionFactory.openSession();
        try {
            session.save(object);
            session.commit();
        }
        catch(SQLException e) {
           try {
              session.cancel();
           }
           catch {}
           ....
        }
        catch(Exception e) {
           try {
              session.cancel();
           }
           catch {}
           ....
        }
However, I believe there is a small chance of a null pointer exception from
session.cancel() in the released version. I think I've got it right in CVS.
I would appreciate if you could review the CVS versions of commit(), cancel
(),
close() in RelationalDatabaseSession and tell me if I missed anything...
 |