In the previous versions, there was an XML tag in dhis_external(WEB INF) access library which we could reroute the DHIS2 to a different instance (database). where that has been moved in 2.33?
I am not sure about this tag you refer to. And what is dhis_external. Can you explain a bit more about your system setup?
thank you @bobj for the reply. I have a setup in Windows Server 2016 for development and testing purposes. previously, there was a bean.xml (
WEB-INF/lib/dhis-support-external-2.32.4/META-INF/dhis/bean.xml) to route the second instance to a different database.
but in 2.33 I couldn’t find that where this has been moved? to setup another instance within the same machine.
Now I see what you mean. I have seen others do something like this before (UNICEF?). I gues this then allows you to run multiple wars on the same tomcat with different DHIS2_HOME variables.
It is a bit of a hack doing it that way. Probably it is better to run multiple tomcats, each one serving just one DHIS2 war file. That way you could provide different values for DHIS2_HOME environment variable for each instance.
Sorry I don’t have much experience running DHIS2 on windows, but this is typically the way people have done it on linux. Or better still run DHIS2 in completely separate containers, though for dev purposes you are probably fine doing like above.
thank you @bobj. actually, I am running two instances of tomcat with separate war files. here I asked where I can set a different name for DHIS2_HOME in WAR file.
OK. Then there is no need to edit DHIS2_HOME inside the web application. That is not the best place to do it.
When DHIS2 starts it looks first for an environment variable. If you have two tomcats they will both have different sartup scripts … you could set the envronment variable there. Perhaps better still, look for a a file called bin/setenv[not sure what extension ison windoze - maybe .bat] in each of the tomcats and set the environment variable in each of those.
We are trying to setup two DHIS2 instances on the same server and hopefully with the same tomcat and port. I see that editing bean.xml used to be an option before 2.33 but I don’t see that in 2.33. I know it is little hack but is it possible to do the same with 2.33? Where is that parameter moved to in 2.33?