Thursday, 2 October 2025

Configure Multiple ORDS22+ version under Single Tomcat


Scenario - 
	
We have 2 databases with APEX 24.1 : ORDS 24.1 configured
We have only 1 Tomcat Server and want to serve, both databases through single Tomcat.
Challenge -
	
From ORDS22+, we need to define -Dconfig.url=\Location\to\ORDS\Config\Directory.
 We can define - only 1 entry for ORDS under Tomcat JAVA parameters.

 It will not recognize the config directory for second database.
Solution -
Lets handle this using an alternative method by defining separate entries under conf\Catalina\localhost. 
Using this method we define [ -Dconfig.url ] in an different method, which is supported by Tomcat.
Environment

For APEXDB1 -  apexdb1.war :  \conf\Catalina\localhost - create a file apexdb1.xml	
							
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="apexdb1" path="/apexdb1">
    <Parameter name="config.url"
               value="E:\ORDS_CONFIG\apexdb1\config"
               override="false"/>
</Context>

For APEXDB2 -  apexdb2.war :  \conf\Catalina\localhost - create a file apexdb2.xml	
							
<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="apexdb2" path="/apexdb1">
    <Parameter name="config.url"
               value="E:\ORDS_CONFIG\apexdb2\config"
               override="false"/>
</Context>

Restart Apache Tomcat Services ! !

No comments:

Post a Comment