It’s not clear to me why you’re doing this, what is the specific issue you’re trying to solve? Why would you want to change the DB name at runtime when you can set it before starting the application?
Can you give more details of what exactly you are trying to do? And is it something you’re doing from a module running alongside the web application or it is a custom application running on top of the OpenMRS API?
What I am trying to do is a kind of multi-tenancy since to have several instances would be too expensive, so I am thinking to change the conection string based on the url for example http://hospital1.website.com/openmrs so on login I would change the connection to database hospital1
if login hospital2 I would change the connection string to hospital2 and so on.
What I am trying to do is a kind of multi-tenancy since to have several
instances would be too expensive, so I am thinking to change the conection
string based on the url for example http://hospital1.website.com/openmrs
so on login I would change the connection to database hospital1
if login hospital2 I would change the connection string to hospital2 and
so on.
In Reply To
wyclif https://talk.openmrs.org/users/wyclif Wyclif Luyima
https://talk.openmrs.org/users/wyclif /dev/5
March 14
Can you give more details of what exactly you are trying to do? And is it
something you’re doing from a module running alongside the web application
or it is a custom application running on top of the OpenMRS API?