...
Follow the steps below to change the type of the default WSO2_CARBON_DB
datasource.
Edit the default datasourceconfigurationin the datasource configuration in the <PRODUCT_HOME>/repository/conf/datasources/mastermaster-datasources.xml
file as shown below.
...
Info |
---|
For more information on other parameters that can be defined in the <PRODUCT_HOME>/repository/conf/datasources/master-datasources.xml file, see Tomcat JDBC Connection Pool. |
Multiexcerpt |
---|
|
The following elements are available only as a WUM update and is effective from 14th September 2018 (2018-09-14). For more information, see Updating WSO2 Products. This WUM update is only applicable to Carbon 4.4.11 and will be shipped out-out-the-box with Carbon versions newer than Carbon 4.4.35. For more information on Carbon compatibility, see Release Matrix. Element | Description |
---|
commitOnReturn | If defaultAutoCommit =false, then you can set commitOnReturn =true, so that the pool can complete the transaction by calling the commit on the connection as it is returned to the pool. However, If rollbackOnReturn =true then this attribute is ignored. The default value is false. | rollbackOnReturn | If defaultAutoCommit =false, then you can set rollbackOnReturn =true so that the pool can terminate the transaction by calling rollback on the connection as it is returned to the pool. The default value is false. | connectionpool Configuring the connection pool behavior on return When a database connection is returned to the pool, by default the product rollsback rolls back the pending transactions if defaultAutoCommit =true . However, if required you can disable the latter mentioned default behavior by disabling the ConnectionRollbackOnReturnInterceptor , which is a JDBC-Pool JDBC interceptor, and setting the connection pool behavior on return via the datasource configurations by using the following options. Disabling the ConnectionRollbackOnReturnInterceptor is only possible with the WUM update and is effective from 14th September 2018 (2018-09-14). For more information on updating WSO2 API Manager, see Updating WSO2 Products. This WUM update is only applicable to Carbon 4.4.11. |
...
- Add a new datasource with similar configurations as the
WSO2_CARBON_DB
datasource above to the <PRODUCT_HOME>/repository/conf/datasources/
master-datasources.xml
file. Change its elements with your custom values. For instructions, see Setting up datasource configurations. If you are setting up a separate database to store registry-related data, update the following configurations in the <PRODUCT_HOME>/repository/conf/
registry.xml
file.
Code Block |
---|
|
<dbConfig name="wso2registry">
<dataSource>jdbc/MY_DATASOURCE_NAME</dataSource>
</dbConfig> |
If you are setting up a separate database to store user management data, update the following configurations in the <PRODUCT_HOME>/repository/conf/
user-mgt.xml
file.
Code Block |
---|
|
<Configuration>
<Property name="dataSource">jdbc/MY_DATASOURCE_NAME</Property>
</Configuration> |
...
Info |
---|
You can create database tables automatically when starting the product for the first time by using the -Dsetup parameter as follows:.
Multiexcerpt |
---|
MultiExcerptName | Dsetup-dep |
---|
| Deprecation of -DSetup When proper Database Administrative (DBA) practices are followed, the systems (except analytics products) are not granted DDL (Data Definition) rights on the schema. Therefore, maintaining the -DSetup option is redundant and typically unusable. As a result, from January 2018 onwards WSO2 has deprecated the -DSetup option. Note that the proper practice is for the DBA to run the DDL statements manually so that the DBA can examine and optimize any DDL statement (if necessary) based on the DBA best practices that are in place within the organization. |
|
Info |
---|
The product is configured to run using an embedded Apache Derby database. |
...