ARTEMIS-1767 JDBC Lock Acquisition Timeout should behave like the file based version

The JDBC Lock Acquisition Timeout is no longer exposed to any user configuration and defaulted to infinite to match the behaviour of the journal (file-based) one.
This commit is contained in:
Francesco Nigro 2018-03-22 19:13:49 +01:00 committed by Clebert Suconic
parent fae3a8fadb
commit b775cb251f
6 changed files with 1 additions and 19 deletions

View File

@ -290,9 +290,6 @@ public class Create extends InputAbstract {
@Option(name = "--jdbc-network-timeout", description = "Network timeout")
long jdbcNetworkTimeout = ActiveMQDefaultConfiguration.getDefaultJdbcNetworkTimeout();
@Option(name = "--jdbc-lock-acquisition-timeout", description = "Lock acquisition timeout")
long jdbcLockAcquisitionTimeout = ActiveMQDefaultConfiguration.getDefaultJournalLockAcquisitionTimeout();
@Option(name = "--jdbc-lock-renew-period", description = "Lock Renew Period")
long jdbcLockRenewPeriod = ActiveMQDefaultConfiguration.getDefaultJdbcLockRenewPeriodMillis();
@ -623,7 +620,6 @@ public class Create extends InputAbstract {
filters.put("${jdbcURL}", jdbcURL);
filters.put("${jdbcClassName}", jdbcClassName);
filters.put("${jdbcNetworkTimeout}", "" + jdbcNetworkTimeout);
filters.put("${jdbcLockAcquisitionTimeout}", "" + jdbcLockAcquisitionTimeout);
filters.put("${jdbcLockRenewPeriod}", "" + jdbcLockRenewPeriod);
filters.put("${jdbcLockExpiration}", "" + jdbcLockExpiration);
filters.put("${jdbc}", readTextFile(ETC_DATABASE_STORE_TXT, filters));

View File

@ -10,7 +10,6 @@
<bindings-table-name>${jdbcBindings}</bindings-table-name>
<large-message-table-name>${jdbcLargeMessages}</large-message-table-name>
<page-store-table-name>${jdbcPageStore}</page-store-table-name>
<jdbc-lock-acquisition-timeout>${jdbcLockAcquisitionTimeout}</jdbc-lock-acquisition-timeout>
<jdbc-lock-expiration>${jdbcLockExpiration}</jdbc-lock-expiration>
<jdbc-lock-renew-period>${jdbcLockRenewPeriod}</jdbc-lock-renew-period>
<jdbc-network-timeout>${jdbcNetworkTimeout}</jdbc-network-timeout>

View File

@ -447,7 +447,7 @@ public final class ActiveMQDefaultConfiguration {
private static final long DEFAULT_JDBC_LOCK_EXPIRATION_MILLIS = TimeUnit.SECONDS.toMillis(20);
private static final long DEFAULT_JDBC_LOCK_ACQUISITION_TIMEOUT_MILLIS = TimeUnit.SECONDS.toMillis(60);
private static final long DEFAULT_JDBC_LOCK_ACQUISITION_TIMEOUT_MILLIS = -1;
// Default period to wait between connection TTL checks
public static final long DEFAULT_CONNECTION_TTL_CHECK_INTERVAL = 2000;

View File

@ -1470,7 +1470,6 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
conf.setJdbcConnectionUrl(getString(storeNode, "jdbc-connection-url", conf.getJdbcConnectionUrl(), Validators.NO_CHECK));
conf.setJdbcDriverClassName(getString(storeNode, "jdbc-driver-class-name", conf.getJdbcDriverClassName(), Validators.NO_CHECK));
conf.setJdbcNetworkTimeout(getInteger(storeNode, "jdbc-network-timeout", conf.getJdbcNetworkTimeout(), Validators.NO_CHECK));
conf.setJdbcLockAcquisitionTimeoutMillis(getLong(storeNode, "jdbc-lock-acquisition-timeout", conf.getJdbcLockAcquisitionTimeoutMillis(), Validators.NO_CHECK));
conf.setJdbcLockRenewPeriodMillis(getLong(storeNode, "jdbc-lock-renew-period", conf.getJdbcLockRenewPeriodMillis(), Validators.NO_CHECK));
conf.setJdbcLockExpirationMillis(getLong(storeNode, "jdbc-lock-expiration", conf.getJdbcLockExpirationMillis(), Validators.NO_CHECK));
return conf;

View File

@ -1942,13 +1942,6 @@
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="jdbc-lock-acquisition-timeout" type="xsd:int" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
The max allowed time in milliseconds while trying to acquire a JDBC lock.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="jdbc-lock-renew-period" type="xsd:int" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>

View File

@ -451,11 +451,6 @@ To configure Apache ActiveMQ Artemis to use a database for persisting messages a
The JDBC network connection timeout in milliseconds. The default value
is 20000 milliseconds (ie 20 seconds).
- `jdbc-lock-acquisition-timeout`
The max allowed time in milliseconds while trying to acquire a JDBC lock. The default value
is 60000 milliseconds (ie 60 seconds).
- `jdbc-lock-renew-period`
The period in milliseconds of the keep alive service of a JDBC lock. The default value