BITRONIX is a provider of Spring Boot for handling distributed transaction. To use BITRONIX transaction manager in your Spring boot application you have to add this BITRONIX starter in your pom.xml .
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jta-bitronix</artifactId>
</dependency>
After adding BITRONIX starter in your application it will automatically download and add the required dependencies in your application and initialize with default values. You can overwrite these values through application.properties / application.yaml .
BiTronix Configuration Properties
Name | Default Value | Description |
spring.jta.bitronix.connectionfactory.acquire-increment | 1 | Number of connections to create when pool grow. |
spring.jta.bitronix.connectionfactory.acquisition-interval | 1 | Time to wait before trying to acquire a connection again after an invalid connection was acquired.(in second) |
spring.jta.bitronix.connectionfactory.acquisition-timeout | 30 | Timeout for acquiring connections from the pool. (in second) |
spring.jta.bitronix.connectionfactory.allow-local-transactions | true | Set the transaction manager should allow mixing XA and non-XA transactions. |
spring.jta.bitronix.connectionfactory.apply-transaction-timeout | false | Set the transaction timeout should be set on the XAResource when it is enlisted. |
spring.jta.bitronix.connectionfactory.automatic-enlisting-enabled | true | Set resources should be enlisted and delisted automatically |
spring.jta.bitronix.connectionfactory.cache-producers-consumers | true | Set produces and consumers should be cached. |
spring.jta.bitronix.connectionfactory.defer-connection-release | true | Set the provider can run many transactions on the same connection and supports transaction interleaving. |
spring.jta.bitronix.connectionfactory.ignore-recovery-failures | false | Set recovery failures should be ignored. |
spring.jta.bitronix.connectionfactory.max-idle-time | 60 | The time after which connections are cleaned up from the pool.(in second) |
spring.jta.bitronix.connectionfactory.max-pool-size | 10 | The maximum pool size. 0 denotes no limit. |
spring.jta.bitronix.connectionfactory.min-pool-size | 0 | The minimum pool size. |
spring.jta.bitronix.connectionfactory.password | The password to use to connect to the JMS provider. | |
spring.jta.bitronix.connectionfactory.share-transaction-connections | false | Set connections in the ACCESSIBLE state can be shared within the context of a transaction. |
spring.jta.bitronix.connectionfactory.test-connections | true | Set connections should be tested when acquired from the pool. |
spring.jta.bitronix.connectionfactory.two-pc-ordering-position | 1 | The position that this resource should take during two-phase commit (always first is Integer.MIN_VALUE, always last is Integer.MAX_VALUE). |
spring.jta.bitronix.connectionfactory.unique-name | jmsConnectionFactory | The unique name used to identify the resource during recovery. |
spring.jta.bitronix.connectionfactory.use-tm-join | true | Set TMJOIN should be used when starting XAResources. |
spring.jta.bitronix.connectionfactory.user | The user to use to connect to the JMS provider. | |
spring.jta.bitronix.datasource.acquire-increment | 1 | Number of connections to create when growing the pool. |
spring.jta.bitronix.datasource.acquisition-interval | 1 | Time to wait before trying to acquire a connection again after an invalid connection was acquired.(in second) |
spring.jta.bitronix.datasource.acquisition-timeout | 30 | Timeout for acquiring connections from the pool. (in second) |
spring.jta.bitronix.datasource.allow-local-transactions | true | Set the transaction manager should allow mixing XA and non-XA transactions. |
spring.jta.bitronix.datasource.apply-transaction-timeout | false | Set the transaction timeout should be set on the XAResource when it is enlisted. |
spring.jta.bitronix.datasource.automatic-enlisting-enabled | true | Set resources should be enlisted and delisted automatically. |
spring.jta.bitronix.datasource.cursor-holdability | The default cursor holdability for connections. | |
spring.jta.bitronix.datasource.defer-connection-release | true | Set the database can run many transactions on the same connection and supports transaction interleaving. |
spring.jta.bitronix.datasource.enable-jdbc4-connection-test | Set Connection.isValid() is called when acquiring a connection from the pool. | |
spring.jta.bitronix.datasource.ignore-recovery-failures | false | Set recovery failures should be ignored. |
spring.jta.bitronix.datasource.isolation-level | The default isolation level for connections. | |
spring.jta.bitronix.datasource.local-auto-commit | The default auto-commit mode for local transactions. | |
spring.jta.bitronix.datasource.login-timeout | Timeout for establishing a database connection.(in second) | |
spring.jta.bitronix.datasource.max-idle-time | 60 | The time after which connections are cleaned up from the pool.(in second) |
spring.jta.bitronix.datasource.max-pool-size | 10 | The maximum pool size. 0 denotes no limit. |
spring.jta.bitronix.datasource.min-pool-size | 0 | The minimum pool size. |
spring.jta.bitronix.datasource.prepared-statement-cache-size | 0 | The target size of the prepared statement cache. 0 disables the cache. |
spring.jta.bitronix.datasource.share-transaction-connections | false | Set connections in the ACCESSIBLE state can be shared within the context of a transaction. |
spring.jta.bitronix.datasource.test-query | SQL query or statement used to validate a connection before returning it. | |
spring.jta.bitronix.datasource.two-pc-ordering-position | 1 | The position that this resource should take during two-phase commit (always first is Integer.MIN_VALUE, always last is Integer.MAX_VALUE). |
spring.jta.bitronix.datasource.unique-name | dataSource | The unique name used to identify the resource during recovery. |
spring.jta.bitronix.datasource.use-tm-join | true | Set TMJOIN should be used when starting XAResources. |
spring.jta.bitronix.properties.allow-multiple-lrc | false | Allow multiple LRC resources to be enlisted into the same transaction. |
spring.jta.bitronix.properties.asynchronous2-pc | false | Enable asynchronously execution of two phase commit. |
spring.jta.bitronix.properties.background-recovery-interval-seconds | 60 | Interval at which to run the recovery process in the background.(in seconds) |
spring.jta.bitronix.properties.current-node-only-recovery | true | Recover only the current node. |
spring.jta.bitronix.properties.debug-zero-resource-transaction | false | Log the creation and commit call stacks of transactions executed without a single enlisted resource. |
spring.jta.bitronix.properties.default-transaction-timeout | 60 | Default transaction timeout.(in second) |
spring.jta.bitronix.properties.disable-jmx | false | Enable JMX support. |
spring.jta.bitronix.properties.exception-analyzer | Set the fully qualified name of the exception analyzer implementation to use. | |
spring.jta.bitronix.properties.filter-log-status | false | Enable filtering of logs so that only mandatory logs are written. |
spring.jta.bitronix.properties.force-batching-enabled | true | Set if disk forces are batched. |
spring.jta.bitronix.properties.forced-write-enabled | true | Set if logs are forced to disk. |
spring.jta.bitronix.properties.graceful-shutdown-interval | 60 | Maximum amount of seconds the TM will wait for transactions to get done before aborting them at shutdown time. |
spring.jta.bitronix.properties.jndi-transaction-synchronization-registry-name | JNDI name of the TransactionSynchronizationRegistry. | |
spring.jta.bitronix.properties.jndi-user-transaction-name | JNDI name of the UserTransaction. | |
spring.jta.bitronix.properties.journal | disk | Name of the journal. Can be ‘disk’, ‘null’ or a class name. |
spring.jta.bitronix.properties.log-part1-filename | btm1.tlog | Name of the first fragment of the journal. |
spring.jta.bitronix.properties.log-part2-filename | btm2.tlog | Name of the second fragment of the journal. |
spring.jta.bitronix.properties.max-log-size-in-mb | 2 | Maximum size in megabytes of the journal fragments. |
spring.jta.bitronix.properties.resource-configuration-filename | ResourceLoader configuration file name. | |
spring.jta.bitronix.properties.server-id | ASCII ID that must uniquely identify this TM instance. Default to the machine’s IP address. | |
spring.jta.bitronix.properties.skip-corrupted-logs | false | Skip corrupted transactions log entries. |
spring.jta.bitronix.properties.warn-about-zero-resource-transaction | true | Log a warning for transactions executed without a single enlisted resource. |
References
https://docs.spring.io/spring-boot/docs/1.4.x/reference/html/common-application-properties.html
Happy Learning !!!
You must log in to post a comment.