update rowId jeckels  2009-05-01 11:24
Status: Closed
 
Hi Bill,

Yes, you can use transactions with those methods on Table. The general pattern is:

tableInfo.getSchema().getScope().beginTransaction();
try
{
    // Do some calls to Table.insert(), etc

    tableInfo.getSchema().getScope().commitTransaction();
}
finally
{
    tableInfo.getSchema().getScope().closeConnection();
}

This will make sure that your connection is closed properly, and that your transaction rolls back if there were any exceptions.

Thanks,
Josh