public void testJPAOptimisticLock() throws Exception
{
getLog().info("testJPA start");
InitialContext ctx = this.getInitialContext();
SoccerFacade stats = (SoccerFacade) ctx.lookup("ejb3/ejbthree7376/SoccerFacade");
getLog().info("testJPA about to add player");
stats.addPlayer(3,"Kelly Smith","Boston Breakers", 10); // 2009 season
assertNotNull("player is null", stats.getPlayer(3));
getLog().info("testJPA player added. About to look up player");
Player p = stats.getPlayerOptimisticLock(3);
assertNotNull("player is null" , p);
assertEquals(p.getName(), "Kelly Smith");
assertEquals(p.getTeam(), "Boston Breakers");
getLog().info("testJPA end");