in src/main/java/com/azure/servicebus/jms/ServiceBusJmsConnectionFactory.java [327:360]
protected void setProperties(Map<String, String> properties) {
if (properties == null) {
throw new IllegalArgumentException("The given properties should not be null.");
}
// TODO: support JNDI for the various configurations of ServiceBusJmsConnectionFactorySettings
String connectionString = null;
String clientId = null;
for (Map.Entry<String,String> property : properties.entrySet()) {
String propertyName = property.getKey();
if (propertyName != null) {
if (propertyName.equalsIgnoreCase(CONNECTION_STRING_PROPERTY)) {
connectionString = property.getValue();
}
if (propertyName.equalsIgnoreCase(CLIENT_ID_PROPERTY)) {
clientId = property.getValue();
}
}
}
this.checkRequiredProperty(CONNECTION_STRING_PROPERTY, connectionString);
this.builder = new ConnectionStringBuilder(connectionString);
this.password = this.builder.getSasKey();
this.userName = this.builder.getSasKeyName();
this.host = this.builder.getEndpoint().getHost();
this.initializeWithSas();
// Need to wait until the inner factory is initialized in order to set the clientId
if (!StringUtil.isNullOrEmpty(clientId)) {
// QPID does not allow setting null or empty clientId
this.setClientId(clientId);
}
}