VersionedPOJO.java |
/* * JBoss, the OpenSource J2EE webOS * * Distributable under LGPL license. * See terms of license at gnu.org. */ package org.jboss.test.aop.bean; /** * * @author <a href="mailto:bill@jboss.org">Bill Burke</a> * @version $Revision: 1.3.6.1 $ */ public class VersionedPOJO implements java.io.Serializable { static final long serialVersionUID = -8978530049811196805L; public VersionedPOJO() { field = 0; } private int field; public int getField() { return field; } public void setField(int val) { field = val; } public void testOptimisticLock() { field = 5; requiresNew(); } public void requiresNew() { field = 1; } public void testRollback() { field = 5; throw new RuntimeException("Roll it back"); } }
VersionedPOJO.java |