protected void setUp() throws Exception {
tm = new GeronimoPlatformTransactionManager();
// Create an embedded database for testing tx results when commit / rollback
ConnectionManagerFactoryBean cmFactory = new ConnectionManagerFactoryBean();
cmFactory.setTransactionManager(tm);
cmFactory.setTransaction("xa");
cmFactory.afterPropertiesSet();
ConnectionManager cm = (ConnectionManager) cmFactory.getObject();
ManagedConnectionFactory mcf = new DerbyDataSourceMCF("target/testdb");
dataSource = (DataSource) mcf.createConnectionFactory(cm);
JdbcStoreFactory f = new JdbcStoreFactory();
f.setTransactional(true);
f.setDataSource(dataSource);