@Override
public Object handle(CommandMessage<?> commandMessage, UnitOfWork unitOfWork,
InterceptorChain interceptorChain)
throws Throwable {
unitOfWork.registerListener(new UnitOfWorkListenerAdapter() {
@Override
public void onPrepareCommit(UnitOfWork unitOfWork, Set<AggregateRoot> aggregateRoots,
List<EventMessage> events) {
Iterator<AggregateRoot> iterator = aggregateRoots.iterator();
if (iterator.hasNext()) {