try {
// Lookup server scope when connected using host and application name
IGlobalScope global = server.lookupGlobal(host, path);
log.trace("Global lookup result: {}", global);
if (global != null) {
final IContext context = global.getContext();
IScope scope = null;
try {
// TODO optimize this to use Scope instead of Context
scope = context.resolveScope(global, path);
// if global scope connection is not allowed, reject
if (scope.getDepth() < 1 && !globalScopeConnectionAllowed) {
call.setStatus(Call.STATUS_ACCESS_DENIED);
if (call instanceof IPendingServiceCall) {
IPendingServiceCall pc = (IPendingServiceCall) call;