/* 94 */ String username = (String)mi.getArguments()[0];
/* 95 */ String password = (String)mi.getArguments()[1];
/* 96 */ Integer failedNodeID = (Integer)mi.getArguments()[2];
/* */
/* 101 */ int attemptCount = 0;
/* 102 */ ClientConnectionFactoryDelegate delegate = null;
/* */
/* 104 */ while (attemptCount < 10)
/* */ {
/* 108 */ attemptCount++;
/* */
/* 110 */ int nextHopingServer = -1;
/* */ try
/* */ {
/* 113 */ int failedNodeIDToServer = -1;
/* 114 */ if (delegate == null)
/* */ {
/* 116 */ if ((failedNodeID != null) && (failedNodeID.intValue() >= 0))
/* */ {
/* 119 */ delegate = getFailoverDelegateForNode(failedNodeID);
/* 120 */ failedNodeIDToServer = failedNodeID.intValue();
/* 121 */ nextHopingServer = delegate.getServerID();
/* */ }
/* */ else
/* */ {
/* 126 */ LoadBalancingPolicy loadBalancingPolicy = this.clusteredDelegate.getLoadBalancingPolicy();
/* 127 */ delegate = (ClientConnectionFactoryDelegate)loadBalancingPolicy.getNext();
/* */ }
/* */ }
/* */
/* 131 */ log.trace(this + " has chosen " + delegate + " as target, " + (attemptCount == 0 ? "first connection attempt" : new StringBuilder().append(attemptCount).append(" connection attempts").toString()));
/* */
/* 134 */ CreateConnectionResult res = delegate.createConnectionDelegate(username, password, failedNodeIDToServer);
/* */
/* 137 */ ClientConnectionDelegate cd = res.getDelegate();
/* */
/* 139 */ if (cd != null)
/* */ {