Instead of programmatically calling beginTransaction() and commit, put an @Transactional annotation on this method.