replicationRequestAuthorizationStrategy.checkPermission(resourceResolver, replicationRequest);
return scheduleImport(exportPackages(agentResourceResolver, replicationRequest));
} catch (Exception e) {
log.error("Error executing replication request {}", replicationRequest, e);
throw new ReplicationAgentException(e);
} finally {
ungetAgentResourceResolver(agentResourceResolver);
}