transactionTemplate.execute(new TransactionCallback<Object>() {
public Object doInTransaction(TransactionStatus status) {
// make use of the EntityManager having the relevant persistence-context
EntityManager entityManager2 = receivedExchange.getIn().getHeader(JpaConstants.ENTITYMANAGER, EntityManager.class);
entityManager2.joinTransaction();
// now lets assert that there are still 2 entities left
List<?> rows = entityManager2.createQuery("select x from MultiSteps x").getResultList();
assertEquals("Number of entities: " + rows, 2, rows.size());