use of org.nutz.dao.impl.NutTxDao in project nutz by nutzam.
the class SimpleDaoTest method test_nutz_tx_dao.
@Test
public void test_nutz_tx_dao() throws Throwable {
for (int i = 0; i < 1000; i++) {
NutTxDao tx = new NutTxDao(dao);
try {
tx.beginRC();
tx.query(Pet.class, null);
tx.commit();
} catch (Throwable e) {
tx.rollback();
throw e;
} finally {
tx.close();
}
}
}