8827 Commits

Author SHA1 Message Date
Spring Buildmaster
76ede9e000 [artifactory-release] Next development version 2020-12-11 15:35:03 +00:00
Spring Buildmaster
e0b1a5af5a [artifactory-release] Release version 4.3.24.RELEASE 2020-12-11 15:34:58 +00:00
Artem Bilan
36d3a1183d Ignore many other JDBC tests with Derby 2020-12-11 10:19:10 -05:00
Artem Bilan
89ac0655f2 Ignore sporadically failing on CI RMI tests 2020-12-10 12:39:32 -05:00
Artem Bilan
5173b85753 More ignored Derby tests 2020-12-10 11:49:27 -05:00
Artem Bilan
de1438a330 Ignore another Derby test 2020-12-10 11:15:47 -05:00
Artem Bilan
4e583e11df Upgrade Derby with hope to have CI conflict fixed 2020-12-10 10:52:00 -05:00
Artem Bilan
f53edca205 Another JDBC test for Derby to ignore 2020-12-10 10:15:31 -05:00
Artem Bilan
49244a06b5 Another JDBC test for Derby to ignore 2020-12-09 17:12:08 -05:00
Artem Bilan
4dbd66131e Ignore another JDBC test for Derby 2020-12-09 16:55:04 -05:00
Artem Bilan
e65dfba443 Ignore more JDBC tests for Derby 2020-12-09 15:05:37 -05:00
Artem Bilan
e07e87f427 Remove channelMessages collection from MongoDB 2020-12-09 14:45:11 -05:00
Artem Bilan
a675f46de5 Ignore JDBC test for Derby
Looks like there is some resource conflict for embedded Derby on the CI

Also fix `throws Exception` for MongoDB tests
2020-12-09 14:35:09 -05:00
Artem Bilan
21e2aeb443 Remove unused import from the test 2020-12-09 14:16:27 -05:00
Artem Bilan
0a49018991 Bring back trustAllPackages for ActiveMQ tests 2020-12-09 14:09:37 -05:00
Artem Bilan
e14a0ce7a5 Remove setTrustAllPackages for ActiveMQ 2020-12-09 13:53:04 -05:00
Artem Bilan
e610d370a4 Fix tests for CI and versions compatibility 2020-12-09 13:46:35 -05:00
Artem Bilan
c420f5448b Upgrade dependencies; prepare for last release 2020-12-09 13:11:39 -05:00
Gary Russell
b1932942cf GH-3418: Fix Poller Undeclared Checked Exceptions
Resolves https://github.com/spring-projects/spring-integration/issues/3418

`Class.newInstance()` can propagate checked exceptions that are not declared.

**cherry-pick/back-port to 5.3.x, 5.2.x, 4.3.x**

# Conflicts:
#	spring-integration-core/src/main/java/org/springframework/integration/endpoint/AbstractPollingEndpoint.java
2020-11-02 11:42:40 -05:00
Artem Bilan
90196767db GH-3370: Remove synchronized from RemoteFileUtils (#3380)
* GH-3370: Remove synchronized from RemoteFileUtils

Fixes https://github.com/spring-projects/spring-integration/issues/3370

The `synchronized` on the `RemoteFileUtils.makeDirectories()` makes an application too
 slow, especially when we deal with different paths in different sessions

* Remove the `synchronized` from that method and rework `SftpSession.mkdir()`
to return `false` when "A file cannot be created if it already exists" exception
is thrown from the server.
Essentially make an `exists()` call to be sure that an exception is really related
to "file-already-exists" answer from the server

**Cherry-pick to 5.3.x, 5.2.x & 4.3.x**

* * Re-throw an exception in the `SftpSession.mkdir()`
when error code is not `4` or remote dir does not exist

* * Check `session.mkdir()` result in the
`RemoteFileUtils` to throw an `IOException` when `false`

* * Fix mock test to return `true` for `mkdir` instead of `null`
# Conflicts:
#	spring-integration-file/src/main/java/org/springframework/integration/file/remote/RemoteFileUtils.java
#	spring-integration-file/src/main/java/org/springframework/integration/file/remote/gateway/AbstractRemoteFileOutboundGateway.java
#	spring-integration-file/src/test/java/org/springframework/integration/file/remote/gateway/RemoteFileOutboundGatewayTests.java
#	spring-integration-sftp/src/test/java/org/springframework/integration/sftp/outbound/SftpOutboundTests.java
2020-09-10 17:21:47 -04:00
Spring Buildmaster
059d474a59 [artifactory-release] Next development version 2020-07-22 18:32:49 +00:00
Spring Buildmaster
99675f8693 [artifactory-release] Release version 4.3.23.RELEASE 2020-07-22 18:32:44 +00:00
Artem Bilan
c83da550a4 Improve MessageKryoRegistrar for registrations
(cherry picked from commit 5ec71d4b4a)

# Conflicts:
#	spring-integration-core/src/main/java/org/springframework/integration/codec/kryo/CompositeKryoRegistrar.java

# Conflicts:
#	spring-integration-core/src/main/java/org/springframework/integration/codec/kryo/CompositeKryoRegistrar.java
#	spring-integration-core/src/main/java/org/springframework/integration/codec/kryo/MessageCodec.java
#	spring-integration-core/src/main/java/org/springframework/integration/codec/kryo/MessageKryoRegistrar.java
#	spring-integration-core/src/main/java/org/springframework/integration/codec/kryo/RegistrationIds.java
2020-07-22 13:46:43 -04:00
Artem Bilan
9ada7858df Fix typo in KryoCodecTests
(cherry picked from commit 5e45b09cd5)
2020-07-22 12:35:13 -04:00
Artem Bilan
6940b860d7 Upgrade dependencies; prepare for release 2020-07-22 12:31:32 -04:00
Artem Bilan
8468edcbed Improve Kryo Codec for registrations
# Conflicts:
#	spring-integration-core/src/test/java/org/springframework/integration/codec/kryo/KryoCodecTests.java

# Conflicts:
#	spring-integration-core/src/main/java/org/springframework/integration/codec/kryo/AbstractKryoCodec.java
#	spring-integration-core/src/test/java/org/springframework/integration/codec/kryo/CompositeCodecTests.java
#	spring-integration-core/src/test/java/org/springframework/integration/codec/kryo/KryoCodecTests.java
2020-07-22 12:10:46 -04:00
Gary Russell
c95e6dcc3b Fix CachedSessionFactory Race
Close the pool so that any sessions returned after the factory is
`destroy()`ed are closed.

* Call `removeAllIdleItems()` in `close()`.

* Close sessions in `SftpStreamingMessageSourceTests`.

**cherry-pick to all supported branches**

# Conflicts:
#	spring-integration-core/src/test/java/org/springframework/integration/util/SimplePoolTests.java

# Conflicts:
#	spring-integration-core/src/test/java/org/springframework/integration/util/SimplePoolTests.java
#	spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/CachingClientConnectionFactory.java
#	spring-integration-sftp/src/test/java/org/springframework/integration/sftp/inbound/SftpStreamingMessageSourceTests.java

* Remove `default close()` from `Pool` interface
* Cast to `SimplePool` in the `CSF` to call the new `close()`
2020-07-08 14:45:52 -04:00
Artem Bilan
a24f24fc6d More retry for TransactionTimedOutException
Related to https://github.com/spring-projects/spring-integration/issues/3307
2020-06-16 12:31:36 -04:00
Artem Bilan
b4d9831d95 GH-3307: Retry TransTimedEx in LockRepo.acquire
Fixes https://github.com/spring-projects/spring-integration/issues/3307

The `DefaultLockRepository.acquire()` is transactional method and
can fail with the `TransactionTimedOutException`.
When we call `JdbcLock.lock()`, we expect an attempt until we really obtain a lock.

* Treat a `TransactionTimedOutException` as a `TransientDataAccessException` and
therefore retry a locking attempt logic

**Cherry-pick to 5.3.x, 5.2.x & 4.3.x**

(cherry picked from commit b0cd0156c7)

# Conflicts:
#	spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/lock/JdbcLockRegistry.java
2020-06-16 12:27:40 -04:00
artembilan
415fb6465f Code clean up for JacksonJsonUtils
* Mention `trustedPackages` in the `redis.adoc`

**Cherry-pick to 5.3.x, 5.2.x, 5.1.x & 4.3.x**
2020-06-09 14:59:35 -04:00
astrubel
7ff0fdd022 GH-3294: Retry JdbcLock.unlock for TransDataAccEx
Fixes https://github.com/spring-projects/spring-integration/issues/3294

A `DeadlockLoserDataAccessException` occurs at `JdbcLockRegistry$JdbcLock.unlock()` - 
better to retry like in the `lock()`

**Cherry-pick to 5.3.x, 5.2.x, 5.1.x & 4.3.x**
2020-06-09 13:32:26 -04:00
Vladimir Plizga
35d5555acc GH-3286: Make FileTailingEvent#getMessage public
Fixes https://github.com/spring-projects/spring-integration/issues/3286

The `FileTailingEvent.getMessage()` is really meant to be as `public`

**Cherry-pick to 5.3.x, 5.2.x, 5.1.x & 4.3.x**
# Conflicts:
#	spring-integration-file/src/main/java/org/springframework/integration/file/tail/FileTailingMessageProducerSupport.java
2020-05-21 09:54:36 -04:00
Artem Bilan
96cf14674c GH-3271: Close session on error in stream source
Fixes https://github.com/spring-projects/spring-integration/issues/3271

When exception happens at `.withPayload(session.readRaw(remotePath))`
in the `AbstractRemoteFileStreamingMessageSource` we don't close session.
The resource leaking happens in the caching session factory

* Add `session.close();` into the `catch (IOException e) {`
in the `AbstractRemoteFileStreamingMessageSource.doReceive()`
to clean up resources properly

**Cherry-pick to 5.2.x, 5.1.x & 4.3.x**
2020-05-11 17:31:00 -04:00
Artem Bilan
c00c319acb GH-3249: Fix RemoteFileTemplate dead lock in send
Fixes: https://github.com/spring-projects/spring-integration/issues/3249

When the `CachingSessionFactory` is configured with small enough pool
and it is very likely that dead lock may happen when `RemoteFileTemplate.send()`
is used.
The problem happens when we reach the `RemoteFileTemplate.exists()` call
which is done from the internal method called from already pulled from cache
`Session`

* Fix `RemoteFileTemplate` to use a `session.exists()` instead on the provided
into the method `Session`
* Demonstrate the problem in the `SftpRemoteFileTemplateTests.testNoDeadLockOnSend()`

**Cherry-pick to 5.2.x, 5.1.x & 4.3.x**

Fix RemoteFileOutboundGWTests for the proper mock
2020-04-20 12:10:23 -04:00
Artem Bilan
aa65955e00 Remove unused import from UnmarshallingTransformer 2020-04-03 09:30:11 -04:00
Artem Bilan
43c5519ca6 GH-3238: Fix Unmarshaller to close File resource
Fixes https://github.com/spring-projects/spring-integration/issues/3238

* Extract an `InputStream` from a `File` payload in the `UnmarshallingTransformer`
before parsing an XML.
Close this `InputStream` in the `finally` block to release the file resource

**Cherry-pick to 5.2.x, 5.1.x & 4.3.x**

# Conflicts:
#	spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/UnmarshallingTransformer.java
#	spring-integration-xml/src/test/java/org/springframework/integration/xml/transformer/jaxbmarshaling/JaxbMarshallingIntegrationTests.java

# Conflicts:
#	spring-integration-xml/src/main/java/org/springframework/integration/xml/transformer/UnmarshallingTransformer.java
#	spring-integration-xml/src/test/java/org/springframework/integration/xml/transformer/jaxbmarshaling/JaxbMarshallingIntegrationTests.java
2020-04-02 21:58:00 -04:00
Spring Buildmaster
3ab990acf0 [artifactory-release] Next development version 2020-03-12 17:32:54 +00:00
Spring Buildmaster
b272c34d63 [artifactory-release] Release version 4.3.22.RELEASE 2020-03-12 17:32:50 +00:00
Artem Bilan
051a4cffeb Upgrade dependencies; prepare fpr release 2020-03-12 13:05:34 -04:00
Gary Russell
02b1947e2d GH-3199: Fix fail back with Long.MAX_VALUE
Resolves https://github.com/spring-projects/spring-integration/issues/3199

When the `refreshSharedInterval` was `Long.MAX_VALUE` the test for whether
the interval was exceeded always returned true.

Use a boolean instead (already in place on master).

I will backport to 5.1.x, 4.3.x after merge.
2020-03-05 11:36:28 -05:00
Artem Bilan
61747e5946 Upgrade to Gradle 4.10.2 to support Bamboo build
* Upgrade to Sonar plugin `2.7.1` for compatibility with Gradlge `4.x`
2020-02-28 17:21:31 -05:00
Gary Russell
fa0caeb1b4 GH-3199: FailoverClientCF - Fail Back Option
Resolves: https://github.com/spring-projects/spring-integration/issues/3199

Previously, the FCCF did not cache a shared connection; if server 1 is down
and server 2 is up, this caused an attempt to connect to server 1 every time
we got the connection.

Add 2 options: `refreshSharedInterval` and `closeOnRefresh`, defaulting to
0 and false respectively, to maintain the same behavior as before the options
existed.

Disallow caching of the single shared connection if the delegate factories are
`CachingClientConnectionFactory` instances.

**cherry-pick to 5.2.x**

I will backport to 5.1.x, 4.3.x after review/merge.

* Polish javadocs and fix typo in docs
2020-02-28 16:35:55 -05:00
Gary Russell
7ced027529 Fix TcpConnectionFactory FactoryBean
- bean factory and application context were not injected
- `afterPropertiesSet()` was not called

**cherry-pick to all supported branches**

# Conflicts:
#	spring-integration-ip/src/main/java/org/springframework/integration/ip/config/TcpConnectionFactoryFactoryBean.java

# Conflicts:
#	spring-integration-ip/src/main/java/org/springframework/integration/ip/config/TcpConnectionFactoryFactoryBean.java
2019-11-20 15:11:10 -05:00
Artem Bilan
127f683952 GH-3090: Add logout() to FtpSession.close()`
Fixes https://github.com/spring-projects/spring-integration/issues/3090

Without `logout()` the FTP session is not closed at all,
but just the connection is closed.
Some FTP servers close those sessions eventually anyway, but some just
leak with resources.

**Cherry-pick to 5.1.x & 4.3.x**
2019-10-30 15:45:55 -04:00
Emmanuel Roux
88908167bb GH-3076: NioFileLocker: add file existence check
Fixes spring-projects/spring-integration#3076

* Return `null` instead of throwing an exception

* Fix license header

* Add missing `@since`

* Avoid over-engineered test logic

* Fix code style

* Test non-existent file does not get created

* Fix: remove unused import

* Remove Java 8 constructions; revert AssertJ to regular JUnit assertions
2019-10-17 15:11:35 -04:00
Gary Russell
9c24e161c1 GH-3083: Support @Header with dotted literals
Fixes https://github.com/spring-projects/spring-integration/issues/3083

`@Header("foo.bar")` means extract property `bar` from header `foo`.

Support `@Header("'foo.bar'")`, meaning get the value of header `foo.bar`.

**cherry-pick to 5.1.x, 4.3.x**

# Conflicts:
#	spring-integration-core/src/test/java/org/springframework/integration/handler/MethodInvokingMessageProcessorTests.java

# Conflicts:
#	spring-integration-core/src/main/java/org/springframework/integration/handler/support/MessagingMethodInvokerHelper.java
#	spring-integration-core/src/test/java/org/springframework/integration/handler/MethodInvokingMessageProcessorTests.java
2019-10-16 11:18:34 -04:00
Artem Bilan
a63f197d9b Fix JavaDocs in the TransformerFactoryUtils 2019-08-16 09:21:54 -04:00
Spring Buildmaster
b79a7cc529 [artifactory-release] Next development version 2019-08-02 15:11:11 +00:00
Spring Buildmaster
903f605ca6 [artifactory-release] Release version 4.3.21.RELEASE 2019-08-02 15:11:07 +00:00
Gary Russell
44f2404275 Upgrade to Spring Framework 4.3.25, retry 1.1.5 2019-08-02 10:41:57 -04:00