Commit Graph

8664 Commits

Author SHA1 Message Date
Artem Bilan
c8705f4d31 Fix Checkstyle violations
https://build.spring.io/browse/INT-SI43X-227
2018-01-22 13:32:58 -05:00
Artem Bilan
618866f126 Fix JdbcLockRegistry tests
https://build.spring.io/browse/INT-MASTER-901

The `JdbcLockRegistryDifferentClientTests.testOnlyOneLock()` relies
on the `ArrayList.isEmpty()` state to proceed with the logic.
But since the `ArrayList.size` property is not `volatile`, there is no
guarantee for the proper state in the multi-threaded environment like
we have in this test-case.

* Replace `ArrayList` in the test with the `LinkedBlockingQueue` which
already rely on the `AtomicInteger` for the `size` property
* Fix `JdbcLockRegistry` tests to shutdown used `ExecutorService` s
to ensure set free threads after test suite execution.

**Cherry-pick to 4.3.x**

# Conflicts:
#	spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/lock/JdbcLockRegistryDifferentClientTests.java
#	spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/lock/JdbcLockRegistryTests.java
2018-01-22 13:22:17 -05:00
Gary Russell
21c4932abe INT-4382: Fix deadlock in FileWritingMH
JIRA: https://jira.spring.io/browse/INT-4382

There is a deadlock in the FMWH due to lock ordering.

Writes try to lock the handler monitor while holding the file lock.
The `Flusher` tries to lock the file lock while holding th handler monitor.

- Change the `Flusher`, `stop` and `flushIfNeeded` methods to not call close
  on the file state while holding the handler monitor.

__cherry pick to 4.3.x__ (fix <> for Java 6)

Polishing - PR Comments

* Optimize `flushIfNeeded(FlushPredicate)` to delegate only to the
`flushIfNeeded(MessageFlushPredicate, Message<?>)`

# Conflicts:
#	spring-integration-file/src/main/java/org/springframework/integration/file/FileWritingMessageHandler.java
2018-01-22 12:01:25 -05:00
Gary Russell
59909b64ab Revert "INT-4366: Fix MulticastSendingMH
This reverts commit 3cccf9b526.
2018-01-19 17:20:51 -05:00
Artem Bilan
3cccf9b526 INT-4366: Fix MulticastSendingMessageHandler
JIRA: https://jira.spring.io/browse/INT-4366

Fix race condition in the `MulticastSendingMessageHandler` around
`multicastSocket` and super `socket` properties.

* Synchronize around `this` and check for the `multicastSocket == null`.
This let the `MulticastSendingMessageHandler` to fully configure and
prepare the socket for use.
* Remove `socket.setInterface(whichNic)` since it is populated by the
`InetSocketAddress` ctor before

**Cherry-pick to 4.3.x**
2018-01-19 12:40:19 -05:00
Artem Bilan
3e99ae38f1 Fix Checkstyle violation
https://build.spring.io/browse/INT-SI43X-222
2018-01-18 15:50:31 -05:00
Gary Russell
34c938fe4f INT-4379: JMS OG Shutdown reply container on stop
JIRA: https://jira.spring.io/browse/INT-4379

- shutdown the container when the gateway is stopped

Also, improve test suite

- at the end of the tests, hundreds of threads are running, some caused by the above
  but others because `TaskExecutor`s are not shut down
- reduce the number of iterations in the JMS pipeline tests to speed things up
- change more tests to extend `ActiveMQMultiContextTests`, to keep a single broker up

__cherry-pick to 4.3.x__

# Conflicts:
#	spring-integration-jms/src/main/java/org/springframework/integration/jms/JmsOutboundGateway.java
#	spring-integration-jms/src/test/java/org/springframework/integration/jms/JmsOutboundGatewayTests.java
#	spring-integration-jms/src/test/java/org/springframework/integration/jms/OutboundGatewayConnectionTests.java
#	spring-integration-jms/src/test/java/org/springframework/integration/jms/OutboundGatewayFunctionTests.java
#	spring-integration-jms/src/test/java/org/springframework/integration/jms/PollableJmsChannelTests.java
#	spring-integration-jms/src/test/java/org/springframework/integration/jms/SubscribableJmsChannelTests.java
2018-01-18 15:22:53 -05:00
Gary Russell
d2fb79e846 INT-4378: TCP Fix CF Name in Intercepted Events
JIRA: https://jira.spring.io/browse/INT-4378

Events (e.g. `TcpConnectionOpenEvent` from intercepted connections contain an
'unknown' connection factory name.

Delegate to the underlying connection's factory name.

# Conflicts:
#	spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/InterceptedSharedConnectionTests.java
2018-01-16 13:43:09 -05:00
Artem Bilan
9c890ea02d Fix SpelPropertyAccessorRegistrar
The `SpelPropertyAccessorRegistrar` ctor and
`add(PropertyAccessor... propertyAccessors)` method use wrong variable
to build a key for the provided `PropertyAccessor`.
Therefore during iteration the next `PropertyAccessor` overrides the
previous and we end up just only with one instance in the registry

* Extract `private static obtainAccessorKey()` method to build
decapitalized key for the `PropertyAccessor`
* Change the map store to the `LinkedHashMap` to keep order of the
provided `PropertyAccessor` s
* Modify `EnableIntegrationTests` to ensure that we support several
`PropertyAccessor` s and in the proper order

**Cherry-pick to 4.3.x**
2018-01-12 11:51:58 -05:00
Gary Russell
7187da64fc Add UDP Test Diagnostics 2017-12-28 14:42:24 -05:00
krizsan
2390ad3083 INT-4373: Fix channel error count
JIRA: https://jira.spring.io/browse/INT-4373

Error count is wrong when just counts enabled.

CheckStyle fix.

Reduce send timeout in test.
2017-12-28 09:47:29 -05:00
Spring Buildmaster
dbccd0c386 [artifactory-release] Next development version 2017-11-28 18:57:49 +00:00
Spring Buildmaster
5ab0f231e2 [artifactory-release] Release version 4.3.13.RELEASE 2017-11-28 18:57:43 +00:00
Artem Bilan
8a549bafba Upgrade to SS-4.3.13 2017-11-28 13:31:10 -05:00
Artem Bilan
628d235f7f GH-2275: Fix MqttMDCA for callbacks after stop
Resolves: spring-projects/spring-integration#2275

* Remove the `MqttPahoMessageDrivenChannelAdapter` as a callback from
the `IMqttClient` during `stop()`
* Check the `isRunning()` from the `connectionLost` callback to avoid
unexpected `scheduleReconnect()` when we are not running

**Cherry-pick to 4.3.x**

Conflicts:
	spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/MqttAdapterTests.java
Resolved.
2017-11-10 10:58:20 -05:00
Artem Bilan
26819f5a95 INT-4360: Add ClientStompEncoder support
The `StompSubProtocolHandler` explicitly sets `stompCommand` header
to the `MESSAGE` value ignoring any client inputs.
In this case the message is treated as from the server and ignored on
the STOMP Broker side from the client session.

* Introduce `ClientStompEncoder` for the client side to be injected
into the `StompSubProtocolHandler` for the proper client side messages
encoding/decoding.
Override `stompCommand` header to the `SEND` value if it is `MESSAGE`
before encoding to the `byte[]` to send to the session

JIRA: https://jira.spring.io/browse/INT-4360

**Cherry-pick to 4.3.x**

Fix WebSocket test to rely on the proper client config class
and don't pick up the server config unconditionally in the test context

Conflicts:
	spring-integration-websocket/src/test/java/org/springframework/integration/websocket/client/StompIntegrationTests.java
Resolved.
2017-10-31 09:34:58 -04:00
Artem Bilan
c9ca87b87e Fix AbstractStompSessionManager race condition
https://build.spring.io/browse/INT-MJATS41-1150

When we add `addHandler()` to the `CompositeStompSessionHandler`,
there is no guarantee that we will have `session` atomically during
this method invocation or after it relying on the later call to the
`this.delegates`.
In other words the session may be populated in between and, therefore,
our `delegate` loses `afterConnected()` event.
We need to synchronize on the barrier and block the concurrent
`afterConnected()` or wait for it.
This way we atomically ensure that our `delegate` is added to the
existing `session` or will be performed afterwards in the `afterConnected()`

**Cherry-pick to 4.3.x**

(cherry picked from commit df10941)
2017-10-23 13:45:43 -04:00
Artem Bilan
618da48512 INT-4345: ServerWebSocketContainer: Fix Lifecycle
JIRA: https://jira.spring.io/browse/INT-4345

Resolves https://github.com/spring-projects/spring-integration/issues/2238

The `DefaultHandshakeHandler` doesn't implement `SmartLifecycle`
(just `Lifecycle`) there it doesn't delegate its `start()` to the
`RequestUpgradeStrategy`, e.g. `JettyRequestUpgradeStrategy`.
On the other hand `DefaultHandshakeHandler` can be started as a dependant
`Lifecycle` from some other `SmartLifecycle`, like it happens with the
`WebSocketHandlerMapping`

* Implement `SmartLifecycle` for the `ServerWebSocketContainer` and
delegate its lifecycle to the provided `HandshakeHandler`
* Fix `WebSocketInboundChannelAdapter` to properly implement `doStop()`
with the propagation to the provided `webSocketContainer`
* Fix deprecation warning in the `StompMessageHandlerWebSocketIntegrationTests`

**Cherry-pick to 4.3.x**
2017-10-16 17:29:36 -04:00
Artem Bilan
7d24b8ec67 INT-4344: AbstRemoteFileOutGw: Add assert for NPE
JIRA: https://jira.spring.io/browse/INT-4344

The `FtpOutboundGateway` provides ctors without expression for remote path.
In this case it is treated as a `working directory` but only for the
`LS`, `NLST`, `PUT` and `MPUT` commands.

* Add assertion in the `AbstractRemoteFileOutboundGateway` to discard
configuration for all other commands when `expression` is `null`

**Cherry-pick to 4.3.x**

Conflicts:
	spring-integration-file/src/main/java/org/springframework/integration/file/remote/gateway/AbstractRemoteFileOutboundGateway.java
Resolved.
2017-10-16 17:24:38 -04:00
Artem Bilan
6ec34c114c INT-4354: Add beanClassLoader support to RedisMS
JIRA: https://jira.spring.io/browse/INT-4354

It's hard to test different ClassLoader in unit tests, so the fix
comes without them

**Cherry-pick to 4.3.x**
2017-10-16 16:11:12 -04:00
Artem Bilan
442d6c6a90 INT-4356: FileTransferMH: Add string SpEL setters
JIRA: https://jira.spring.io/browse/INT-4356

**Cherry-pick to 4.3.x**

Address PR comments:
* Remove unused variable in the test case
* Add string-based SpEL setters to the `AbstractInboundFileSynchronizer`
* Fix `@since` in the `FileTransferringMessageHandler` to the proper version

Conflicts:
	spring-integration-file/src/main/java/org/springframework/integration/file/remote/handler/FileTransferringMessageHandler.java
	spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/AbstractInboundFileSynchronizer.java
Resolved.
2017-10-16 15:54:13 -04:00
Abdul Zaheer
adf02ca179 GH-2261: Fix ScatterGatherHandler.stop()
Fixes: spring-projects/spring-integration#2261

* Fix `ScatterGatherHandler.stop()` to call `GatherEndpoint.stop()` instead of `start()`

Adding unit test as per artembilan's suggestion

Replacing asterisk import with specific namespaces

Fixing formatting/codestyle errors shown by travis

Creating separate bean for new unit test

* Some simple polishing
* Merge the assertions for the fix into an existing test

**Cherry-pick to 4.3.x**
2017-10-12 11:42:53 -04:00
Artem Bilan
47b52cc14b Upgrade to SF-4.3.12 2017-10-10 15:58:03 -04:00
Artem Bilan
6193263ab0 INT-4355: Add support for DomPOX WS communication
JIRA: https://jira.spring.io/browse/INT-4355

**Cherry-pick to 4.3.x**

Conflicts:
	spring-integration-ws/src/test/java/org/springframework/integration/ws/SimpleWebServiceOutboundGatewayTests.java
Resolved.
2017-10-09 15:13:06 -04:00
Glenn Renfro
b82973660b INT-4353: Let to set id for DefaultLockRepository
JIRA: https://jira.spring.io/browse/INT-4353

Updated based on code review

* Polishing according PR comments

**Cherry-pick to 4.3.x**

# Conflicts:
#	src/reference/asciidoc/jdbc.adoc
2017-09-29 10:00:16 -04:00
Spring Buildmaster
bf51585908 [artifactory-release] Next development version 2017-09-11 19:33:04 +00:00
Spring Buildmaster
bcef47ad35 [artifactory-release] Release version 4.3.12.RELEASE 2017-09-11 19:32:58 +00:00
Artem Bilan
e097198d5e INT-4123: Add Prefix to the Key-Value MSs
Fixes spring-projects/spring-integration#2213
JIRA: https://jira.spring.io/browse/INT-4123

Fully different `MessageStore`s can be configured for the same shared
Key-Value data-base.
Since the retrieval logic is based on the keys, that may cause the
unexpected messages expiration via `MessageGroupStoreReaper`.

* To distinguish store instances on the shared store add `prefix`
option to the `AbstractKeyValueMessageStore`

* Deprecate the `GemfireMessageStore` `Cache`-based configuration - `setIgnoreJta()` and `afterPropertiesSet()`.
The `GemfireMessageStore` relies only on an externally configured `Region`.

**Cherry-pick to 4.3.x**

Doc Polishing

# Conflicts:
#	spring-integration-core/src/main/java/org/springframework/integration/store/AbstractKeyValueMessageStore.java
#	spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/store/GemfireMessageStore.java
#	spring-integration-redis/src/main/java/org/springframework/integration/redis/store/RedisMessageStore.java

* Fix tests `GemfireMessageStore` tests conflicts
2017-09-11 15:05:04 -04:00
Philipp Etschel
138e406ba0 INT-4340: Disable XMPP Roster properly
JIRA: https://jira.spring.io/browse/INT-4340

* Roster is now disabled on login as well
* Fixed tagging and formatting issues
* Checkstyle and documented the changed behaviour as well

Polishing: rely on the `AbstractFactoryBean.getObject()`

**Cherry-pick to 4.3.x**

* Upgrade to SF-4.3.11 and Jackson-2.8.10
2017-09-11 11:07:09 -04:00
Gary Russell
694d190bd2 INT-4342: White List for Payload Deserializer
JIRA: https://jira.spring.io/browse/INT-4342

Use similar code to Spring AMQP to add white list support for Integration's
use of the `DeserializingMessageConverter`; introduce the `WhiteListDeserializingMessageConverter`.

Polishing

Missed this change in PR.

Fix XSD attribute

# Conflicts:
#	spring-integration-core/src/main/java/org/springframework/integration/dsl/Transformers.java
#	spring-integration-core/src/test/java/org/springframework/integration/config/xml/PayloadDeserializingTransformerParserTests.java
#	spring-integration-core/src/test/java/org/springframework/integration/dsl/flows/IntegrationFlowTests.java
#	spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/store/JdbcChannelMessageStore.java
#	spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/store/channel/MessageRowMapper.java
#	spring-integration-mongodb/src/main/java/org/springframework/integration/mongodb/store/MongoDbMessageStore.java
#	spring-integration-mongodb/src/main/java/org/springframework/integration/mongodb/support/BinaryToMessageConverter.java
#	spring-integration-mongodb/src/main/java/org/springframework/integration/mongodb/support/MongoDbMessageBytesConverter.java
2017-09-08 16:15:00 -04:00
Artem Bilan
08bc97180c Upgrade to Spring AMQP-1.6.11 2017-09-08 10:24:42 -04:00
Matthias Jeschke
239a462c09 INT-4341: RedisQueueIn: support receiveTimeout=0
JIRA: https://jira.spring.io/browse/INT-4341
Fixes spring-projects/spring-integration#2228

Add to the `RedisQueueInboundGateway` and `RedisQueueMessageDrivenEndpoint`support
for the `receiveTimeout` of 0 and block indefinitely

Added some simple tests to check if the receive timeout can be set to 0

**Cherry-pick to 4.3.x**
2017-09-06 17:56:30 -04:00
Gary Russell
488ec15907 INT-4336: Fix NPE in IntegrationGraphServer
JIRA: https://jira.spring.io/browse/INT-4336

Don't add "hidden" unreachable methods to the map in the `GatewayProxyFactoryBean`.
The methods can never be executed and may not have all expected properties; they
should not appear in the graph at all since they are unreachable.

Also add defensive coding to the `IntegrationGraphServer` to avoid NPEs when unexpected
conditions arise.

# Conflicts:
#	spring-integration-core/src/test/java/org/springframework/integration/dsl/reactivestreams/ReactiveStreamsTests.java
#	spring-integration-core/src/test/java/org/springframework/integration/gateway/GatewayProxyFactoryBeanTests.java
2017-09-01 15:51:15 -04:00
Artem Bilan
d8ecdce83d INT-4326: Add endpoints.noAutoStartup property
JIRA: https://jira.spring.io/browse/INT-4326

To let to disable autoStartup for particular endpoint bean globally,
in one place, add `spring.integration.endpoints.noAutoStartup`
to the `spring.integration.properties`

So, now all the `AbstractEndpoint` checks that property for matching its
bean name to configure `autoStartup` property to `false`

**Cherry-pick to 4.3.x**

Conflicts:
	spring-integration-core/src/main/resources/META-INF/spring.integration.default.properties
	spring-integration-core/src/test/resources/META-INF/spring.integration.properties
	src/reference/asciidoc/configuration.adoc
Resolved.
2017-09-01 15:26:08 -04:00
Artem Bilan
c877b041d4 GH-2217: JSON: Populated actual ID & TIMESTAMP
Fixes spring-projects/spring-integration#2217

The `MutableMessageHeaders` delegates provided headers to the super
which just generates fresh `ID` & `TIMESTAMP` headers ignoring provided.

* Add explicit `ID` & `TIMESTAMP` headers population in the
`MessageJacksonDeserializer` after creation `MutableMessageHeaders`.
We can't apply the fix for the `MutableMessageHeaders` like it is in
the `master` because it would be a breaking change
2017-08-17 16:56:25 -04:00
Artem Bilan
a4992da074 Fix Checkstyle violations
https://build.spring.io/browse/INT-SI43X-192/
2017-08-15 13:09:31 -04:00
Gary Russell
9f79bc9927 INT-4328: AMQP: Returns/Nacks: Create ErrorMessage
JIRA: https://jira.spring.io/browse/INT-4328

Add support for sending `ErrorMessage`s to the return and nack channels.

**cherry-pick to 4.3.x, but change default EMS to null (will require minor adjustment to test - set the EMS in `adapterWithReturnsAndErrorMessageStrategy`)**

# Conflicts:
#	spring-integration-amqp/src/main/java/org/springframework/integration/amqp/outbound/AbstractAmqpOutboundEndpoint.java
#	spring-integration-amqp/src/main/java/org/springframework/integration/amqp/support/AmqpMessageHeaderErrorMessageStrategy.java
#	spring-integration-amqp/src/test/java/org/springframework/integration/amqp/outbound/AmqpOutboundEndpointTests.java
#	spring-integration-amqp/src/test/java/org/springframework/integration/amqp/outbound/AsyncAmqpGatewayTests.java
#	spring-integration-core/src/main/java/org/springframework/integration/support/DefaultErrorMessageStrategy.java
2017-08-15 12:44:28 -04:00
Oleg Zhurakousky
3448875758 Polishing ErrorMessageSendingRecoverer
- delegated creation of 'DefaultErrorMessageStrategy' to the
another constructor in cases where user provided null
- see https://github.com/spring-cloud/spring-cloud-stream/pull/1038#discussion_r132707905
for more details and justification

* Simple code style polishing

**Cherry-pick to 4.3.x**

(cherry picked from commit d41d707)
2017-08-14 11:21:19 -04:00
Artem Bilan
a459bb5546 INT-4327: Optimize Bean Post Processors
JIRA: https://jira.spring.io/browse/INT-4327

To avoid reflection and annotation processing overhead on the bean classes
when we deal with non-singleton beans and there is really no any
messaging on the bean class, store bean classes to the local cache to skip
them in the future when `BPP` is applied for request/prototype beans

* Simple code style polishing

**Cherry-pick to 4.3.x**

(cherry picked from commit 9f4f07bcfd)

Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/config/annotation/MessagingAnnotationPostProcessor.java
2017-08-14 10:54:11 -04:00
Artem Bilan
daa927e7a4 INT-4324: File Outbound: parse preserve-timestamp
JIRA: https://jira.spring.io/browse/INT-4324

The `preserve-timestamp` attribute for the
`<int-file:outbound-channel-adapter>` has been missed for parsing in
the `FileWritingMessageHandlerBeanDefinitionBuilder` and propagation
in the `FileWritingMessageHandlerFactoryBean`

**Cherry-pick to 4.3.x**

Conflicts:
	spring-integration-file/src/main/java/org/springframework/integration/file/config/FileWritingMessageHandlerBeanDefinitionBuilder.java
	spring-integration-file/src/main/java/org/springframework/integration/file/config/FileWritingMessageHandlerFactoryBean.java
	spring-integration-file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserTests-context.xml
	spring-integration-file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserTests.java
Resolved.
2017-08-08 12:04:21 -04:00
Artem Bilan
45a5cf48a9 Redis DelayerHRescheduleIntTests: unique groupId
https://build.spring.io/browse/INT-AT42SIO-595/

To avoid clashes with other parallel builds on CI for different versions
on the same shared Redis make a testing `groupId` as unique using
`UUID.randomUUID()`

**Cherry-pick to 4.3.x & 4.2.x**
2017-08-07 12:22:58 -04:00
Artem Bilan
90bb6f0c96 INT-4325: Fix JpaExecutor bean registration
JIRA: https://jira.spring.io/browse/INT-4325

When channel adapter is defined without `id` attribute, the
`JpaInboundChannelAdapterParser` generates the name for class which
bean is never registered, therefore all the `JpaExecutor`s are registered
with the same bean name and afterward all the `JpaPollingChannelAdapter`
without `id` share the same `JpaExecutor`

* Generate bean name based on the `SourcePollingChannelAdapterFactoryBean`
which is used eventually for real bean registration
* Add test config for several channel adapters without `id`
* Optimize the `JpaInboundChannelAdapterParserTests` to start
the context only once during test class initialization

**Cherry-pick to 4.3.x**
2017-08-04 20:31:09 -04:00
Artem Bilan
7bd539b9b0 Reset AbstractMessageChannel.fullChannelName
Fixes spring-cloud/spring-cloud-stream#983

When the `AbstractMessageChannel.getFullChannelName()` is called
before the full bean initialization, we don't have the proper name any
more lately - that is only `unknown.channel.name`

* Reset `fullChannelName` property to `null` in the end of `onInit()`,
so the next `getFullChannelName()` will build the proper component name

**Cherry-pick to 4.3.x**

(cherry picked from commit 5a25993)
2017-08-04 13:20:37 -04:00
Artem Bilan
a3017736a2 Upgrade Derby dependency and some tests polishing
**Cherry-pick to master**
2017-07-26 15:35:52 -04:00
Spring Buildmaster
2521b7ff29 [artifactory-release] Next development version 2017-07-20 18:07:40 +00:00
Spring Buildmaster
5e120ad66b [artifactory-release] Release version 4.3.11.RELEASE 2017-07-20 18:07:34 +00:00
Artem Bilan
a81fb6fbbd Fix JdbcLockRLeaderInitiatorTests race condition
JIRA: https://jira.spring.io/browse/INT-4247

* Fix `JdbcLockRegistryLeaderInitiatorTests` race condition to assert
the `initiator1` is elected eventually after yielding when the
`initiator2` is stopped
2017-07-20 10:51:17 -04:00
Artem Bilan
31b0f54f4b Various polishing and optimizations
* Check for `null` package in the `JacksonJsonUtils`.
Also don't call `this.delegate.typeFromId()` the second time
* Increase wait timeout in the `QueueChannelTests`
* Check `ZookeeperMetadataStore.addListener()` for `null`

**Cherry-pick to 4.3.x**
2017-07-14 16:33:07 -04:00
Kai Zimmermann
f50a2947ac INT-4311: JdbcLocks: QueryTimeoutException retry
JIRA: https://jira.spring.io/browse/INT-4311

* Added `QueryTimeoutException` to retry handling in the `JdbcLockRegistry`

Polishing

**Cherry-pick to 4.3.x**
2017-07-11 11:07:52 -04:00
Artem Bilan
aff326875b INT-4305: (S)FTP: Remove Local File Before Rename
JIRA: https://jira.spring.io/browse/INT-4305

The `File.renameTo()` operation may fail, therefore the content of the
local file isn't changed, but since we change `setLastModified()` anyway,
this file might be eligible for local polling.
So, we end up with the same content from local file in a new message,
meanwhile we expect a new content from the remote file

* Check the `File.renameTo()` result and attempt to `delete()`
for existing local file
* When file isn't renames remove the remote file from the `filter` to let
it be transferred one more time on the next poll.
The local file might be opened for processing, so this way we postpone a fresh
remote file for the future poll rounds
* Modify `copyFileToLocalDirectory()` to return `boolean` to reflect the fact of copy.
This way we check the real number of transferred files

**Cherry-pick to 4.3.x**

Do not transfer remote file if we can't remove local one

Polishing Log Messages

Conflicts:
	spring-integration-file/src/main/java/org/springframework/integration/file/remote/synchronizer/AbstractInboundFileSynchronizer.java
	spring-integration-file/src/test/java/org/springframework/integration/file/remote/synchronizer/AbstractRemoteFileSynchronizerTests.java
	spring-integration-ftp/src/test/java/org/springframework/integration/ftp/dsl/FtpTests.java
2017-06-27 17:24:30 -04:00