Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/17/13 14:59:36 (11 years ago)
Author:
pfleck
Message:

#2030:
In HiveServiceLocator: added public properties for endpointRetries and workingEndpoint.
Changed Config default settings.
Changed wshttp encoding to text for backwards compatibility.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HivePerformance/sources/HeuristicLab.Clients.Hive/3.3/HiveServiceLocator.cs

    r9539 r9637  
    3535    }
    3636
     37    private HiveServiceLocator() {
     38    }
     39
    3740    private string username;
    3841    public string Username {
     
    4750    }
    4851
    49     private int endpointRetries;
     52    public int EndpointRetries { get; private set; }
    5053
    51     private string workingEndpoint;
     54    public string WorkingEndpoint { get; private set; }
    5255
    5356    private HiveServiceClient NewServiceClient() {
    54       if (endpointRetries >= Settings.Default.MaxEndpointRetries) {
    55         return CreateClient(workingEndpoint);
     57      if (EndpointRetries >= Settings.Default.MaxEndpointRetries) {
     58        return CreateClient(WorkingEndpoint);
    5659      }
    5760
     
    6366          var cl = CreateClient(endpointConfigurationName);
    6467          cl.Open();
    65           workingEndpoint = endpointConfigurationName;
     68          WorkingEndpoint = endpointConfigurationName;
    6669          return cl;
    6770        }
    6871        catch (Exception exc) {
    6972          exception = exc;
    70           endpointRetries++;
     73          EndpointRetries++;
    7174        }
    7275      }
    7376
    74       throw exception;
     77      throw exception ?? new Exception("No endpoint for Hive service found.");
    7578    }
    7679
Note: See TracChangeset for help on using the changeset viewer.