// return this instance instead.
String key = String.format("%1s:%2s:%3s", uri, exchangePattern, responseTimeout);
OutboundEndpoint endpoint = (OutboundEndpoint) outboundEndpointCache.get(key);
if (endpoint == null)
{
EndpointBuilder endpointBuilder =
muleContext.getEndpointFactory().getEndpointBuilder(uri);
endpointBuilder.setExchangePattern(exchangePattern);
if (responseTimeout != null && responseTimeout > 0)
{
endpointBuilder.setResponseTimeout(responseTimeout.intValue());
}
endpoint = muleContext.getEndpointFactory().getOutboundEndpoint(endpointBuilder);
OutboundEndpoint concurrentlyAddedEndpoint =
(OutboundEndpoint) outboundEndpointCache.putIfAbsent(key, endpoint);
if (concurrentlyAddedEndpoint != null)