This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Embedded Registry
WSO2 ESB comes with an embedded WSO2 Governance Registry which is used by the ESB to store configurations and other deployment artifacts. The embedded registry instance makes use of the embedded ESB database. This is an H2 database and the data files are by default stored in the directory named ESB_HOME/repository/database
. If you are running the ESB in the embedded registry mode, you should be careful not to manually alter any files stored in this directory as that might lead to database corruption or data loss.
The embedded registry instance is configured by the following configuration in the <
ESB_HOME>/repository/conf/
registry.xml
file.
<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.
<datasources> <datasource> <name>WSO2_CARBON_DB</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/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.
<readOnly>false</readOnly>
When the registry ReadOnly
mode is set to true
the ESB will not be able to store resources or write values to the registry. It will be capable of reading the existing resources only. If you want to make sure that the ESB or any of the ESB administrators do not alter the resources already stored in the registry, this value should be set to true. Also in a clustered deployment it is recommended that the only one ESB instance accesses the registry in the ReadWrite
mode. All other ESB nodes should be accessing the registry in the ReadOnly
mode to prevent different ESB servers from modifying the same resources at the same time. Any configuration updates should be done via the ESB instance in ReadWrite
mode.
In addition to configuring the database instance you can configure media type handlers for various media types and setup various registry related system parameters by modifying the registry.xml
file. The default configuration defines the following parameters.
<staticConfiguration> <versioningProperties>true</versioningProperties> <versioningComments>true</versioningComments> <versioningTags>true</versioningTags> <versioningRatings>true</versioningRatings> </staticConfiguration>
Please, refer WSO2 Governance Registry documentation for further information on setting up media type handlers and other global parameters.
For more information, see Working with the Registry.