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

Examples of org.jboss.as.test.integration.jpa.hibernate.SFSBHibernateSessionFactory


    }

    // Test that a Persistence unit can be injected into a Hibernate Session factory
    @Test
    public void testInjectPUIntoHibernateSessionFactory() throws Exception {
        SFSBHibernateSessionFactory sfsbHibernateSessionFactory =
            lookup("SFSBHibernateSessionFactory",SFSBHibernateSessionFactory.class);
        sfsbHibernateSessionFactory.createEmployee("Sharon", "3 beach ave", 3);

        Employee emp = sfsbHibernateSessionFactory.getEmployee(3);
        assertTrue("name read from hibernate session is Sharon", "Sharon".equals(emp.getName()));
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.test.integration.jpa.hibernate.SFSBHibernateSessionFactory

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.