* will trigger client tcp/ip connection. This is controlled
* by <code>TRANSPORT_PROPERTY</code>. We don't touch those and only
* set options related to bindings mode of operation.
*/
public void start() throws BridgeException {
Config conf = provider.getConfig();
String pfx = "port." + name + ".";
/* Queue manager name */
queueMgr = conf.getString(pfx + "queuemgr");
if (queueMgr == null || queueMgr.equals(""))
throw new PortConfigurationException(this, "queue manager property (queuemgr) not set");
/* Connection mode */
connProps = new Hashtable();
String connMode = conf.getString(pfx + "connmode", "bindings");
if (connMode.equals("bindings"))
connProps.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_BINDINGS);
else if (connMode.equals("client"))
connProps.put(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT);
else
throw new PortConfigurationException(this, "connection mode property (connmode) must be either 'bindings' or 'client'");
/* Connection properties */
String hostStr = conf.getString(pfx + "host");
String portStr = conf.getString(pfx + "port");
String chanStr = conf.getString(pfx + "channel");
String userStr = conf.getString(pfx + "user");
String passStr = conf.getString(pfx + "password");
if (connMode.equals("bindings")) {
if (hostStr != null && ! hostStr.equals("") ||
portStr != null & ! portStr.equals("") ||
chanStr != null & ! chanStr.equals("") ||
userStr != null & ! userStr.equals("") ||