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

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


    /**
     * Test that EntityManagerFactory can be bind to specified JNDI name
     */
    @Test
    public void testEntityManagerFactoryName() throws Exception {
        SFSB1 sfsb1 = lookup("SFSB1", SFSB1.class);
        sfsb1.createEmployee("Sally","1 home street", 1);

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

        EntityManager em = emf.createEntityManager();
View Full Code Here


    /**
     * Test that EntityManager can be bound to specified JNDI name in persistence unit property jboss.entity.manager.jndi.name (AS7-6835)
     */
    @Test
    public void testEntityManagerName() throws Exception {
        SFSB1 sfsb1 = lookup("SFSB1", SFSB1.class);
        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);
View Full Code Here

TOP

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

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.