public void testModifyCmrCollectionOusideTx() throws Exception {
resetDB();
beginTransaction();
Set games;
GameLocal newGame;
try {
PlatformLocal platform = findPlatform(new Integer(1));
newGame = createGame(new Integer(33));
games = platform.getGames();
} finally {
completeTransaction();
}
// CMR collections should still be readable
assertFalse(games.isEmpty());
assertEquals(2, games.size());
for (Iterator iter = games.iterator(); iter.hasNext();) {
GameLocal game = (GameLocal) iter.next();
if (game.getId().equals(new Integer(11))) {
assertEquals("value11", game.getName());
} else if (game.getId().equals(new Integer(22))) {
assertEquals("value22", game.getName());
} else {
fail();
}
}