JDBC Mount setup for WSO2 Registry

All WSO2 products are shipped with a built-in registry, supported by the H2 Database packaged with the product. Though it’s sufficient for many applications, its not recommended for Enterprise integration applications and Production environments.


In our case the ESB registry is mounted with WSO2 Governance Registry (GREG). The below steps can be used to change the ATOM based registry mount (default) with JDBC based mount.

The following example was implemented on the systems which had deployed resources and services, servicing other applications.


1. In GREG, replace WSO2_CARBON_DB in master-datasources.xml with JDBC details.

   <description>The datasource used for registry and user manager</description>
   <definition type="RDBMS">
           <validationQuery>SELECT 1</validationQuery>

2. As we used a ORACLE Database, copy the driver ojdbc6.jar to the following path

3. Back up the .CAR files and configurations and packages

4. The following command will create the necessary tables on the target Datasource configured in the above step.

sh -Dsetup

Validate the following

1. Tables and DB objects are created in the DB
2. Whether data is populated
3. Old resource content are also available
4. Existing CAR files got deployed successfully


ESB Console


User management

1. Existing user got updated in DB
2. Create a new user and the same should be populated in the DB


In ESB 4.9.0

1. Update the datasources XML


Add the following configuration
   <description>The datasource used for registry and user manager</description>
   <definition type="RDBMS">
       <configuration>           <url>jdbc:oracle:thin:@</url>           <username>USER</username>
           <password>USER1234</password>           <driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>           <maxActive>50</maxActive>
           <maxWait>60000</maxWait>           <testOnBorrow>true</testOnBorrow>
           <validationQuery>SELECT 1</validationQuery>           <validationInterval>30000</validationInterval>

2. Update the registry configuration

<PRODUCT_ HOME>/repository/conf/registry.xml

<dbConfig name="remote_registry">      <dataSource>jdbc/WSO2CarbonDB_GREG</dataSource>

— Specify the remote Governance Registry instance —

<remoteInstance url="">

Mount configuration

<mount path="/_system/governance" overwrite="true">        <instanceId>governanceRegistryInstance</instanceId>        <targetPath>/_system/governance</targetPath>    

2. Copy the JDBC driver – ojdbc6.jar to /repository/components/lib/

3. Restart ESB

Validate the following

1. Logs have the successful mounting of remote registry

Registry logs