public ConnectionParams resolve(String correlationId) throws ApplicationException {
		if (_connections.size() == 0)
			return null;

		// Return connection that doesn't require discovery
		for (ConnectionParams connection : _connections) {
			if (!connection.useDiscovery())
				return connection;
		}

		// Return connection that require discovery
		for (ConnectionParams connection : _connections) {
			if (connection.useDiscovery()) {
				ConnectionParams resolvedConnection = resolveInDiscovery(correlationId, connection);
				if (resolvedConnection != null) {
					// Merge configured and new parameters
					resolvedConnection = new ConnectionParams(
							ConfigParams.mergeConfigs(connection, resolvedConnection));
					return resolvedConnection;
				}
			}
		}

		return null;
	}
public ConnectionParams resolve ( String correlationId ) throws ApplicationException { if ( _connections . size ( ) == 0 ) return null ; for ( ConnectionParams connection : _connections ) { if ( ! connection . useDiscovery ( ) ) return connection ; } for ( ConnectionParams connection : _connections ) { if ( connection . useDiscovery ( ) ) { ConnectionParams resolvedConnection = resolveInDiscovery ( correlationId , connection ) ; if ( resolvedConnection != null ) { resolvedConnection = new ConnectionParams ( ConfigParams . mergeConfigs ( connection , resolvedConnection ) ) ; return resolvedConnection ; } } } return null ; }
Resolves a single component connection. If connections are configured to be
retrieved from Discovery service it finds a IDiscovery and resolves the
connection there.

@param correlationId (optional) transaction id to trace execution through
call chain.
@return resolved connection parameters or null if nothing was found.
@throws ApplicationException when error occured.

@see IDiscovery