try {
boolean notTxOwner = txm.begin();
Serializable s = generateId(mainObject);
mainObject.setId(Long.valueOf(s.toString()));
cache.put(s, mainObject);
txm.rollback(notTxOwner);
} catch ( Exception e ) {
fail("There should not be an exception thrown here: " + e.getMessage());
}
}