// read transaction
IteratorUtil.count(template.getGraphDatabaseService().getRelationshipTypes());
tx.success();
} catch (Exception e) {
if (tx != null) {
tx.failure();
}
throw new BeanCreationException("transactionManager not correctly configured, please refer to the manual, setup section",e);
} finally {
try {
if (tx != null) tx.close();