Commit Graph

8946 Commits

Author SHA1 Message Date
Artem Bilan
d7d56a0444 INT-4081: Post-merge polishing and improvements
JIRA: https://jira.spring.io/browse/INT-4081

* Rename `MessageGroupPreparedStatementSetter` to `ChannelMessageStorePreparedStatementSetter`
* Add JavaDocs to the `ChannelMessageStorePreparedStatementSetter`
* Polishing `JdbcChannelMessageStore` JavaDocs; remove unused `BeanFactory`
* Polishing Docs for typos and proper text flow
2017-10-23 11:48:35 -04:00
Meherzad Lahewala
34d0859515 INT-4081: Custom PreparedStSetter for JdbcMChStore
JIRA: https://jira.spring.io/browse/INT-4081

* Add `MessageGroupPreparedStatementSetter` to let end-user to override
the message insertion logic
* Add tests and Docs
2017-10-23 11:48:34 -04:00
Artem Bilan
bf1fef39db 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:28:55 -04:00
Artem Bilan
077b5ffffc 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**
2017-10-16 17:04:22 -04:00
Artem Bilan
bc4337ffa8 GH-2071: Upgrade to S-WS-3.0 and Smack-4.2.1
Fixes: spring-projects/spring-integration#2071

* Clean up `build.gradle` for redundant excludes
* Add `javax.mail` dependency to WS module to avoid WARN about missed providers
* Refactoring for the XMPP module according changes in the latest Smack
* Polishing for the `BackToBackAdapterTests` to avoid extra wait for `null`
on the channel and some race conditions when client is closed during by the
`stop()` during publishing

Polishing `UriVariableTests` according the latest S-WS B-S

Revert excludes removal
2017-10-16 16:25:01 -04:00
Artem Bilan
1f88e2de7b 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:10:32 -04:00
Artem Bilan
bf63ef5491 GH-2253: Revert (S)FTP Source to DefaultDirScann
Fixes spring-projects/spring-integration#2253

For backward compatibility and use-cases when processed files are stored
in sub-directories in the `localDirectory` revert the
`AbstractInboundFileSynchronizingMessageSource` logic back to the
`DefaultDirectoryScanner`.
The `RecursiveDirectoryScanner` can be injected via `scanner` option
2017-10-16 16:05:44 -04:00
Artem Bilan
1fa73a9728 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
2017-10-16 15:51:12 -04:00
Artem Bilan
a5d30b9f66 Some polishing for test-support module
* Remove `TypeSafeMatcher` in favor of the same class in Hamcrest
* Resolve `serial` warning with `OnFailedToAcquireMutexEvent`
2017-10-13 20:38:31 -04:00
Glenn Renfro
1979f91cf5 INT-4357: LeaderInit: Add failed to lock event
JIRA: https://jira.spring.io/browse/INT-4357

Updated based on code review.

Updated adocs

*Polishing code style, typos
* Add protection from NPE when `LockRegistryLeaderInitiator` isn't
supplied with the `leaderEventPublisher`
* Add `What's New` note
2017-10-13 13:15:12 -04:00
Jorge
a7eebed252 Typo at FTPs example
Use DefaultFtpsSessionFactory instead of DefaultFtpsClientFactory
2017-10-12 15:14:42 -04:00
Abdul Zaheer
f202b25775 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:40:55 -04:00
Artem Bilan
00807d47e2 Upgrade to Spring Security 5.0 M5
* Rename tests in WebFlux module to have `WebFlux` prefix instead of `Http`
2017-10-10 16:50:23 -04:00
Artem Bilan
5092d482b5 INT-4355: Add support for DomPOX WS communication
JIRA: https://jira.spring.io/browse/INT-4355

**Cherry-pick to 4.3.x**
2017-10-09 15:09:52 -04:00
Björn Häuser
7e071c0839 Make configureContainer public for AdapterSpecs
configureContainer is already public in the GatewaySpec, therefore
making it also public in the AdapterSpecs.

We came across this problem when we were testing M7.
2017-10-07 22:05:47 -04:00
Artem Bilan
cfc698447e Upgrades for some dependencies 2017-10-04 16:22:33 -04:00
Glenn Renfro
e515a0d643 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**
2017-09-29 09:57:59 -04:00
Artem Bilan
e52bf8e8a4 Upgrade to SF-5.0 GA
Staying with BUILD-SNAPSHOT isn't reliable any more:
```
 > Could not resolve org.springframework:spring-context:5.0.0.BUILD-SNAPSHOT.
         > Unable to load Maven meta-data from https://repo.spring.io/libs-snapshot/org/springframework/spring-context/5.0.0.BUILD-SNAPSHOT/maven-metadata.xml.
            > Could not get resource 'https://repo.spring.io/libs-snapshot/org/springframework/spring-context/5.0.0.BUILD-SNAPSHOT/maven-metadata.xml'.
               > Could not GET 'https://repo.spring.io/libs-snapshot/org/springframework/spring-context/5.0.0.BUILD-SNAPSHOT/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
```
2017-09-28 16:55:29 -04:00
Artem Bilan
59a68b9453 Fix AmqpChannParserTests to use connFactory mock
https://build.spring.io/browse/INT-FATS5IC-279

The parser test should not attempt to make connection at all.
* Remove `StubRabbitConnectionFactory` in favor of plain
`mock(ConnectionFacory.class)` for the `AmqpChannelParserTests-context.xml`
* Mark all the channel definition with `auto-startup="false"`
2017-09-27 19:59:55 +01:00
Gary Russell
cb810fbb43 INT-4346: Add Module Name to Manifest
JIRA: https://jira.spring.io/browse/INT-4346
2017-09-26 14:25:59 -04:00
Venil Noronha
797e5045bf INT-4334: Adds a DirectoryScanner to RemoteFileMS
JIRA: https://jira.springsource.org/browse/INT-4334

* Add a `DirectoryScanner` setter named `setScanner` in
`AbstractInboundFileSynchronizingMessageSource` to set the
`FileReadingMessageSource`'s scanner.
* Add tests to `AbstractRemoteFileSynchronizerTests`.

Polish.

Updates xsd, tests and documentation.

Fix xsd formatting.

Addresses review comments.

* Some code style polishing
2017-09-25 21:08:51 -04:00
Gary Russell
2427a7d426 Upgrade to Reactor GA 2017-09-25 16:26:40 -04:00
Gary Russell
59781e6386 Use Explicit Module Exclusions 2017-09-25 11:57:12 -04:00
Gary Russell
bea5706e67 Fix HTTP For Latest Spring Framework
https://build.spring.io/browse/INT-FATS5IC-277/

Fix mock for request.getRawStatusCode()

4cbef27f90

Also excluded transitive SF dependencies from spring-security.
2017-09-25 10:35:08 -04:00
Venil Noronha
a65de25572 INT-4343: Add executor option to the RedisInChA
JIRA: https://jira.springsource.org/browse/INT-4343

* Add a `Executor` setter named `setTaskExecutor` in
`RedisInboundChannelAdapter` to set the container's task executor.

* Add a `task-executor` attribute to
`<int-redis:inbound-channel-adapter>`.

* Update RedisInboundChannelAdapterParser configuration validation
tests.

* Update redis.adoc and whats-new.adoc.

* Polishing according PR comments
* Improve `RedisQueueGatewayIntegrationTests` performance
2017-09-19 18:18:30 -04:00
Venil Noronha
b1865dab3a INT-4313: GemfireMetadataSt: Add Listener support
JIRA: https://jira.springsource.org/browse/INT-4313

* Add `GemfireCacheListener` in `GemfireMetadataStore` to delegate cache
events to `MetadataStoreListener`s.
* Add GemfireMetadataStore cache listener tests.
* Update ascii doc.
* Addresses review comments.
* Some polishing to Java 8 style
* Some code style polishing
* Minor Doc improvement
2017-09-18 20:58:58 -04:00
Meherzad Lahewala
40783ff547 INT-3936: GlobalChIntercep: add negative pattern
JIRA: https://jira.spring.io/browse/INT-3936

* Extract `smartMatch()` logic from the `IntegrationManagementConfigurer`
and `IntegrationMBeanExporter` into the `PatternMatchUtils` class
* Add negative (`!`) pattern matching configuration support to the
`GlobalChannelInterceptor` annotation and `<int:channel-interceptor>` component
* Code style, Docs and JavaDocs polishing
2017-09-18 13:55:00 -04:00
Gary Russell
671097fd50 INT-4312: MessagingMethodInvokerHelper Convert
JIRA: https://jira.spring.io/browse/INT-4312

If there is a single eligible method, the message content is JSON
and the method parameter doesn't match the payload, perform JSON
conversion if there is an ObjectMapper available.
2017-09-14 14:34:12 -04:00
Spring Buildmaster
c7c006e963 [artifactory-release] Next development version 2017-09-14 13:54:46 +00:00
Spring Buildmaster
d4d756fe04 [artifactory-release] Release version 5.0.0.M7 2017-09-14 13:54:40 +00:00
Gary Russell
2a2792e2b1 Version Updates for M7 2017-09-14 09:24:34 -04:00
Artem Bilan
c9b5335649 INT-4289: Fix JMS DSL generic arguments coercion
JIRA: https://jira.spring.io/browse/INT-4289,
https://jira.spring.io/browse/INT-4253

We can't use `JmsDefaultListenerContainerSpec` methods from the first
place because we have restricted argument in the `configureListenerContainer()`

* Change the generic argument of the `Consumer<>` to the inferred `S`.
This way the target `Jms.messageDrivenChannelAdapter()` usage will
provide correct `JmsListenerContainerSpec` implementation for auto-completion
2017-09-13 16:53:13 -04:00
Gary Russell
ffe2bf0d29 INT-4123: Remove Deprecations
JIRA: https://jira.spring.io/browse/INT-4123
2017-09-11 14:30:05 -04:00
Artem Bilan
5263ea6dff 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
2017-09-11 14:24:33 -04:00
Artem Bilan
df55ac95d8 Fix Checkstyle violations
https://build.spring.io/browse/INT-MASTER-792
2017-09-11 13:03:39 -04:00
meherzad
defb4ff18a INT-778 Add BroadCasting tests when no handlers
JIRA: https://jira.spring.io/browse/INT-778
2017-09-11 12:51:27 -04:00
Artem Bilan
6bbcfd37fa Upgrade to SA-2.0.0.RC1 2017-09-11 11:54:47 -04:00
Philipp Etschel
1f220e0e66 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**
2017-09-11 11:02:13 -04:00
Artem Bilan
9751608225 Upgrade SF-5.0.0.RC4, Reactor-3.1.0.RC1 2017-09-11 10:17:06 -04:00
Gary Russell
73d9c6b6c5 INT-4255: JSON Embedded Headers Message Mapper
JIRA: https://jira.spring.io/browse/INT-4255

- Support embedding headers for transports that don't support headers (TCP, Kafka, etc)
- Use the new message-aware Jackson ObjectMapper
- Provide a mechanism to more efficiently support byte[] payloads (avoid Base64 encoding)
- Support decoding "legacy" SCSt embedded headers

Polishing; PR Comments - Add Support to MQTT and TCP

Switch to simple patterns instead of regex

* Fix JavaDoc typo
* Upgrade to Jackson 2.9.1
2017-09-08 16:45:50 -04:00
Gary Russell
0d495294ed 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
2017-09-08 15:31:47 -04:00
Artem Bilan
5749c5b237 INT-4320: Fix AMQP channels to declare on demand
JIRA: https://jira.spring.io/browse/INT-4320

To avoid "fail fast" situation when Broker isn't available during
application init phase, move all the declarations in
the AMQP Message Channels to the `ConnectionListener.onCreate()`.
In addition call the declaration from the `Lifecycle.start()`
2017-09-08 14:46:03 -04:00
Matthias Jeschke
b9c8a8edf8 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:55:06 -04:00
Artem Bilan
46de69dbf2 Honor the FluxSink State in the PollChPublisherAd
The `PollableChannelPublisherAdapter` is based on the poll model of the
`FluxSink` and iterate and poll downstream `PollableChannel` until
there is an item or `n > 0`.
Having `take(6)` we end up with the cancel from the downstream
`Subscriber` after the batch is filled, but at the same time we continue
to poll the upstream source because `n` is like `Long.MAX_VALUE`.

* The proper way to interact is check for the `!sink.isCancelled()`
as well.
This way cancelled `sink` won't "steal" data from other subscribers

Fix compatibility with the latest dependencies

* Upgrade to Gradle 4.1
* Upgrade as much dependencies as possible
* Fix MongoDB module to resolve deprecation in the latest driver
* Increase receive timeout in the `ResequencerTests`
* Restore generic argument for the method reference in the `ReactiveStreamsTests`
* Fix `WebFluxInboundEndpoint` for the compatibility with the latest Reactor API
2017-09-06 16:46:59 -04:00
Gary Russell
cfab1fb1a4 INT-4333: Don't Override Explicit Management Props
JIRA: https://jira.spring.io/browse/INT-4333

If the user has explicitly set management properties in a bean definition,
the configurer should not override those settings with defaults.
2017-09-01 15:48:11 -04:00
Gary Russell
3a2be8e9e0 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.
2017-09-01 15:44:55 -04:00
Artem Bilan
6c18cbcf57 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**
2017-09-01 15:14:47 -04:00
Gary Russell
34652f3342 INT-4332: Fix Test Race Condition 2017-08-23 09:52:52 -04:00
Oleg Zhurakousky
318741d1fd INT-4332 updated DSL with Supplier support
- add support for Supplier as sources of messages to the DSL
- add tests and javadocs
2017-08-22 17:08:30 -04:00
Oleg Zhurakousky
946cc229eb INT-4330: Add support for Supplier MessageSource
JIRA: https://jira.spring.io/browse/INT-4330

- updated documentation
- updated test
2017-08-17 12:01:03 -04:00