contextDepthCount -= 1;
}
}
private AuraContext getContext(String num) throws ClientOutOfSyncException, QuickFixException {
ContextService contextService = Aura.getContextService();
if (contextService.isEstablished()) {
contextDepthCount += 1;
}
DefDescriptor<ApplicationDef> applicationDescriptor = getApplicationDescriptor(application);
AuraContext context;
if (contextDepthCount == 0) {
context = contextService.startContext(mode, Format.JSON, Authentication.AUTHENTICATED, applicationDescriptor);
} else {
context = contextService.getCurrentContext();
}
String cuid = context.getLoaded().get(applicationDescriptor);
String uid = context.getDefRegistry().getUid(cuid, applicationDescriptor);
context.addLoaded(applicationDescriptor, uid);
context.setPreloadedDefinitions(context.getDefRegistry().getDependencies(uid));