// test that we didn't break the Hibernate hibernate.session_factory_name (bind Hibernate session factory to
// specified jndi name) functionality.
@Test
public void testHibernateSessionFactoryName() throws Exception {
SFSB1 sfsb1 = lookup("SFSB1", SFSB1.class);
sfsb1.createEmployee("Sally","1 home street", 1);
// check if we can look up the Hibernate session factory that should of been bound because of
// the hibernate.session_factory_name was specified in the properties (in peristence.xml above).
SessionFactory hibernateSessionFactory = rawLookup("modelSessionFactory",SessionFactory.class);
assertNotNull("jndi lookup of hibernate.session_factory_name should return HibernateSessionFactory", hibernateSessionFactory);