@Override protected void setUpResources(DataSource dataSource) throws Exception { entityManagerFactory = getEntityManagerFactory(dataSource); JpaTransactionManager tm = new JpaTransactionManager(entityManagerFactory); executionListener = new JpaFlowExecutionListener(entityManagerFactory, tm); rowCount = 1; }
@Override protected FlowExecutionListener createFlowExecutionListener() { entityManagerFactory = getEntityManagerFactory(getDataSource()); JpaTransactionManager tm = new JpaTransactionManager(entityManagerFactory); return new JpaFlowExecutionListener(entityManagerFactory, tm); }
protected void setUp() throws Exception { DataSource dataSource = getDataSource(); populateDataBase(dataSource); jdbcTemplate = new JdbcTemplate(dataSource); entityManagerFactory = getEntityManagerFactory(dataSource); JpaTransactionManager tm = new JpaTransactionManager(entityManagerFactory); jpaListener = new JpaFlowExecutionListener(entityManagerFactory, tm); }