try
{
LoggingTransactionalDatabase<String, String, Long> db2 = new LoggingTransactionalDatabase<String, String, Long>(new HeapBackend<String, String>(new ReadWritableFileAdapter(f2), false, StringSerializer.INSTANCE, StringSerializer.INSTANCE, lah), new ReadWritableFileAdapter(f2l), StringSerializer.INSTANCE, StringSerializer.INSTANCE, lah);
try
{
Transaction txn = Transaction.startTransaction(false);
db2.insert("years", "2007");
txn.commit();
runExampleMethodTest("pg/ex/ex_transaction.javaa", codePrefix, "return null;\r\n", null, new Object[] { db1, db2 }, null);
txn = Transaction.startTransaction(true);
try
{
assertEquals(1, db1.size());
assertTrue(db1.containsKey("lastUpdate"));
assertEquals(1, db2.size());
assertEquals("2007, 2008", db2.get("years"));
}
finally
{
txn.rollback();
}
}
finally
{
db2.close();