in src/main/csharp/ConnectionFactory.cs [101:146]
private Uri CreateConnectionFactoryFromURI(Uri factoryUri)
{
try
{
// Remove "xms:" scheme prefix
string originalString = factoryUri.OriginalString;
factoryUri = new Uri(originalString.Substring(
originalString.IndexOf(":") + 1));
// Parse URI properties
StringDictionary properties = URISupport.ParseQuery(
factoryUri.Query);
// The URI scheme specifies either the repository of
// administered objects where the ConnectionFactory object
// is defined, or the target connection type for
// non-administered objects.
switch(factoryUri.Scheme.ToLower())
{
case "rtt":
case "wmq":
case "wpm":
CreateNonAdministeredConnectionFactory(
factoryUri, properties);
break;
case "http":
case "ldap":
case "cosnaming":
case "wsvc":
default:
CreateAdministeredConnectionFactory(
factoryUri, properties);
break;
}
// Configure the instanciated connection factory
ConfigureConnectionFactory(factoryUri, properties);
return new Uri("xms:" + factoryUri.Scheme);
}
catch(Exception ex)
{
ExceptionUtil.WrapAndThrowNMSException(ex);
return null;
}
}