/*
* Use MQ specific client socket factory only if:
* - need to specify a specific host/IP on a multihome system
*/
if (jmxHostname != null && !jmxHostname.equals(Globals.HOSTNAME_ALL)) {
MQRMIClientSocketFactory csf
= new MQRMIClientSocketFactory(jmxHostname,
brokerHostTrusted, useSSL);
env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE,
csf);
} else {
/*
* Use MQ specific client socket factory only if:
* - SSL is enabled and brokerHostTrusted is true
* If brokerHostTrusted is false, use the JDK provided
* javax.rmi.ssl.SslRMIClientSocketFactory
*/
if (useSSL) {
if (brokerHostTrusted) {
MQRMIClientSocketFactory csf
= new MQRMIClientSocketFactory(jmxHostname,
brokerHostTrusted, useSSL);
env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE,
csf);
} else {
env.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE,