transactionManager.rollback(transactionStatus);
}
private SessionFactory createTestSessionFactory() throws Exception {
// create a FactoryBean to help create a Hibernate SessionFactory
LocalSessionFactoryBean factoryBean = new LocalSessionFactoryBean();
factoryBean.setDataSource(createTestDataSource());
Resource[] mappingLocations = new ClassPathResource[] {
new ClassPathResource("Account.hbm.xml", Account.class),
new ClassPathResource("Beneficiary.hbm.xml", Beneficiary.class) };
factoryBean.setMappingLocations(mappingLocations);
factoryBean.setHibernateProperties(createHibernateProperties());
// initialize according to the Spring InitializingBean contract
factoryBean.afterPropertiesSet();
// get the created session factory
return (SessionFactory) factoryBean.getObject();
}