Follow below steps to enable H2 Database browser in WSO2 Products. Here I am using WSO2 Identity Server .
1. Download Identity Server (http://wso2.com/products/identity-server/)
2. Unzip downloaded pack (Ex. unzip wso2is-5.0.0.zip on Linux or Mac)
3. Edit <IS_HOME>/repository/conf/carbon.xml and uncomment H2DatabaseConfiguration section.
4. Remove all the tags after <property name="webAllowOthers" />
1. Download Identity Server (http://wso2.com/products/identity-server/)
2. Unzip downloaded pack (Ex. unzip wso2is-5.0.0.zip on Linux or Mac)
3. Edit <IS_HOME>/repository/conf/carbon.xml and uncomment H2DatabaseConfiguration section.
4. Remove all the tags after <property name="webAllowOthers" />
Please see below the relevant section in the carbon.xml after modification.
<H2DatabaseConfiguration>
<property name="web" />
<property name="webPort">8082</property>
<property name="webAllowOthers" />
</H2DatabaseConfiguration>
5. Start server sh <IS_HOME>/bin/wso2server.sh
6. Browse http://localhost:8082
7. You will see following window
8. Enter required JDBC URL, User Name and Password which you can them in <IS_HOME>/repository/conf/datasources/master-datasources.xml
Please see below the required data have highlighted in a sample master-datasources.xml
<datasource>
<name>WSO2_CARBON_DB</name>
<description>The datasource used for registry and user manager</description>
<jndiConfig>
<name>jdbc/WSO2CarbonDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000</url>
<username>wso2carbon</username>
<password>wso2carbon</password>
<driverClassName>org.h2.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
9. Click Connect.
No comments:
Post a Comment