All docs This doc

Versions Compared

Key

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

...

  1. Open the <EI_HOME>/conf/datasources/master-datasources.xml file, and configure the datasources to point to the relevant databases for each ESB node. 

    Tip
    • Replace the username, password, and database URL of your MySQL environment accordingly.
    • If you have not enabled SSL, append the useSSL=false property to the value of the <url> property.
    Localtab Group
    Localtab
    titleESB Node 1

    For ESB node 1, configure the datasources to point to the REGISTRY_LOCAL1WSO2_REGISTRY_DB, and WSO2_USER_DB databases as follows:

    Code Block
    languagexml
    <datasources-configuration xmlns:svns="http://org.wso2.securevault/configuration"> 
         <providers> 
            <provider>org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader</provider> 
        </providers> 
        <datasources> 
            <datasource> 
                <name>REGISTRY_LOCAL1</name> 
                <description>The datasource used for registry- local</description> 
                <jndiConfig> 
                <name>jdbc/WSO2CarbonDB</name> 
                </jndiConfig> 
                <definition type="RDBMS"> 
                    <configuration> 
                        <url>jdbc:mysql://carbondb.mysql-wso2.com:3306/REGISTRY_LOCAL1?autoReconnect=true</url> 
                        <username>regadmin</username> 
                        <password>regadmin</password> 
                        <driverClassName>com.mysql.jdbc.Driver</driverClassName> 
                        <maxActive>50</maxActive> 
                        <maxWait>60000</maxWait> 
                        <testOnBorrow>true</testOnBorrow> 
                        <validationQuery>SELECT 1</validationQuery> 
                        <validationInterval>30000</validationInterval> 
                    </configuration> 
                </definition> 
            </datasource> 
            <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:mysql://carbondb.mysql-wso2.com:3306/REGISTRY_DB?autoReconnect=true</url> 
                        <username>regadmin</username> 
                        <password>regadmin</password> 
                        <driverClassName>com.mysql.jdbc.Driver</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:mysql://carbondb.mysql-wso2.com:3306/WSO2_USER_DB</url> 
                        <username>regadmin</username> 
                        <password>regadmin</password> 
                        <driverClassName>com.mysql.jdbc.Driver</driverClassName> 
                        <maxActive>50</maxActive> 
                        <maxWait>60000</maxWait> 
                        <testOnBorrow>true</testOnBorrow> 
                        <validationQuery>SELECT 1</validationQuery> 
                        <validationInterval>30000</validationInterval> 
                    </configuration> 
                </definition> 
            </datasource> 
       </datasources> 
    </datasources-configuration>
    Localtab
    titleESB Node 2

    For node 2, configure the datasources to point to the  REGISTRY_LOCAL2WSO2_REGISTRY_DB, and WSO2_USER_DB databases as shown below. Change the username, password, and database URL as needed for your environment.

    Code Block
    languagexml
    <datasources-configuration xmlns:svns="http://org.wso2.securevault/configuration">     
        <providers>
            <provider>org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader</provider>
        </providers>
        <datasources>
            <datasource>
                <name>REGISTRY_LOCAL2</name>
                <description>The datasource used for registry- local</description>
                <jndiConfig>
                <name>jdbc/WSO2CarbonDB</name>
                </jndiConfig>
                <definition type="RDBMS">
                    <configuration>
                        <url>jdbc:mysql://carbondb.mysql-wso2.com:3306/REGISTRY_LOCAL2?autoReconnect=true</url>
         <username>regadmin</username>
         <password>regadmin</password>      <driverClassName>com.mysql.jdbc.Driver</driverClassName>    <username>regadmin</username>
     <maxActive>50</maxActive>      <maxWait>60000</maxWait>      <testOnBorrow>true</testOnBorrow>      <validationQuery>SELECT 1<<password>regadmin</validationQuery>password>
         <validationInterval>30000</validationInterval>  </configuration>             </definition><driverClassName>com.mysql.jdbc.Driver</driverClassName>
             </datasource>         <datasource>  <maxActive>50</maxActive>
              <name>REGISTRY_          <maxWait>60000</maxWait>
                        <testOnBorrow>true</testOnBorrow>
                        <validationQuery>SELECT 1</validationQuery>
                        <validationInterval>30000</validationInterval>
                    </configuration>
                </definition>
            </datasource>
            <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:mysql://carbondb.mysql-wso2.com:3306/REGISTRY_DB?autoReconnect=true</url>
                        <username>regadmin</username>
                        <password>regadmin</password>
                        <driverClassName>com.mysql.jdbc.Driver</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- config/governance< and user manager</description>
                <jndiConfig>
                <name>jdbc/WSO2RegistryDB<WSO2UMDB</name>
                </jndiConfig>
                <definition type="RDBMS">
     <configuration>      <url>jdbc:mysql://carbondb.mysql-wso2.com:3306/REGISTRY_DB?autoReconnect=true</url>      <username>regadmin</username>   <configuration>
      <password>regadmin</password>      <driverClassName>com.mysql.jdbc.Driver</driverClassName>      <maxActive>50</maxActive>      <maxWait>60000</maxWait><url>jdbc:mysql://carbondb.mysql-wso2.com:3306/WSO2_USER_DB</url>
         <testOnBorrow>true</testOnBorrow>      <validationQuery>SELECT 1</validationQuery>      <validationInterval>30000</validationInterval>  <<username>regadmin</configuration>username>
                 </definition>       <password>regadmin</password>
     </datasource>          <datasource>         <driverClassName>com.mysql.jdbc.Driver</driverClassName>
       <name>WSO2_USER_DB</name>             <description>The datasource used for registry<maxActive>50</maxActive>
    and user manager</description>             <jndiConfig>  <name>jdbc/WSO2UMDB</name>    <maxWait>60000</maxWait>
            </jndiConfig>            <testOnBorrow>true</testOnBorrow>
    <definition type="RDBMS">  <configuration>      <url>jdbc:mysql://carbondb.mysql-wso2.com:3306/WSO2_USER_DB</url>      <username>regadmin</username>     <validationQuery>SELECT <password>regadmin<1</password>
    validationQuery>
        <driverClassName>com.mysql.jdbc.Driver</driverClassName>      <maxActive>50</maxActive>      <maxWait>60000</maxWait>    <validationInterval>30000</validationInterval>
     <testOnBorrow>true</testOnBorrow>      <validationQuery>SELECT 1</validationQuery>      <validationInterval>30000</validationInterval>  </configuration>
                </definition>
            </datasource>
       </datasources>
    </datasources-configuration>
  2. Add the following configuration in the <EI_HOME>/conf/user-mgt.xml file to configure the user stores. Update the dataSource property in all nodes in the <EI_HOME>/conf/user-mgt.xml file as shown below to configure the datasource: 

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

...