Package org.jboss.as.test.integration.jpa.basic

Examples of org.jboss.as.test.integration.jpa.basic.Employee


      EntityManagerFactory emf = rawLookup("myEMF",EntityManagerFactory.class);
        assertNotNull("JNDI lookup of jboss.entity.manager.factory.jndi.name should return EntityManagerFactory", emf);

        EntityManager em = emf.createEntityManager();
        Employee emp = (Employee)em.find(Employee.class,1);
        assertTrue("Name read from EntityManager is Sally", "Sally".equals(emp.getName()));

    }
View Full Code Here


        sfsb1.createEmployee("Sharon","304 Bubbles Lane", 2);

      EntityManager em = rawLookup("java:/Manager1",EntityManager.class);
        assertNotNull("JNDI lookup of jboss.entity.manager.jndi.name should return EntityManager", em);

        Employee emp = em.find(Employee.class,2);
        assertTrue("Name read from EntityManager is Sharon", "Sharon".equals(emp.getName()));

    }
View Full Code Here

TOP

Related Classes of org.jboss.as.test.integration.jpa.basic.Employee

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.