Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Configure the <WSO2-obam>/repository/conf/datasources/master-datasources.xml file with the following configurations. 

    Note

    Make sure to update the url, usernamepassword, and driverClassName accordingly.

    Code Block
    <datasource>
    		<name>REGISTRY_DB</name>
    		<description>The datasource used for registry- config/governance</description>
    		<jndiConfig>
    				<name>jdbc/WSO2RegistryDB</name>
    		</jndiConfig>
    		<definition type="RDBMS">
    				<configuration>
    						<url><<JDBC_URL>></url>
    	                	<username><<USERNAME>></username>
        	            	<password><<PASSWORD>></password>
            	        	<driverClassName><<DRIVER_CLASS_NAME>></driverClassName>
    	        	        <maxActive>50</maxActive>
                    	    <maxWait>60000</maxWait>
                        	<testOnBorrow>true</testOnBorrow>
                        	<validationQuery>SELECT 1</validationQuery>
                        	<validationInterval>30000</validationInterval>
                    </configuration>
    		</definition>
    </datasource>
     
    <datasource>
    		<name>WSO2_USER_DB</name>
    		<description>The datasource used for registry and user manager</description>
    		<jndiConfig>
    				<name>jdbc/WSO2UMDB</name>
    		</jndiConfig>
    		<definition type="RDBMS">
    				<configuration>
    						<url><<JDBC_URL>></url>
                    		<username><<USERNAME>></username>
                    		<password><<PASSWORD>></password>
                    		<driverClassName><<DRIVER_CLASS_NAME>></driverClassName>
                    		<maxActive>50</maxActive>
                        	<maxWait>60000</maxWait>
                        	<testOnBorrow>true</testOnBorrow>
                        	<validationQuery>SELECT 1</validationQuery>
                        	<validationInterval>30000</validationInterval>
                    </configuration>
    		</definition>
    </datasource>
     
    <datasource>
    		<name>WSO2AM_DB</name>
    		<description>The datasource used for API Manager database</description>
    		<jndiConfig>
    				<name>jdbc/WSO2AM_DB</name>
    		</jndiConfig>
    		<definition type="RDBMS">
                	<configuration>
                    		<url><<JDBC_URL>></url>
                    		<username><<USERNAME>></username>
                    		<password><<PASSWORD>></password>
                    		<driverClassName><<DRIVER_CLASS_NAME>></driverClassName>
                    		<maxActive>50</maxActive>
                    		<maxWait>60000</maxWait>
                    		<testOnBorrow>true</testOnBorrow>
                    		<validationQuery>SELECT 1</validationQuery>
                    		<validationInterval>30000</validationInterval>
                	</configuration>
    		</definition>
    </datasource>
     
    <datasource>
    		<name>WSO2AM_STATS_DB</name>
    		<description>The datasource used for getting statistics to API Manager</description>
    		<jndiConfig>
                	<name>jdbc/WSO2AM_STATS_DB</name>
    		</jndiConfig>
    		<definition type="RDBMS">
                	<configuration>
                    		<url><<JDBC_URL>></url>
                    		<username><<USERNAME>></username>
                    		<password><<PASSWORD>></password>
                    		<driverClassName><<DRIVER_CLASS_NAME>></driverClassName>
                    		<maxActive>50</maxActive>
                    		<maxWait>60000</maxWait>
                 	   		<testOnBorrow>true</testOnBorrow>
                    		<validationQuery>SELECT 1</validationQuery>
                    		<validationInterval>30000</validationInterval>
                	</configuration>
    		</definition>
    </datasource>
     
    <datasource>
    		<name>WSO2_MB_STORE_DB</name>
    		<description>The datasource used for message broker database</description>
    		<jndiConfig>
    				<name>WSO2MBStoreDB</name>
    		</jndiConfig>
    		<definition type="RDBMS">
    				<configuration>
                    		<url><<JDBC_URL>></url>
                    		<username><<USERNAME>></username>
                    		<password><<PASSWORD>></password>
                    		<driverClassName><<DRIVER_CLASS_NAME>></driverClassName>
                    		<maxActive>50</maxActive>
                    		<maxWait>60000</maxWait>
                    		<testOnBorrow>true</testOnBorrow>
               	     		<validationQuery>SELECT 1</validationQuery>
                    		<validationInterval>30000</validationInterval>
                    		<defaultAutoCommit>false</defaultAutoCommit>
                	</configuration>
    		</definition>
    </datasource>
  2. Update the <cacheID> property in the <WSO2-obam>/repository/conf/registry.xml file appropriately. 

    Code Block
    <dbConfig name="govregistry">   
            <dataSource>jdbc/WSO2RegistryDB</dataSource>
    </dbConfig> 
    
    <remoteInstance url="https://localhost:9443/registry">
    		<id>instanceid</id>
    		<dbConfig>govregistry</dbConfig>
    		<readOnly>true</readOnly>
    		<enableCache>true</enableCache>
    		<registryRoot>/</registryRoot>
    		<cacheId>wso2dbadmin@jdbc:sqlserver://<DB_HOST>:1433;databaseName=prodwso2_apimgt_regdb</cacheId>
    </remoteInstance>
    
    <mount path="/_system/config" overwrite="true">
    		<instanceId>instanceid</instanceId>
    		<targetPath>/_system/config</targetPath>
    </mount>Update the datasource in the <OB_APIM_HOME>/repository/conf/user-mgt.xml file to point to the WSO2UM_DB. 
  3. Update the datasource in the <WSO2-obam>/repository/conf/user-mgt.xml file to point to the WSO2UM_DB

    Code Block
    <Property name="dataSource">jdbc/WSO2UM_DB</Property>

Configure user stores

Deploying, Integrating, and securing the APIs