[TASK] Use ApplicationContext when available