log.info("testCollectionTxWithRollback() ....");
UserTransaction tx = getTransaction();
Person joe = new Person();
joe.setName("Joe");
Address add = new Address();
add.setZip(104);
add.setCity("Taipei");
joe.setAddress(add);
ArrayList lang = new ArrayList();
lang.add("English");
lang.add("Taiwanese");
lang.add("Mandirin");
joe.setLanguages(lang);
tx.begin();
cache_.putObject("/person/joe", joe);
tx.commit();
Person p = (Person)cache1_.getObject("/person/joe");
assertEquals("Zip should be the same ", joe.getAddress().getZip(), p.getAddress().getZip());
// test rollback
Person ben = new Person();
ben.setName("Ben");
add = new Address();
add.setZip(104);
add.setCity("Taipei");
ben.setAddress(add);
tx.begin();
cache_.putObject("/person/ben", ben);
tx.rollback();
assertEquals("Zip should be the same ", joe.getAddress().getZip(), p.getAddress().getZip());