Bitronix integration provides a data source connection pool for the Database connector, which you must use whenever you want to implement resource pooling in the Database connector. Below is the procedure for configuring pooling datasources using the Bitronix Transaction manager with the Database Connector in Mule 4.
Pre-requisites:
Steps:
<bean id="mssqlXADataSource" name="mssqlXADataSource" class="com.microsoft.sqlserver.jdbc.SQLServerXADataSource"> <property name="serverName" value="?" /> <property name="user" value="?" /> <property name="password" value="?" /> <property name="databaseName" value="?" /> </bean>
| Oracle | oracle.jdbc.xa.client.OracleXADataSource |
| Microsoft SQL Server | com.microsoft.sqlserver.jdbc.SQLServerXADataSource |
| IBM DB2 | com.ibm.db2.jcc.DB2XADataSource |
| Generic XAPool** | org.enhydra.jdbc.standard.StandardXADataSource |
<bti:xa-data-source-pool name="mssqlBitronixDataSourcePool" acquireIncrement="1" acquireTimeoutSeconds="60" dataSource-ref="mssqlXADataSource" maxIdleTime="60" maxPoolSize="16" minPoolSize="0" preparedStatementCacheSize="5"/>
<db:config doc:name="mssql XA Database Config" name="DB_Config_mssql"> <db:data-source-connection dataSourceRef="mssqlBitronixDataSourcePool"> </db:data-source-connection> </db:config>
** Generic XAPool class "org.enhydra.jdbc.standard.StandardXADataSource" must be used with compatible Databases only and this might not work for all Databases. Please verify your official Database documentation before using this. This is tested and works with Snowflake by using the dependency com.experlog.xapool and the "driverName" property set to net.snowflake.client.jdbc.SnowflakeDriver in the Spring bean.
Disclaimer: The example is provided as a reference for your own usage and it's not part of the official Mule product so its use will be considered as a custom implementation made by the customer.
001115496

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.