Commit 250d5f9a authored by Stephane Nicoll's avatar Stephane Nicoll

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
parent a5900035
...@@ -702,10 +702,6 @@ content into your application; rather pick only the properties that you need. ...@@ -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.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.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.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.default-jta-timeout=10000 # Default timeout for JTA transactions.
spring.jta.atomikos.properties.enable-logging=true # Enable disk logging. 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.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. ...@@ -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.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-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.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.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.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. spring.jta.atomikos.properties.threaded-two-phase-commit=true # Use different (and concurrent) threads for two-phase commit on the participating resources.
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -21,6 +21,7 @@ import java.util.Properties; ...@@ -21,6 +21,7 @@ import java.util.Properties;
import java.util.TreeMap; import java.util.TreeMap;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
/** /**
* Bean friendly variant of * Bean friendly variant of
...@@ -310,11 +311,14 @@ public class AtomikosProperties { ...@@ -310,11 +311,14 @@ public class AtomikosProperties {
* Specifies the console log level. Defaults to {@link AtomikosLoggingLevel#WARN}. * Specifies the console log level. Defaults to {@link AtomikosLoggingLevel#WARN}.
* @param consoleLogLevel the console log level * @param consoleLogLevel the console log level
*/ */
@Deprecated
public void setConsoleLogLevel(AtomikosLoggingLevel consoleLogLevel) { public void setConsoleLogLevel(AtomikosLoggingLevel consoleLogLevel) {
this.consoleLogLevel = consoleLogLevel; this.consoleLogLevel = consoleLogLevel;
set("console_log_level", 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() { public AtomikosLoggingLevel getConsoleLogLevel() {
return this.consoleLogLevel; return this.consoleLogLevel;
} }
...@@ -324,11 +328,14 @@ public class AtomikosProperties { ...@@ -324,11 +328,14 @@ public class AtomikosProperties {
* current working directory. * current working directory.
* @param outputDir the output dir * @param outputDir the output dir
*/ */
@Deprecated
public void setOutputDir(String outputDir) { public void setOutputDir(String outputDir) {
this.outputDir = outputDir; this.outputDir = outputDir;
set("output_dir", outputDir); set("output_dir", outputDir);
} }
@DeprecatedConfigurationProperty(reason = "The proprietary logging framework is no longer supported as of Atomikos 3.8")
@Deprecated
public String getOutputDir() { public String getOutputDir() {
return this.outputDir; return this.outputDir;
} }
...@@ -337,11 +344,14 @@ public class AtomikosProperties { ...@@ -337,11 +344,14 @@ public class AtomikosProperties {
* Specifies the debug logs file name. Defaults to {@literal tm.out}. * Specifies the debug logs file name. Defaults to {@literal tm.out}.
* @param consoleFileName the console file name * @param consoleFileName the console file name
*/ */
@Deprecated
public void setConsoleFileName(String consoleFileName) { public void setConsoleFileName(String consoleFileName) {
this.consoleFileName = consoleFileName; this.consoleFileName = consoleFileName;
set("console_file_name", 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() { public String getConsoleFileName() {
return this.consoleFileName; return this.consoleFileName;
} }
...@@ -350,11 +360,14 @@ public class AtomikosProperties { ...@@ -350,11 +360,14 @@ public class AtomikosProperties {
* Specifies how many debug logs files can be created. Defaults to {@literal 1}. * Specifies how many debug logs files can be created. Defaults to {@literal 1}.
* @param consoleFileCount the console file count * @param consoleFileCount the console file count
*/ */
@Deprecated
public void setConsoleFileCount(int consoleFileCount) { public void setConsoleFileCount(int consoleFileCount) {
this.consoleFileCount = consoleFileCount; this.consoleFileCount = consoleFileCount;
set("console_file_count", 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() { public int getConsoleFileCount() {
return this.consoleFileCount; return this.consoleFileCount;
} }
...@@ -364,11 +377,14 @@ public class AtomikosProperties { ...@@ -364,11 +377,14 @@ public class AtomikosProperties {
* {@literal -1}. Negative values means unlimited. * {@literal -1}. Negative values means unlimited.
* @param consoleFileLimit the console file limit * @param consoleFileLimit the console file limit
*/ */
@Deprecated
public void setConsoleFileLimit(int consoleFileLimit) { public void setConsoleFileLimit(int consoleFileLimit) {
this.consoleFileLimit = consoleFileLimit; this.consoleFileLimit = consoleFileLimit;
set("console_file_limit", 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() { public int getConsoleFileLimit() {
return this.consoleFileLimit; return this.consoleFileLimit;
} }
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -21,7 +21,7 @@ import org.junit.Test; ...@@ -21,7 +21,7 @@ import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
/** /**
* Tests for ;@link AtomikosProperties}. * Tests for {@link AtomikosProperties}.
* *
* @author Phillip Webb * @author Phillip Webb
*/ */
...@@ -42,14 +42,9 @@ public class AtomikosPropertiesTests { ...@@ -42,14 +42,9 @@ public class AtomikosPropertiesTests {
this.properties.setLogBaseName("logBaseName"); this.properties.setLogBaseName("logBaseName");
this.properties.setLogBaseDir("logBaseDir"); this.properties.setLogBaseDir("logBaseDir");
this.properties.setCheckpointInterval(4); 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); 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.service", "service");
assertProperty("com.atomikos.icatch.max_timeout", "1"); assertProperty("com.atomikos.icatch.max_timeout", "1");
assertProperty("com.atomikos.icatch.default_jta_timeout", "2"); assertProperty("com.atomikos.icatch.default_jta_timeout", "2");
...@@ -61,11 +56,6 @@ public class AtomikosPropertiesTests { ...@@ -61,11 +56,6 @@ public class AtomikosPropertiesTests {
assertProperty("com.atomikos.icatch.log_base_name", "logBaseName"); assertProperty("com.atomikos.icatch.log_base_name", "logBaseName");
assertProperty("com.atomikos.icatch.log_base_dir", "logBaseDir"); assertProperty("com.atomikos.icatch.log_base_dir", "logBaseDir");
assertProperty("com.atomikos.icatch.checkpoint_interval", "4"); 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"); assertProperty("com.atomikos.icatch.threaded_2pc", "true");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment