Versions Compared

Key

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

...

The embedded registry instance is configured by the registry.xml file which can be found in the ESB_HOME/repository/conf directory. In this configuration you could point the embedded registry to a database other than the default embedded H2 database. To change the database used by the registry or change the location of the database files, edit the following section of the registry.xml.

Code Block
<dbconfig<currentDBConfig>wso2registry</currentDBConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
<registryRoot>/</registryRoot>

<dbConfig name="wso2registry">
    <dataSource>jdbc/WSO2CarbonDB</dataSource>
</dbConfig>

You can point the embedded registry to a database other than the default embedded H2 database or change the location of the database files, by editing the WSO2_CARBON_DB datasource configuration in the <ESB_HOME>/repository/conf/datasources/master-datasources.xml file as shown in the example below. 

Code Block
<datasources> 
        <datasource> 
            <name>WSO2_CARBON_DB</name> 
            <description>The datasource used for registry- local</description> 
            <jndiConfig> 
                <name>jdbc/WSO2CarbonDB</name> 
            </jndiConfig> 
            <definition type="RDBMS">
	<url>jdbc:h2:database/WSO2CARBON_DB</url>
	<userName>wso2carbon</userName>
	<password>wso2carbon</password>
	<driverName>org.h2.Driver</driverName>
	<maxActive>50</maxActive>
	<maxWait>60000</maxWait>
	<minIdle>5</minIdle>
</dbconfig>
 
                <configuration> 
                    <url>jdbc:mysql://carbondb.mysql-wso2.com:3306/LOCALDB?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>

WSO2 Governance Registry can be run in two operational modes, namely the ReadWrite mode and the ReadOnly mode. By default, it operates in the ReadWrite mode. This mode is set by the following element in the registry.xml file.

...