em.getTransaction().rollback();
emf.close();
}
public void testProgrammaticCfg() throws Exception {
Ejb3Configuration conf = new Ejb3Configuration();
conf.configure( "org/hibernate/ejb/test/ejb3configuration/hibernate.cfg.xml" );
conf.addProperties(getProperties());
EntityManagerFactory emf = conf.buildEntityManagerFactory();
EntityManager em = emf.createEntityManager();
Cat cat = new Cat();
cat.setAge( 23 );
cat.setDateOfBirth( new Date() );
cat.setLength( 32 );