boolean reloadRequired = false;
final String connectionName = PathAddress.pathAddress(operation.get(ModelDescriptionConstants.OP_ADDR)).getLastElement().getValue();
final ServiceName serviceName = RemoteOutboundConnectionService.OUTBOUND_CONNECTION_BASE_SERVICE_NAME.append(connectionName);
final ServiceRegistry registry = context.getServiceRegistry(true);
ServiceController sc = registry.getService(serviceName);
if (sc != null && sc.getState() == ServiceController.State.UP) {
RemoteOutboundConnectionService svc = RemoteOutboundConnectionService.class.cast(sc.getValue());
if (AbstractOutboundConnectionResourceDefinition.CONNECTION_CREATION_OPTIONS.getName().equals(attributeName)) {
svc.setConnectionCreationOptions(AbstractOutboundConnectionAddHandler.getConnectionCreationOptions(model));
} else {
// We can't change the socket binding ref on a running service
reloadRequired = true;