Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Formatted

...

Multiexcerpt
MultiExcerptNameWUM14Sep

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.

ElementDescription
commitOnReturnIf 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.
rollbackOnReturnIf 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 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.

  • Configure the connection pool to commit pending transactions on connection return
    1. Navigate to either one of the following locations based on your OS.
      • On Linux/Mac OS:  <PRODUCT_HOME>/bin/wso2server.sh/
      • On Windows:  <PRODUCT_HOME>\bin\wso2server.bat 
    2. Add the following JVM option:

    3. Navigate to the <PRODUCT_HOME>/repository/conf/datasources/master-datasources.xml file.
    4. Disable the defaultAutoCommit by defining it as false.
    5. Add the commitOnReturn property and set it to true for all the datasources, including the custom datasources.

      html/xml
  • Configure the connection pool to rollback pending transactions on connection return

    1. Navigate to the <PRODUCT_HOME>/repository/conf/datasources/master-datasources.xml file.
    2. Disable the defaultAutoCommit by defining it as false.

    3. Add the rollbackOnReturn property to the datasources.

      html/xml

...