Skip to content

Commit 250d5f9

Browse files
committed
Deprecate Atomikos console logs properties
Those properties are no longer honoured with Atomikos 3.8 and we're using 3.9 by default. Closes gh-9292
1 parent a590003 commit 250d5f9

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -702,18 +702,13 @@ content into your application; rather pick only the properties that you need.
702702
spring.jta.atomikos.datasource.test-query= # SQL query or statement used to validate a connection before returning it.
703703
spring.jta.atomikos.datasource.unique-resource-name=dataSource # The unique name used to identify the resource during recovery.
704704
spring.jta.atomikos.properties.checkpoint-interval=500 # Interval between checkpoints.
705-
spring.jta.atomikos.properties.console-file-count=1 # Number of debug logs files that can be created.
706-
spring.jta.atomikos.properties.console-file-limit=-1 # How many bytes can be stored at most in debug logs files.
707-
spring.jta.atomikos.properties.console-file-name=tm.out # Debug logs file name.
708-
spring.jta.atomikos.properties.console-log-level= # Console log level.
709705
spring.jta.atomikos.properties.default-jta-timeout=10000 # Default timeout for JTA transactions.
710706
spring.jta.atomikos.properties.enable-logging=true # Enable disk logging.
711707
spring.jta.atomikos.properties.force-shutdown-on-vm-exit=false # Specify if a VM shutdown should trigger forced shutdown of the transaction core.
712708
spring.jta.atomikos.properties.log-base-dir= # Directory in which the log files should be stored.
713709
spring.jta.atomikos.properties.log-base-name=tmlog # Transactions log file base name.
714710
spring.jta.atomikos.properties.max-actives=50 # Maximum number of active transactions.
715711
spring.jta.atomikos.properties.max-timeout=300000 # Maximum timeout (in milliseconds) that can be allowed for transactions.
716-
spring.jta.atomikos.properties.output-dir= # Directory in which to store the debug log files.
717712
spring.jta.atomikos.properties.serial-jta-transactions=true # Specify if sub-transactions should be joined when possible.
718713
spring.jta.atomikos.properties.service= # Transaction manager implementation that should be started.
719714
spring.jta.atomikos.properties.threaded-two-phase-commit=true # Use different (and concurrent) threads for two-phase commit on the participating resources.

spring-boot/src/main/java/org/springframework/boot/jta/atomikos/AtomikosProperties.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@
2121
import java.util.TreeMap;
2222

2323
import org.springframework.boot.context.properties.ConfigurationProperties;
24+
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
2425

2526
/**
2627
* Bean friendly variant of
@@ -310,11 +311,14 @@ public long getCheckpointInterval() {
310311
* Specifies the console log level. Defaults to {@link AtomikosLoggingLevel#WARN}.
311312
* @param consoleLogLevel the console log level
312313
*/
314+
@Deprecated
313315
public void setConsoleLogLevel(AtomikosLoggingLevel consoleLogLevel) {
314316
this.consoleLogLevel = consoleLogLevel;
315317
set("console_log_level", consoleLogLevel);
316318
}
317319

320+
@DeprecatedConfigurationProperty(reason = "The proprietary logging framework is no longer supported as of Atomikos 3.8")
321+
@Deprecated
318322
public AtomikosLoggingLevel getConsoleLogLevel() {
319323
return this.consoleLogLevel;
320324
}
@@ -324,11 +328,14 @@ public AtomikosLoggingLevel getConsoleLogLevel() {
324328
* current working directory.
325329
* @param outputDir the output dir
326330
*/
331+
@Deprecated
327332
public void setOutputDir(String outputDir) {
328333
this.outputDir = outputDir;
329334
set("output_dir", outputDir);
330335
}
331336

337+
@DeprecatedConfigurationProperty(reason = "The proprietary logging framework is no longer supported as of Atomikos 3.8")
338+
@Deprecated
332339
public String getOutputDir() {
333340
return this.outputDir;
334341
}
@@ -337,11 +344,14 @@ public String getOutputDir() {
337344
* Specifies the debug logs file name. Defaults to {@literal tm.out}.
338345
* @param consoleFileName the console file name
339346
*/
347+
@Deprecated
340348
public void setConsoleFileName(String consoleFileName) {
341349
this.consoleFileName = consoleFileName;
342350
set("console_file_name", consoleFileName);
343351
}
344352

353+
@DeprecatedConfigurationProperty(reason = "The proprietary logging framework is no longer supported as of Atomikos 3.8")
354+
@Deprecated
345355
public String getConsoleFileName() {
346356
return this.consoleFileName;
347357
}
@@ -350,11 +360,14 @@ public String getConsoleFileName() {
350360
* Specifies how many debug logs files can be created. Defaults to {@literal 1}.
351361
* @param consoleFileCount the console file count
352362
*/
363+
@Deprecated
353364
public void setConsoleFileCount(int consoleFileCount) {
354365
this.consoleFileCount = consoleFileCount;
355366
set("console_file_count", consoleFileCount);
356367
}
357368

369+
@DeprecatedConfigurationProperty(reason = "The proprietary logging framework is no longer supported as of Atomikos 3.8")
370+
@Deprecated
358371
public int getConsoleFileCount() {
359372
return this.consoleFileCount;
360373
}
@@ -364,11 +377,14 @@ public int getConsoleFileCount() {
364377
* {@literal -1}. Negative values means unlimited.
365378
* @param consoleFileLimit the console file limit
366379
*/
380+
@Deprecated
367381
public void setConsoleFileLimit(int consoleFileLimit) {
368382
this.consoleFileLimit = consoleFileLimit;
369383
set("console_file_limit", consoleFileLimit);
370384
}
371385

386+
@DeprecatedConfigurationProperty(reason = "The proprietary logging framework is no longer supported as of Atomikos 3.8")
387+
@Deprecated
372388
public int getConsoleFileLimit() {
373389
return this.consoleFileLimit;
374390
}

spring-boot/src/test/java/org/springframework/boot/jta/atomikos/AtomikosPropertiesTests.java

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
2121
import static org.assertj.core.api.Assertions.assertThat;
2222

2323
/**
24-
* Tests for ;@link AtomikosProperties}.
24+
* Tests for {@link AtomikosProperties}.
2525
*
2626
* @author Phillip Webb
2727
*/
@@ -42,14 +42,9 @@ public void testProperties() {
4242
this.properties.setLogBaseName("logBaseName");
4343
this.properties.setLogBaseDir("logBaseDir");
4444
this.properties.setCheckpointInterval(4);
45-
this.properties.setConsoleLogLevel(AtomikosLoggingLevel.WARN);
46-
this.properties.setOutputDir("outputDir");
47-
this.properties.setConsoleFileName("consoleFileName");
48-
this.properties.setConsoleFileCount(5);
49-
this.properties.setConsoleFileLimit(6);
5045
this.properties.setThreadedTwoPhaseCommit(true);
5146

52-
assertThat(this.properties.asProperties().size()).isEqualTo(17);
47+
assertThat(this.properties.asProperties().size()).isEqualTo(12);
5348
assertProperty("com.atomikos.icatch.service", "service");
5449
assertProperty("com.atomikos.icatch.max_timeout", "1");
5550
assertProperty("com.atomikos.icatch.default_jta_timeout", "2");
@@ -61,11 +56,6 @@ public void testProperties() {
6156
assertProperty("com.atomikos.icatch.log_base_name", "logBaseName");
6257
assertProperty("com.atomikos.icatch.log_base_dir", "logBaseDir");
6358
assertProperty("com.atomikos.icatch.checkpoint_interval", "4");
64-
assertProperty("com.atomikos.icatch.console_log_level", "WARN");
65-
assertProperty("com.atomikos.icatch.output_dir", "outputDir");
66-
assertProperty("com.atomikos.icatch.console_file_name", "consoleFileName");
67-
assertProperty("com.atomikos.icatch.console_file_count", "5");
68-
assertProperty("com.atomikos.icatch.console_file_limit", "6");
6959
assertProperty("com.atomikos.icatch.threaded_2pc", "true");
7060
}
7161

0 commit comments

Comments
 (0)