Any changes to make to use the qa.db.properties file while deploying the WAR file on to the Tomcat server running on unix based QA server?

74 views Asked by At

There are 3 environments: Dev, QA and Prod. And in Github, 3 environment-specific-properties-files namely dev.db.properties, qa.db.properties and prod.db.properties are available in the spring based application code base. There in the code base, inside the context.xml file, the url and passwords are mentioned in such a way to use the db properties from the environment specific properties file, during or after the deployment of the app.war file on the apache tomcat server running on each of the environments. Below, is the abstract view of context.xml and the env. specific properties files: context.xml- url="jdbc:oracle:thin:@@dbhost@@:@@dbport@@/@@dbservicename@@" password=@@dbpassword@@ dev.db.properties and qa.db.properties are having their own dbhost, dbport, dbservicename respectively.

My question is, during or after the deployment onto the individual environments, how would the tomcat server, running on each of the environment, decides which environment specific file to pick. For e.g. suppose one need to deploy the app.war file, which consists of both the properties files, onto the QA environment, then how would the Tomcat server which is running on the QA environment decides that it need to pick the qa.db.properties file and not the dev.db.properties file?

Is it a case that the tomcat server's context.xml file in QA environment is configured in such a way to pick the qa.db.properties file only?

Thanks in advance!

0

There are 0 answers