protected void cleanupRepository() {
// must type cast with Spring 2.x
jpaTemplate = applicationContext.getBean("jpaTemplate", JpaTemplate.class);
TransactionTemplate transactionTemplate = new TransactionTemplate();
transactionTemplate.setTransactionManager(new JpaTransactionManager(jpaTemplate.getEntityManagerFactory()));
transactionTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
transactionTemplate.execute(new TransactionCallback<Boolean>() {
public Boolean doInTransaction(TransactionStatus arg0) {
@SuppressWarnings("rawtypes")