6566676869707172737475
bean.setCounter(100); getLog().debug("Try to instantiate a UserTransaction"); UserTransaction userTx = (UserTransaction)ctx.lookup("UserTransaction"); userTx.begin(); bean.incCounter(); bean.incCounter(); userTx.commit(); int counter = bean.getCounter(); assertTrue("counter == 102", counter == 102);
6667686970717273747576
bean.setCounter(100); getLog().debug("Try to instantiate a UserTransaction"); UserTransaction userTx = (UserTransaction)ctx.lookup("UserTransaction"); userTx.begin(); bean.incCounter(); bean.incCounter(); userTx.commit(); int counter = bean.getCounter(); assertTrue("counter == 102", counter == 102); bean.setCounter(100);
7374757677787980818283
int counter = bean.getCounter(); assertTrue("counter == 102", counter == 102); bean.setCounter(100); userTx.begin(); bean.incCounter(); bean.incCounter(); userTx.rollback(); counter = bean.getCounter(); assertTrue("counter == 100", counter == 100);
7475767778798081828384
assertTrue("counter == 102", counter == 102); bean.setCounter(100); userTx.begin(); bean.incCounter(); bean.incCounter(); userTx.rollback(); counter = bean.getCounter(); assertTrue("counter == 100", counter == 100); bean.remove();