Skip to content

Commit a18f01a

Browse files
committed
Remove bitronix support
See gh-24806
1 parent 4b0d5c3 commit a18f01a

File tree

29 files changed

+142
-1590
lines changed

29 files changed

+142
-1590
lines changed

spring-boot-project/spring-boot-autoconfigure/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ dependencies {
6262
optional("org.apache.tomcat.embed:tomcat-embed-el")
6363
optional("org.apache.tomcat.embed:tomcat-embed-websocket")
6464
optional("org.apache.tomcat:tomcat-jdbc")
65-
optional("org.codehaus.btm:btm")
6665
optional("org.codehaus.groovy:groovy-templates")
6766
optional("com.github.ben-manes.caffeine:caffeine")
6867
optional("com.github.mxab.thymeleaf.extras:thymeleaf-extras-data-attribute")

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/transaction/jta/BitronixJtaConfiguration.java

Lines changed: 0 additions & 121 deletions
This file was deleted.

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/transaction/jta/JtaAutoConfiguration.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,12 @@
3535
* @author Nishant Raut
3636
* @since 1.2.0
3737
*/
38-
@SuppressWarnings("deprecation")
3938
@Configuration(proxyBeanMethods = false)
4039
@ConditionalOnClass(javax.transaction.Transaction.class)
4140
@ConditionalOnProperty(prefix = "spring.jta", value = "enabled", matchIfMissing = true)
4241
@AutoConfigureBefore({ XADataSourceAutoConfiguration.class, ActiveMQAutoConfiguration.class,
4342
ArtemisAutoConfiguration.class, HibernateJpaAutoConfiguration.class })
44-
@Import({ JndiJtaConfiguration.class, BitronixJtaConfiguration.class, AtomikosJtaConfiguration.class })
43+
@Import({ JndiJtaConfiguration.class, AtomikosJtaConfiguration.class })
4544
public class JtaAutoConfiguration {
4645

4746
}

spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 0 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,119 +1041,6 @@
10411041
"name": "spring.jpa.open-in-view",
10421042
"defaultValue": true
10431043
},
1044-
{
1045-
"name": "spring.jta.bitronix.properties.allow-multiple-lrc",
1046-
"description": "Whether to allow multiple LRC resources to be enlisted into the same transaction.",
1047-
"defaultValue": false
1048-
},
1049-
{
1050-
"name": "spring.jta.bitronix.properties.asynchronous2-pc",
1051-
"description": "Whether to enable asynchronously execution of two phase commit.",
1052-
"defaultValue": false
1053-
},
1054-
{
1055-
"name": "spring.jta.bitronix.properties.background-recovery-interval",
1056-
"description": "Interval in minutes at which to run the recovery process in the background.",
1057-
"defaultValue": 1,
1058-
"deprecation": {
1059-
"replacement": "spring.jta.bitronix.properties.background-recovery-interval-seconds"
1060-
}
1061-
},
1062-
{
1063-
"name": "spring.jta.bitronix.properties.background-recovery-interval-seconds",
1064-
"description": "Interval in seconds at which to run the recovery process in the background.",
1065-
"defaultValue": 60
1066-
},
1067-
{
1068-
"name": "spring.jta.bitronix.properties.current-node-only-recovery",
1069-
"description": "Whether to recover only the current node. Should be enabled if you run multiple instances of the transaction manager on the same JMS and JDBC resources.",
1070-
"defaultValue": true
1071-
},
1072-
{
1073-
"name": "spring.jta.bitronix.properties.debug-zero-resource-transaction",
1074-
"description": "Whether to log the creation and commit call stacks of transactions executed without a single enlisted resource.",
1075-
"defaultValue": false
1076-
},
1077-
{
1078-
"name": "spring.jta.bitronix.properties.default-transaction-timeout",
1079-
"description": "Default transaction timeout, in seconds.",
1080-
"defaultValue": 60
1081-
},
1082-
{
1083-
"name": "spring.jta.bitronix.properties.disable-jmx",
1084-
"description": "Whether to enable JMX support.",
1085-
"defaultValue": false
1086-
},
1087-
{
1088-
"name": "spring.jta.bitronix.properties.exception-analyzer",
1089-
"description": "Set the fully qualified name of the exception analyzer implementation to use."
1090-
},
1091-
{
1092-
"name": "spring.jta.bitronix.properties.filter-log-status",
1093-
"description": "Whether to enable filtering of logs so that only mandatory logs are written.",
1094-
"defaultValue": false
1095-
},
1096-
{
1097-
"name": "spring.jta.bitronix.properties.force-batching-enabled",
1098-
"description": "Whether disk forces are batched.",
1099-
"defaultValue": true
1100-
},
1101-
{
1102-
"name": "spring.jta.bitronix.properties.forced-write-enabled",
1103-
"description": "Whether logs are forced to disk.",
1104-
"defaultValue": true
1105-
},
1106-
{
1107-
"name": "spring.jta.bitronix.properties.graceful-shutdown-interval",
1108-
"description": "Maximum amount of seconds the TM waits for transactions to get done before aborting them at shutdown time.",
1109-
"defaultValue": 60
1110-
},
1111-
{
1112-
"name": "spring.jta.bitronix.properties.jndi-transaction-synchronization-registry-name",
1113-
"description": "JNDI name of the TransactionSynchronizationRegistry."
1114-
},
1115-
{
1116-
"name": "spring.jta.bitronix.properties.jndi-user-transaction-name",
1117-
"description": "JNDI name of the UserTransaction."
1118-
},
1119-
{
1120-
"name": "spring.jta.bitronix.properties.journal",
1121-
"description": "Name of the journal. Can be 'disk', 'null', or a class name.",
1122-
"defaultValue": "disk"
1123-
},
1124-
{
1125-
"name": "spring.jta.bitronix.properties.log-part1-filename",
1126-
"description": "Name of the first fragment of the journal.",
1127-
"defaultValue": "btm1.tlog"
1128-
},
1129-
{
1130-
"name": "spring.jta.bitronix.properties.log-part2-filename",
1131-
"description": "Name of the second fragment of the journal.",
1132-
"defaultValue": "btm2.tlog"
1133-
},
1134-
{
1135-
"name": "spring.jta.bitronix.properties.max-log-size-in-mb",
1136-
"description": "Maximum size in megabytes of the journal fragments.",
1137-
"defaultValue": 2
1138-
},
1139-
{
1140-
"name": "spring.jta.bitronix.properties.resource-configuration-filename",
1141-
"description": "ResourceLoader configuration file name."
1142-
},
1143-
{
1144-
"name": "spring.jta.bitronix.properties.server-id",
1145-
"description": "ASCII ID that must uniquely identify this TM instance. Defaults to the machine's IP address."
1146-
},
1147-
{
1148-
"name": "spring.jta.bitronix.properties.skip-corrupted-logs",
1149-
"description": "Skip corrupted transactions log entries. Use only at last resort when all you have to recover is a pair of corrupted files.",
1150-
"defaultValue": false
1151-
},
1152-
{
1153-
"name": "spring.jta.bitronix.properties.warn-about-zero-resource-transaction",
1154-
"description": "Whether to log a warning for transactions executed without a single enlisted resource.",
1155-
"defaultValue": true
1156-
},
11571044
{
11581045
"name": "spring.jta.enabled",
11591046
"type": "java.lang.Boolean",

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/transaction/jta/JtaAutoConfigurationTests.java

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
import java.io.File;
2020
import java.io.IOException;
21-
import java.net.InetAddress;
22-
import java.net.UnknownHostException;
2321
import java.nio.file.Path;
2422

2523
import javax.jms.ConnectionFactory;
@@ -29,7 +27,6 @@
2927
import javax.jms.XASession;
3028
import javax.sql.DataSource;
3129
import javax.sql.XADataSource;
32-
import javax.transaction.TransactionManager;
3330
import javax.transaction.UserTransaction;
3431
import javax.transaction.xa.XAResource;
3532

@@ -67,7 +64,6 @@
6764
* @author Kazuki Shimizu
6865
* @author Nishant Raut
6966
*/
70-
// @SuppressWarnings("deprecation")
7167
class JtaAutoConfigurationTests {
7268

7369
private AnnotationConfigApplicationContext context;
@@ -111,37 +107,6 @@ void atomikosSanityCheck() {
111107
this.context.getBean(JtaTransactionManager.class);
112108
}
113109

114-
@Test
115-
@Deprecated
116-
void bitronixSanityCheck() {
117-
this.context = new AnnotationConfigApplicationContext(JtaProperties.class, BitronixJtaConfiguration.class);
118-
this.context.getBean(bitronix.tm.Configuration.class);
119-
this.context.getBean(TransactionManager.class);
120-
this.context.getBean(XADataSourceWrapper.class);
121-
this.context.getBean(XAConnectionFactoryWrapper.class);
122-
this.context.getBean(org.springframework.boot.jta.bitronix.BitronixDependentBeanFactoryPostProcessor.class);
123-
this.context.getBean(JtaTransactionManager.class);
124-
}
125-
126-
@Test
127-
@Deprecated
128-
void defaultBitronixServerId() throws UnknownHostException {
129-
this.context = new AnnotationConfigApplicationContext(BitronixJtaConfiguration.class);
130-
String serverId = this.context.getBean(bitronix.tm.Configuration.class).getServerId();
131-
assertThat(serverId).isEqualTo(InetAddress.getLocalHost().getHostAddress());
132-
}
133-
134-
@Test
135-
@Deprecated
136-
void customBitronixServerId() {
137-
this.context = new AnnotationConfigApplicationContext();
138-
TestPropertyValues.of("spring.jta.transactionManagerId:custom").applyTo(this.context);
139-
this.context.register(BitronixJtaConfiguration.class);
140-
this.context.refresh();
141-
String serverId = this.context.getBean(bitronix.tm.Configuration.class).getServerId();
142-
assertThat(serverId).isEqualTo("custom");
143-
}
144-
145110
@Test
146111
void defaultAtomikosTransactionManagerName(@TempDir Path dir) throws IOException {
147112
this.context = new AnnotationConfigApplicationContext();
@@ -166,20 +131,6 @@ void atomikosConnectionFactoryPoolConfiguration() {
166131
assertThat(connectionFactory.getMaxPoolSize()).isEqualTo(10);
167132
}
168133

169-
@Test
170-
@Deprecated
171-
void bitronixConnectionFactoryPoolConfiguration() {
172-
this.context = new AnnotationConfigApplicationContext();
173-
TestPropertyValues.of("spring.jta.bitronix.connectionfactory.minPoolSize:5",
174-
"spring.jta.bitronix.connectionfactory.maxPoolSize:10").applyTo(this.context);
175-
this.context.register(BitronixJtaConfiguration.class, PoolConfiguration.class);
176-
this.context.refresh();
177-
org.springframework.boot.jta.bitronix.PoolingConnectionFactoryBean connectionFactory = this.context
178-
.getBean(org.springframework.boot.jta.bitronix.PoolingConnectionFactoryBean.class);
179-
assertThat(connectionFactory.getMinPoolSize()).isEqualTo(5);
180-
assertThat(connectionFactory.getMaxPoolSize()).isEqualTo(10);
181-
}
182-
183134
@Test
184135
void atomikosDataSourcePoolConfiguration() {
185136
this.context = new AnnotationConfigApplicationContext();
@@ -193,21 +144,6 @@ void atomikosDataSourcePoolConfiguration() {
193144
assertThat(dataSource.getMaxPoolSize()).isEqualTo(10);
194145
}
195146

196-
@Test
197-
@Deprecated
198-
void bitronixDataSourcePoolConfiguration() {
199-
this.context = new AnnotationConfigApplicationContext();
200-
TestPropertyValues
201-
.of("spring.jta.bitronix.datasource.minPoolSize:5", "spring.jta.bitronix.datasource.maxPoolSize:10")
202-
.applyTo(this.context);
203-
this.context.register(BitronixJtaConfiguration.class, PoolConfiguration.class);
204-
this.context.refresh();
205-
org.springframework.boot.jta.bitronix.PoolingDataSourceBean dataSource = this.context
206-
.getBean(org.springframework.boot.jta.bitronix.PoolingDataSourceBean.class);
207-
assertThat(dataSource.getMinPoolSize()).isEqualTo(5);
208-
assertThat(dataSource.getMaxPoolSize()).isEqualTo(10);
209-
}
210-
211147
@Test
212148
void atomikosCustomizeJtaTransactionManagerUsingProperties() {
213149
this.context = new AnnotationConfigApplicationContext();
@@ -221,20 +157,6 @@ void atomikosCustomizeJtaTransactionManagerUsingProperties() {
221157
assertThat(transactionManager.isRollbackOnCommitFailure()).isTrue();
222158
}
223159

224-
@Test
225-
@Deprecated
226-
void bitronixCustomizeJtaTransactionManagerUsingProperties() {
227-
this.context = new AnnotationConfigApplicationContext();
228-
TestPropertyValues
229-
.of("spring.transaction.default-timeout:30", "spring.transaction.rollback-on-commit-failure:true")
230-
.applyTo(this.context);
231-
this.context.register(BitronixJtaConfiguration.class, TransactionAutoConfiguration.class);
232-
this.context.refresh();
233-
JtaTransactionManager transactionManager = this.context.getBean(JtaTransactionManager.class);
234-
assertThat(transactionManager.getDefaultTimeout()).isEqualTo(30);
235-
assertThat(transactionManager.isRollbackOnCommitFailure()).isTrue();
236-
}
237-
238160
@Configuration(proxyBeanMethods = false)
239161
static class CustomTransactionManagerConfig {
240162

0 commit comments

Comments
 (0)