I am not sure my answer will on the subject but since DHIS 2.38 context variable can be used
I have it running with 2 DHIS2, I just use different context file