If your a frequent user of wso2 products, sometimes you might wanted to browse data and test quires in wso2 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. The disk footprint (size of the jar file) is about 1.5 MB.
WSO2 products currently ships H2 database engine version h2-1.2.140.* and its related H2 database driver.
H2, the Java SQL database. The main features of H2 are:
- Very fast, open source, JDBC API
- Embedded and server modes; in-memory databases
- Browser based Console application
- Small footprint: around 1.5 MB jar file size
This can be easily achieved by enabling the H2DatabaseConfiguration in carbon.xml.
- Go to the CARBON_HOME/repository/config
- Open the carbon.xml file.
- Paste the H2DatabaseConfiguration as follows.(don't uncomment the H2DatabaseConfiguration which already there just paste below code)
<H2DatabaseConfiguration> <property name="web"/> <property name="webPort">8082</property> <property name="webAllowOthers"/> </H2DatabaseConfiguration>
- Start the the server.
- Direct your browser to
http://localhost:8082
- Fill the JDBC URL, username and password as follows.
- JDBC URL : jdbc:h2:repository/database/WSO2CARBON_DB
- username : wso2carbon
- password : wso2carbon
Note: for the JDBC URL make sure you use the relative path not the absolute path which is jdbc:h2:<gregHome>/repository/database/WSO2CARBON_DB
Now You can browse through h2 database using simple h2 dashboard.
Now You can browse through h2 database using simple h2 dashboard.
Comments
Post a Comment