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
pull/7647/merge
Stephane Nicoll 8 years ago
parent a59000354c
commit 250d5f9a52

@ -702,10 +702,6 @@ content into your application; rather pick only the properties that you need.
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.console-file-count=1 # Number of debug logs files that can be created.
spring.jta.atomikos.properties.console-file-limit=-1 # How many bytes can be stored at most in debug logs files.
spring.jta.atomikos.properties.console-file-name=tm.out # Debug logs file name.
spring.jta.atomikos.properties.console-log-level= # Console log level.
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.
@ -713,7 +709,6 @@ content into your application; rather pick only the properties that you need.
spring.jta.atomikos.properties.log-base-name=tmlog # Transactions log file base name.
spring.jta.atomikos.properties.max-actives=50 # Maximum number of active transactions.
spring.jta.atomikos.properties.max-timeout=300000 # Maximum timeout (in milliseconds) that can be allowed for transactions.
spring.jta.atomikos.properties.output-dir= # Directory in which to store the debug log files.
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 participating resources.

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -21,6 +21,7 @@ import java.util.Properties;
import java.util.TreeMap;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
/**
* Bean friendly variant of
@ -310,11 +311,14 @@ public class AtomikosProperties {
* Specifies the console log level. Defaults to {@link AtomikosLoggingLevel#WARN}.
* @param consoleLogLevel the console log level
*/
@Deprecated
public void setConsoleLogLevel(AtomikosLoggingLevel consoleLogLevel) {
this.consoleLogLevel = consoleLogLevel;
set("console_log_level", consoleLogLevel);
}
@DeprecatedConfigurationProperty(reason = "The proprietary logging framework is no longer supported as of Atomikos 3.8")
@Deprecated
public AtomikosLoggingLevel getConsoleLogLevel() {
return this.consoleLogLevel;
}
@ -324,11 +328,14 @@ public class AtomikosProperties {
* current working directory.
* @param outputDir the output dir
*/
@Deprecated
public void setOutputDir(String outputDir) {
this.outputDir = outputDir;
set("output_dir", outputDir);
}
@DeprecatedConfigurationProperty(reason = "The proprietary logging framework is no longer supported as of Atomikos 3.8")
@Deprecated
public String getOutputDir() {
return this.outputDir;
}
@ -337,11 +344,14 @@ public class AtomikosProperties {
* Specifies the debug logs file name. Defaults to {@literal tm.out}.
* @param consoleFileName the console file name
*/
@Deprecated
public void setConsoleFileName(String consoleFileName) {
this.consoleFileName = consoleFileName;
set("console_file_name", consoleFileName);
}
@DeprecatedConfigurationProperty(reason = "The proprietary logging framework is no longer supported as of Atomikos 3.8")
@Deprecated
public String getConsoleFileName() {
return this.consoleFileName;
}
@ -350,11 +360,14 @@ public class AtomikosProperties {
* Specifies how many debug logs files can be created. Defaults to {@literal 1}.
* @param consoleFileCount the console file count
*/
@Deprecated
public void setConsoleFileCount(int consoleFileCount) {
this.consoleFileCount = consoleFileCount;
set("console_file_count", consoleFileCount);
}
@DeprecatedConfigurationProperty(reason = "The proprietary logging framework is no longer supported as of Atomikos 3.8")
@Deprecated
public int getConsoleFileCount() {
return this.consoleFileCount;
}
@ -364,11 +377,14 @@ public class AtomikosProperties {
* {@literal -1}. Negative values means unlimited.
* @param consoleFileLimit the console file limit
*/
@Deprecated
public void setConsoleFileLimit(int consoleFileLimit) {
this.consoleFileLimit = consoleFileLimit;
set("console_file_limit", consoleFileLimit);
}
@DeprecatedConfigurationProperty(reason = "The proprietary logging framework is no longer supported as of Atomikos 3.8")
@Deprecated
public int getConsoleFileLimit() {
return this.consoleFileLimit;
}

@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -21,7 +21,7 @@ import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for ;@link AtomikosProperties}.
* Tests for {@link AtomikosProperties}.
*
* @author Phillip Webb
*/
@ -42,14 +42,9 @@ public class AtomikosPropertiesTests {
this.properties.setLogBaseName("logBaseName");
this.properties.setLogBaseDir("logBaseDir");
this.properties.setCheckpointInterval(4);
this.properties.setConsoleLogLevel(AtomikosLoggingLevel.WARN);
this.properties.setOutputDir("outputDir");
this.properties.setConsoleFileName("consoleFileName");
this.properties.setConsoleFileCount(5);
this.properties.setConsoleFileLimit(6);
this.properties.setThreadedTwoPhaseCommit(true);
assertThat(this.properties.asProperties().size()).isEqualTo(17);
assertThat(this.properties.asProperties().size()).isEqualTo(12);
assertProperty("com.atomikos.icatch.service", "service");
assertProperty("com.atomikos.icatch.max_timeout", "1");
assertProperty("com.atomikos.icatch.default_jta_timeout", "2");
@ -61,11 +56,6 @@ public class AtomikosPropertiesTests {
assertProperty("com.atomikos.icatch.log_base_name", "logBaseName");
assertProperty("com.atomikos.icatch.log_base_dir", "logBaseDir");
assertProperty("com.atomikos.icatch.checkpoint_interval", "4");
assertProperty("com.atomikos.icatch.console_log_level", "WARN");
assertProperty("com.atomikos.icatch.output_dir", "outputDir");
assertProperty("com.atomikos.icatch.console_file_name", "consoleFileName");
assertProperty("com.atomikos.icatch.console_file_count", "5");
assertProperty("com.atomikos.icatch.console_file_limit", "6");
assertProperty("com.atomikos.icatch.threaded_2pc", "true");
}

Loading…
Cancel
Save