ATOMIKOS is a provider of Spring Boot for handling transactions atomicity in global transactions involving heterogeneous components. To use ATOMIKOS transaction manager in your Spring boot application you have to add this ATOMIKOS starter in your pom.xml .
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>transactions-spring-boot-starter</artifactId>
</dependency>
After adding ATOMIKOS 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 .
Atomikos Configuration Properties
Spring Boot load these properties in AtomikosProperties class.
Name | Default Value | Description |
spring.jta.atomikos.connectionfactory.borrow-connection-timeout | 30 | Timeout for borrowing connections from the pool. (in seconds) |
spring.jta.atomikos.connectionfactory.ignore-session-transacted-flag | true | Set to ignore the transacted flag when creating session. |
spring.jta.atomikos.connectionfactory.local-transaction-mode | false | Set local transactions are desired. |
spring.jta.atomikos.connectionfactory.maintenance-interval | 60 | The time between runs of the pool’s maintenance thread. (in seconds). |
spring.jta.atomikos.connectionfactory.max-idle-time | 60 | The time after which connections are cleaned up from the pool. (in seconds) |
spring.jta.atomikos.connectionfactory.max-lifetime | 0 | The time that a connection can be pooled for before being destroyed. 0 denotes no limit.(in seconds) |
spring.jta.atomikos.connectionfactory.max-pool-size | 1 | The maximum pool size. |
spring.jta.atomikos.connectionfactory.min-pool-size | 1 | The minimum pool size. |
spring.jta.atomikos.connectionfactory.reap-timeout | 0 | The reap timeout for borrowed connections. 0 denotes no limit.( in seconds) |
spring.jta.atomikos.connectionfactory.unique-resource-name | jmsConnectionFactory | The unique name used to identify the resource during recovery. |
spring.jta.atomikos.datasource.borrow-connection-timeout | 30 | Timeout for borrowing connections from the pool. (in seconds) |
spring.jta.atomikos.datasource.default-isolation-level | Default isolation level of connections provided by the pool. | |
spring.jta.atomikos.datasource.login-timeout | Timeout for establishing a database connection.(in seconds) | |
spring.jta.atomikos.datasource.maintenance-interval | 60 | The time between runs of the pool’s maintenance thread.(in seconds) |
spring.jta.atomikos.datasource.max-idle-time | 60 | The time after which connections are cleaned up from the pool.(in seconds) |
spring.jta.atomikos.datasource.max-lifetime | 0 | The time that a connection can be pooled for before being destroyed. 0 denotes no limit.(in seconds) |
spring.jta.atomikos.datasource.max-pool-size | 1 | The maximum pool size. |
spring.jta.atomikos.datasource.min-pool-size | 1 | The minimum pool size. |
spring.jta.atomikos.datasource.reap-timeout | 0 | The reap timeout for borrowed connections. 0 denotes no limit.(in seconds) |
spring.jta.atomikos.datasource.test-query | SQL query or statement used to validate a connection before returning it. | |
spring.jta.atomikos.datasource.unique-resource-name | dataSource | The unique name used to identify the resource during recovery. |
spring.jta.atomikos.properties.checkpoint-interval | 500 | Interval between checkpoints. |
spring.jta.atomikos.properties.default-jta-timeout | 10000 | Default timeout for JTA transactions. |
spring.jta.atomikos.properties.enable-logging | true | Enable disk logging. |
spring.jta.atomikos.properties.force-shutdown-on-vm-exit | false | Specify if a VM shutdown should trigger forced shutdown of the transaction core. |
spring.jta.atomikos.properties.log-base-dir | Directory in which the log files should be stored. | |
spring.jta.atomikos.properties.log-base-name | tmlog | Transactions log file base name. |
spring.jta.atomikos.properties.max-actives | 50 | Maximum active transactions. |
spring.jta.atomikos.properties.max-timeout | 300000 | Maximum timeout that can be allowed for transactions. (in milliseconds) |
spring.jta.atomikos.properties.serial-jta-transactions | true | Specify if sub-transactions should be joined when possible. |
spring.jta.atomikos.properties.service | Transaction manager implementation that should be started. | |
spring.jta.atomikos.properties.threaded-two-phase-commit | true | Use different (and concurrent) threads for two-phase commit on the resources. |
spring.jta.atomikos.properties.transaction-manager-unique-name | Transaction manager’s unique name. |
References
https://docs.spring.io/spring-boot/docs/1.4.x/reference/html/common-application-properties.html
Happy Leaning !!!