Thursday, June 11, 2015

How to check embedded database (h2 database) in WSO2 products via browser.


Every WSO2 products are shipped with embedded database, which is known as H2 databases. H2 is a relational database management system written in Java. It can be embedded in Java applications or run in the client-server mode. For more info please refer to http://www.h2database.com/

Sometimes we need to browse H2 databases which embedded within the wso2 products. In order to achieved this we need to enable the H2DatabaseConfiguration .


  • Download WSO2 products from here.
  • Go to the CARBON_HOME/repository/config folder
  • Open the carbon.xml file. 
  • Uncomment the H2DatabaseConfiguration section in carbon.xml (as shown in below)

      <H2DatabaseConfiguration>  
           <property name="web" />  
           <property name="webPort">8082</property>  
           <property name="webAllowOthers" />  
          
        <!--property name="webSSL" />  
           <property name="tcp" />  
           <property name="tcpPort">9092</property>  
           <property name="tcpAllowOthers" />  
           <property name="tcpSSL" />  
           <property name="pg" />  
           <property name="pgPort">5435</property>  
           <property name="pgAllowOthers" />  
           <property name="trace" />  
           <property name="baseDir">${carbon.home}  
       </property-->  
      </H2DatabaseConfiguration> 

     Here we only need to  enable Webport  properties.

  • Save the carbon.xml and start the server.
  • As shown in image enter the database details  to login .
 
  • Now you can access the database



 WSO2 highly recommend to use standard production ready database like MySQL, Oracle, PostgreSQL , DB2 etc for production/Dev/QA deployment preferably using embedded H2 databases.