@Override
public void execute(RuntimeTaskContext context) throws OperationFailedException {
final ServiceTarget serviceTarget = context.getServiceTarget();
ModifiableResourceAdapeters resourceAdapters = buildResourceAdaptersObject(operation);
final ServiceController<?> raService = context.getServiceRegistry().getService(
ConnectorServices.RESOURCEADAPTERS_SERVICE);
if (raService == null) {
serviceTarget
.addService(ConnectorServices.RESOURCEADAPTERS_SERVICE,
new ResourceAdaptersService(resourceAdapters)).setInitialMode(Mode.ACTIVE).install();
} else {
((ModifiableResourceAdapeters) raService.getValue()).addAllResourceAdapters(resourceAdapters
.getResourceAdapters());
}
resultHandler.handleResultComplete();