public class TestSessionBean implements SessionBean {
public Long setup() throws Exception {
try {
/* Add an entity A and then add some entity Bs to it. */
EntityALocal entityA = getEntityALocalHome().create(new Long(1));
entityA.addEntityB(getEntityBLocalHome().create(new Long(2)));
return entityA.getOID();
} catch (Exception e) {
sessionContext.setRollbackOnly();
throw e;
}
}