}
@Override
public void postCommandExecuted(UICommand command, UIExecutionContext context, Result result)
{
ResourceTransaction transaction = factory.getTransaction();
if (!otherTransactionListener.isInForeignTransaction())
{
if (result instanceof Failed)
{
if (transaction.isStarted())
{
transaction.rollback();
}
}
else
{
if (transaction.isStarted())
{
transaction.commit();
}
List<ResourceEvent> events = new ArrayList<>(aggregator.getResourceEvents());
aggregator.clear();
Collections.sort(events, new Comparator<ResourceEvent>()