ConnectQos connectQos = new ConnectQos(authenticate.getGlobal());
connectQos.loadClientPlugin("htpasswd", "1.0", loginName, passwd);
connectQos.getSessionQos().setSessionTimeout(0L);
// TODO: Port to use "LOCAL" protocol to connect
this.addressServer = new AddressServer(authenticate.getGlobal(), "NATIVE", authenticate.getGlobal().getId(), (java.util.Properties)null);
String ret = authenticate.connect(addressServer, connectQos.toXml(), null); // synchronous access only, no callback.
ConnectReturnQos retQos = new ConnectReturnQos(authenticate.getGlobal(), ret);
this.secretSessionId = retQos.getSecretSessionId();
log.info("login for '" + loginName + "' successful.");
}