}
if (glob.useCluster() && otherSessionName != null && otherSessionName.getNodeId() != null && !glob.getNodeId().equals(otherSessionName.getNodeId())) {
isForOtherClusterNode = true; // TODO: Create a PtP destination which routes to node
}
if (!isForOtherClusterNode) {
SessionInfo otherSessionInfo = (otherSessionName == null) ? sessionInfo : getAuthenticate().getSessionInfo(otherSessionName);
if (otherSessionInfo == null) {
if ("clearLastError".equals(command) || "clearLastWarning".equals(command)) {
otherSessionInfo = sessionInfo; // global action, just use the login sessionInf
}
else {
log.warning(msgKeyData.getOid() + " failed, sessionName not known: " + (otherSessionName == null ? "" : otherSessionName.getAbsoluteName()));
return Constants.RET_WARN;
}
}
if (__sessionNameStr != null) publishQos.getData().getClientProperties().remove("__sessionName");
String prefix = publishQos.getData().getClientProperty("__prefix", (String)null);
if (prefix != null) publishQos.getData().getClientProperties().remove("__prefix");
if (log.isLoggable(Level.FINE)) log.fine("Processing " + msgKeyData.getOid() + " command=" + str + " on session=" + otherSessionInfo.getSessionName().getRelativeName());
if ("set".equals(command)) {
otherSessionInfo.setRemoteProperties(publishQos.getData().getClientProperties());
}
else if ("clearLastError".equals(command)) {
clearLastError();
}
else if ("clearLastWarning".equals(command)) {
clearLastWarning();
}
else if ("clear".equals(command)) {
otherSessionInfo.clearRemoteProperties(prefix);
}
else // "merge"
otherSessionInfo.mergeRemoteProperties(publishQos.getData().getClientProperties());
I_RemotePropertiesListener[] arr = getRemotePropertiesListenerArr();
for (int i=0; i<arr.length; i++)
arr[i].update(otherSessionInfo, publishQos.getData().getClientProperties());
return Constants.RET_OK;
}