...
Open the <
PRODUCT_HOME>/repository/conf/datasources/m
aster-datasources.xml
file and locate the<datasource>
configuration element.You simply have to update the url pointing to your MySQL database, the username and password required to access the database and theMySQL M driver details as shown below. Further, be sure to disable auto committing by setting the
<defaultAutoCommit>
element tofalse
for the MB database. This means that each SQL statement When auto committing is disabled, multiple SQL statements will be committed to the database as individual transactionsone transaction, as opposed to committing multiple each SQL statements statement as one an individual transaction.
Optionally, you can update the other elements for your database connection.Localtabgroup Localtab title MySQL Code Block language html/xml <datasource> <name>WSO2_MB_STORE_DB</name> <description></description> <jndiConfig> <name>jdbc/WSO2MBStoreDB</name> </jndiConfig> <definition type="RDBMS"> <configuration> <url>jdbc:mysql://localhost:3306/wso2_mb</url> <username>wso2carbon</username> <password>wso2carbon</password> <driverClassName>com.mysql.jdbc.Driver</driverClassName> <maxActive>80</maxActive> <maxWait>60000</maxWait> <minIdle>5</minIdle> <testOnBorrow>true</testOnBorrow> <validationQuery>SELECT 1</validationQuery> <validationInterval>30000</validationInterval> <defaultAutoCommit>false</defaultAutoCommit> </configuration> </definition> </datasource>
Localtab title MS SQL Code Block language xml <datasource> <name>WSO2_MB_STORE_DB</name> <description></description> <jndiConfig> <name>WSO2MBStoreDB</name> </jndiConfig> <definition type="RDBMS"> <configuration> <url>jdbc:jtds:sqlserver://localhost:1433/wso2_mb</url> <username>sa</username> <password>sa</password> <driverClassName>com.microsoft.sqlserver.jdbc.SQLServerDriver</driverClassName> <maxActive>200</maxActive> <maxWait>60000</maxWait> <minIdle>5</minIdle> <testOnBorrow>true</testOnBorrow> <validationQuery>SELECT 1</validationQuery> <validationInterval>30000</validationInterval> <defaultAutoCommit>false</defaultAutoCommit> </configuration> </definition> </datasource>
Localtab title Oracle Code Block language xml <datasource> <name>WSO2_MB_STORE_DB</name> <description></description> <jndiConfig> <name>WSO2MBStoreDB</name> </jndiConfig> <definition type="RDBMS"> <configuration> <driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName> <url>jdbc:oracle:thin:@localhost:1521/orcl</url> <maxActive>100</maxActive> <maxWait>60000</maxWait> <minIdle>5</minIdle> <testOnBorrow>true</testOnBorrow> <validationQuery>SELECT 1 FROM DUAL</validationQuery> <validationInterval>30000</validationInterval> <username>scott</username> <password>tiger</password> <defaultAutoCommit>false</defaultAutoCommit> </configuration> </definition> </datasource>
...