Package org.jboss.as.test.integration.ejb.entity.cmp.optimisticlock.bug1006723.testsession

Examples of org.jboss.as.test.integration.ejb.entity.cmp.optimisticlock.bug1006723.testsession.TestSessionHome


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;
        }
    }
View Full Code Here


        }
    }

    public void test(Long entityAOID) throws Exception {
        try {
            EntityALocal entityA = getEntityALocalHome().findByPrimaryKey
                    (entityAOID);
            Iterator entityBs = entityA.listEntityBs().iterator();
            while (entityBs.hasNext()) {
                ((EntityBLocal) entityBs.next()).setLastModified(new Date());
            }
        } catch (Exception e) {
            sessionContext.setRollbackOnly();
View Full Code Here

    // Tests -----------------------------------------
    @Test
    public void testBug1006723() throws Exception {
        TestSessionHome testSessionRemoteHome = (TestSessionHome)iniCtx.lookup("java:global/cmp-optimisticlock/TestSession!org.jboss.as.test.integration.ejb.entity.cmp.optimisticlock.bug1006723.testsession.TestSessionHome");
        TestSession testSessionRemote = testSessionRemoteHome.create();
        Long oID = testSessionRemote.setup();
        testSessionRemote.test(oID);
    }
View Full Code Here

    }

    // Tests -----------------------------------------
    @Test
    public void testBug1006723() throws Exception {
        TestSessionHome testSessionRemoteHome = (TestSessionHome)iniCtx.lookup("java:global/cmp-optimisticlock/TestSession!org.jboss.as.test.integration.ejb.entity.cmp.optimisticlock.bug1006723.testsession.TestSessionHome");
        TestSession testSessionRemote = testSessionRemoteHome.create();
        Long oID = testSessionRemote.setup();
        testSessionRemote.test(oID);
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.test.integration.ejb.entity.cmp.optimisticlock.bug1006723.testsession.TestSessionHome

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.