if (loggingIn) {
scheduleTask(new LoginTask());
} else {
try {
sessionService.runTransactionalTask(
new AbstractKernelRunnable("SetSessionRelocated") {
public void run() {
ClientSessionImpl sessionImpl =
ClientSessionImpl.getSession(
dataService, sessionRefId);
sessionImpl.relocationComplete();
} }, identity);
setupSuccess();
} catch (Exception e) {
logger.logThrow(
Level.WARNING, e,
"Relocating ClientSession for identity:{0} " +
"to local node:{1} throws",
identity, sessionService.getLocalNodeId());
notifySetupFailureAndDisconnect(
new RelocateFailureException(
RELOCATE_REFUSED_REASON, e));
return;
}
}
} else {
/*
* Redirect login to assigned (non-local) node.
*/
if (logger.isLoggable(Level.FINE)) {
logger.log(
Level.FINE,
"redirecting login for identity:{0} " +
"from nodeId:{1} to node:{2}",
identity, sessionService.getLocalNodeId(), assignedNodeId);
}
final long nodeId = assignedNodeId;
scheduleNonTransactionalTask(
new AbstractKernelRunnable("SendLoginRedirectMessage") {
public void run() {
try {
try {
loginRedirect(nodeId);
} catch (Exception ex) {