}
public Node get(Identity identity) throws UnknownIdentityException {
assert identity != null;
// Check the cache
Node node = idcache.get(identity);
if (node != null) {
return node;
}
String key = NodeMapUtil.getIdentityKey(identity);
try {
IdentityMO idmo =
(IdentityMO) dataService.getServiceBinding(key);
node = watchdogService.getNode(idmo.getNodeId());
if (node == null) {
// The identity is on a failed node, where the node has
// been removed from the data store but the identity hasn't
// yet.
throw new UnknownIdentityException("id: " + identity);
}
Node old = idcache.put(identity, node);
assert (old == null);
return node;
} catch (NameNotBoundException e) {
throw new UnknownIdentityException("id: " + identity);
} catch (ObjectNotFoundException e1) {