final String getLocatorUrl(String thisUrl) { final DSConnectionInfo dsInfo = this.failoverQueryInfo_; final NetConnection locateConn; if (dsInfo != null && (locateConn = dsInfo.locateConn_) != null) { return locateConn.getServerLocation(); } return (thisUrl != null ? thisUrl : getServerLocation()); }
final String getLocatorUrl(String thisUrl) { final DSConnectionInfo dsInfo = this.failoverQueryInfo_; final NetConnection locateConn; if (dsInfo != null && (locateConn = dsInfo.locateConn_) != null) { return locateConn.getServerLocation(); } return (thisUrl != null ? thisUrl : getServerLocation()); }
protected final java.util.Set handleFailover(java.util.Set failedUrls, SqlException ex, FailoverStatus status) throws SqlException { final String thisUrl = getServerLocation(); if (SanityManager.TraceClientStatementHA) { SanityManager.DEBUG_PRINT(SanityManager.TRACE_CLIENT_HA, "server '" + thisUrl + "' failed for operation; trying failover"); } if (failedUrls == null) { failedUrls = new java.util.HashSet(); } // indicate that this is a failover retry that will enable setting // the posDup flag on server for next statement that will be executed this.statementFailover_ = true; createNewAgentOrReset(this.netAgent_.logWriter_, this.loginTimeout_, thisUrl, this.netAgent_.server_, new int[] { this.netAgent_.port_ }, this.clientSSLMode_, failedUrls, ex, status); // reset the statement failover flag for the connection to false; // can be safely cleared since the handshake has already sent the flag this.statementFailover_ = false; // if failover successful then mark connection as open markOpen("handleFailover"); if (SanityManager.TraceClientStatementHA) { SanityManager.DEBUG_PRINT(SanityManager.TRACE_CLIENT_HA, "failover for server '" + thisUrl + "' complete for operation"); } return failedUrls; }
protected final java.util.Set handleFailover(java.util.Set failedUrls, SqlException ex, FailoverStatus status) throws SqlException { final String thisUrl = getServerLocation(); if (SanityManager.TraceClientStatementHA) { SanityManager.DEBUG_PRINT(SanityManager.TRACE_CLIENT_HA, "server '" + thisUrl + "' failed for operation; trying failover"); } if (failedUrls == null) { failedUrls = new java.util.HashSet(); } // indicate that this is a failover retry that will enable setting // the posDup flag on server for next statement that will be executed this.statementFailover_ = true; createNewAgentOrReset(this.netAgent_.logWriter_, this.loginTimeout_, thisUrl, this.netAgent_.server_, new int[] { this.netAgent_.port_ }, this.clientSSLMode_, failedUrls, ex, status); // reset the statement failover flag for the connection to false; // can be safely cleared since the handshake has already sent the flag this.statementFailover_ = false; // if failover successful then mark connection as open markOpen("handleFailover"); if (SanityManager.TraceClientStatementHA) { SanityManager.DEBUG_PRINT(SanityManager.TRACE_CLIENT_HA, "failover for server '" + thisUrl + "' complete for operation"); } return failedUrls; }
SanityManager.DEBUG_PRINT(SanityManager.TRACE_CLIENT_HA, "Using control connection to host[port] '" + conn .getServerLocation() + "' with refresh=" + refreshServerList);
SanityManager.DEBUG_PRINT(SanityManager.TRACE_CLIENT_HA, "Using control connection to host[port] '" + conn .getServerLocation() + "' with refresh=" + refreshServerList);