try {
final long root = store.getRoot(rootName, txn);
store.getx(root, txn);
store.set(root, ser.write(actor), txn);
LOG.debug("commit Registering actor {} at rootId {}", actor, root);
store.commit(txn);
RemoteChannelReceiver.getReceiver(LocalActor.getMailbox(actor), true).handleRefMessage(new GlxRemoteChannel.RefMessage(true, grid.cluster().getMyNodeId()));
return root; // root is the global id
} catch (TimeoutException e) {
LOG.error("Registering actor {} at root {} failed due to timeout", actor, rootName);
store.rollback(txn);