Commit Graph

8049 Commits

Author SHA1 Message Date
Artem Bilan
da65c1620b AggrIntegrationTests: increase receive timeout
https://build.spring.io/browse/INT-B41-JOB1-415
2015-09-09 14:57:13 -04:00
Artem Bilan
d8fc94602c INT-3820: Fix MethodInvokerHelper for the Proxy
JIRA: https://jira.spring.io/browse/INT-3820

Some Proxy may be based on the specif non-user classes and advised with
the provided end-user interfaces.
The best sample is `@Repository` from Spring Data projects.
In this case the `MessagingMethodInvokerHelper` just missed the user interfaces
to consider for the candidate methods or thrown an `Exception` like `NoSuchMethodError`.

* Add `((Advised) targetObject).getProxiedInterfaces()` for the scanning algorithm
* Move the `UniqueMethodFilter` to the internal `Set<Method>` to allow iteration
and filtering for methods from the `targetClass` as well as from all those user interfaces
* Add Spring JPA repository test-case
* Polishing form some time-weak tests

Revert MessagingMethodInvokerHelper

INT-3820: Simple Proxy Interface Method Matching

No-risk solution for INT-3820.

Instead of considering all interfaces on the proxy, only look at proxy interfaces
for a single matching method name if we find no candidate or fallback methods.

Consider the complete solution for 4.3.

Add `Message<?>` method distinguishing
2015-09-09 14:33:38 -04:00
Gary Russell
ca62f18a7b INT-3815: Update to Spring AMQP 1.5.0.RELEASE
JIRA: https://jira.spring.io/browse/INT-3814
2015-09-09 14:25:51 -04:00
Artem Bilan
cb318f59ee INT-3821: Description for MessagingException ctor
JIRA: https://jira.spring.io/browse/INT-3821

The `MessagingException` provides an empty String for its `NestedRuntimeException`
for those ctors which are without `description` argument.

The `NestedRuntimeException` uses `NestedExceptionUtils.buildMessage` for `getMessage()` implementation
and the algorithm there is based on the `message != null` condition to build the first part of the nested
cascade. In the case of empty String we end up with useless ";" part in the StackTrace logs.

Fix Framework classes to use the `MessagingException` ctor with particular description.
2015-09-08 22:55:52 -04:00
Artem Bilan
f607f83bf2 INT-3804: WatchServiceDirScan: Add OVERFLOW Event
JIRA: https://jira.spring.io/browse/INT-3804

INT-3804: Polishing

Fix race conditions.
2015-09-04 17:07:46 -04:00
Gary Russell
4f648a7e4f INT-3818: Multipart Pass Through Converter
JIRA: https://jira.spring.io/browse/INT-3818

INT-3818: Fix Pre JDK8 Syntax

Polishing - PR Comments

Add author name
2015-09-03 21:00:56 -04:00
Artem Bilan
f26bfd5b33 Upgrade to SF-4.2.1.RELEASE
Increase `refreshTimeout` for `GroovyScriptExecutingMessageProcessorTests`
to avoid timing issue for the first `Thread.sleep(20)`
2015-09-01 21:07:44 -04:00
Artem Bilan
c86141cff7 INT-3813: HTTP module improvements
JIRA: https://jira.spring.io/browse/INT-3813
2015-09-01 12:50:44 -04:00
Artem Bilan
f3a8f04f68 Upgrade to SF-4.2.1.BUILD-SNAPSHOT 2015-08-31 15:19:27 -04:00
Gary Russell
3069dd746f Revert Address.equals() Test
Address.equals() fails with the Spring IO compatibility build.
2015-08-31 14:24:45 -04:00
Artem Bilan
02565d0401 INT-3807: AmqpInboundGateway Improvements
JIRA: https://jira.spring.io/browse/INT-3807

Addressing PR comments

INT-3807: Polishing
2015-08-31 12:42:25 -04:00
Artem Bilan
7464168845 INT-3812: Various Documentation Fixes
JIRAs:
https://jira.spring.io/browse/INT-3812
https://jira.spring.io/browse/INT-3732
https://jira.spring.io/browse/INT-3769
https://jira.spring.io/browse/INT-3671
https://jira.spring.io/browse/INT-3733
https://jira.spring.io/browse/INT-3808

* Upgrade to S-WS-2.2.2 and mention `EndpointMapping` in the documentation (INT-3769)
* `What's New` polishing (INT-3733)
* Document the bean names for endpoints on the `@Bean` definition (INT-3671)
* Fix deprecated attribute in the HTTP chapter (INT-3812)
* Document Advanced `Aggregator` Configuration (INT-3732)
* Add `Federation` note to the AMQP chapter (INT-3808)

INT-3812: Polishing
2015-08-31 11:34:46 -04:00
Artem Bilan
97edc23400 INT-3805: Fix double beanFactory.initializeBean()
JIRA: https://jira.spring.io/browse/INT-3805
2015-08-18 18:50:52 -04:00
Spring Buildmaster
3ffcb73fb3 [artifactory-release] Next development version 2015-08-14 13:14:54 -07:00
Spring Buildmaster
350ea998cc [artifactory-release] Release version 4.2.0.RC1 2015-08-14 13:14:46 -07:00
Artem Bilan
9d65512fdb INT-3803: Suppress deprecation for Reactor-2.0.5
JIRA: https://jira.spring.io/browse/INT-3803

Revert changes made by the last commit for the `INT-3802`
 and mark Deprecated `Suppliers` usage with the `@SuppressWarnings("deprecation")`
2015-08-14 15:15:23 -04:00
Spring Buildmaster
59f82ce924 [artifactory-release] Next development version 2015-08-14 11:01:23 -07:00
Spring Buildmaster
4ee2b2d2f1 [artifactory-release] Release version 4.2.0.RC1 2015-08-14 11:01:17 -07:00
Gary Russell
043e8514f6 INT-3802: Spring AMQP 1.5.0.RC1, Reactor 2.0.5
JIRA: https://jira.spring.io/browse/INT-3802

For publisher confirms and returns, the `RabbitTemplate` now checks for a
`CachingConnectionFactory` which can't be mocked/stubbed.

Convert the mock tests for these features to real broker tests.

Also see AMQP-524.

Also, the lifecycle attributes were missing from the AMQP outbound endpoints.

Fix a couple typos in the AMQP xsd.
Fix deprecation since Reactor-2.0.5
2015-08-14 13:34:13 -04:00
Gary Russell
1043ffabcb TCP: Fix Event Tests Race Condition - take 2 2015-08-14 13:20:28 -04:00
Gary Russell
d5dcb419c3 TCP: Fix Event Tests Race Condition 2015-08-14 13:05:50 -04:00
Artem Bilan
a5e5a7b125 INT-3797: Fix SFTP doc for CachingSessionFactory
JIRA: https://jira.spring.io/browse/INT-3797
2015-08-14 11:16:37 -04:00
Gary Russell
3133782cc5 INT-3801: TCP Server Fix NPE with Early Stop
JIRA: https://jira.spring.io/browse/INT-3801

NPE if the server is stopped before it fully started.

Also fix SOLinger tests.

Fix `ConnectionFactoryTests` for Java < 8 compatibility
2015-08-13 20:08:12 -04:00
Gary Russell
bcfc4d88c1 INT-3800: Expose Actual Port Chosen When Random
JIRA: https://jira.spring.io/browse/INT-3800

If the server port is 0, return the actual port after the factory is started.

Also add more TCP Test Diagnostics.
2015-08-13 11:28:37 -04:00
Gary Russell
4ab25121af INT-3799: Fix Tangles
Part 1 - eliminate references from support to other packages

Part 2 - handler to aggregator/router
- move BarrierMH to aggregator
- Fix ScatterGather references

Part 3 - move TrackableComponent
- to support.management

Part 4 - class tangles
- TcpConnectionServerExceptionEvent
- RecipientListRouterManagement

INT-3799: Polishing
2015-08-13 10:32:55 -04:00
Artem Bilan
9ff5ab789a INT-3772: Add MessagePreparedStatementCallback
JIRA: https://jira.spring.io/browse/INT-3772

INT-3722: Polishing

PR Comments and conflicts fixes
2015-08-12 17:06:07 -04:00
Artem Bilan
057c004e6c INT-3619: Prevent scanner Options Overrides
JIRA: https://jira.spring.io/browse/INT-3619

Previously the `FileReadingMessageSource` allowed overriding `filter` and `locker` properties
on the `scanner` through its own setters.
It caused confusing and unexpected behavior.

Provide refactoring to check that provided `filter` and `locker` are applied for an internal `scanner`
instance, not for the injected one.

PR Comments
2015-08-12 16:59:35 -04:00
Gary Russell
adb0f43aa8 INT-3779: CodecMessageConverter and Docs
JIRA: https://jira.spring.io/browse/INT-3779

Fix timeouts for the `EnableIntegrationTests`: https://build.spring.io/browse/INT-B41-385
2015-08-11 18:21:35 -04:00
Gary Russell
455a146a1f INT-3798: Customizable File in Props MetadataStore
JIRA: https://jira.spring.io/browse/INT-3798

Add `fileName` property.
2015-08-11 17:51:59 -04:00
Gary Russell
e2a10a8d79 TCP: Add Diagnostics 2015-08-11 15:56:23 -04:00
Gary Russell
31b8b37ab4 INT-3741: Add Explicit spring-core Dependency
JIRA: https://jira.spring.io/browse/INT-3741

spring-retry pulls in an old version.
2015-08-11 12:45:44 -04:00
Gary Russell
a70bc06a18 Fix FailoverClientConnectionFactoryTests
Race condition in `ServerSocket`; the `accept` thread is exiting due to the
close, but it still accepted a new message.

All tests need to wait until the server has stopped listening (as well as
waiting for the close to be propagated to the client).
2015-08-11 10:49:26 -04:00
Artem Bilan
e408331e67 INT-3622: (S)FTP: Add MessageSessionCallback
JIRA: https://jira.spring.io/browse/INT-3622

INT-3622: Polishing
2015-08-11 09:33:34 -04:00
Artem Bilan
d89dabe72f INT-3778: STOMP Namespace and Documentation
JIRA: https://jira.spring.io/browse/INT-3778

* Add Namespace support for STOMP adapters
* Document the STOMP module
* Fix race condition in the `AbstractStompSessionManager`
* Add `handleTransportError` to the `StompInboundChannelAdapter` and `StompMessageHandler` to log errors during STOMP interactions
* Fix `StompMessageHandler` to handle `RECEIPT` in case of `RECEIPT` header existence, not the common `autoReceipt` option
which can be disable, but the `RECEIPT` header may be present in the message to send
* Increase logging level for the STOMP tests to trace sporadic failures on the CI Server
* Fix several typos

INT-3778: Doc Polishing
2015-08-11 09:17:05 -04:00
Gary Russell
e82bfdc9a6 INT-3796: More SFTP Refinements
JIRA: https://jira.spring.io/browse/INT-3796

When a `UserInfo` is provided, use it for the password and passphrase.
Disallow local properies when a `UserInfo` is provided.

Simple polishing and fixing `TestSftpServer` for the `this.server.stop(true);`
to avoid `port is already in use` for other tests which use default SSH port.
2015-08-10 16:12:45 -04:00
Artem Bilan
56bfe6b0ac INT-3790: Fix Parser for ROLE attribute usage
JIRA: https://jira.spring.io/browse/INT-3790
2015-08-10 11:49:36 -04:00
Gary Russell
f73898ba8b INT-3736: Doc Polishing 2015-08-09 09:36:22 -04:00
Gary Russell
c695129bd5 INT-3736: Process Barrier Component
JIRA: https://jira.spring.io/browse/INT-3736

INT-3736: Polishing

INT-3736: Use o-c-a For Release

Avoids unusual parser logic, allows release channel to be of any type.

INT-3736: Schema Polishing

INT-3736: Polishing

- Add TriggerMessageHandler interface
- Use SyncQueue - suspend the trigger thread if the main thread hasn't arrived yet
 - allows clean up of state regardless of whether just a trigger or suspend is processed
- reply-required

INT-3736: Polishing and Docs

Polishing code style and fixing typos in docs
2015-08-07 21:03:44 -04:00
Artem Bilan
4266bb53b4 INT-3649: Support for Payload Application Events
JIRA: https://jira.spring.io/browse/INT-3649

Polishing according to the PR comments

Address PR comments
2015-08-07 17:41:32 -04:00
Gary Russell
95a9e0d2dd INT-3796: Configure SFTP Unknown Host Behavior
JIRA: https://jira.spring.io/browse/INT-3796

Previously, the `DefaultSftpSessionFactory` unconditionally accepted keys
from unknown hosts, or when a host key changed.

Permit this behavior to be configured with `allowUnknownHosts` and/or a custom
`UserInfo` properties in the factory.

`allowUknownHosts` is false by default (since 4.2) and true by default in 4.1.x for
backwards compatibility.

INT-3796: Fix Tests

INT-3796: Polishing
2015-08-07 15:50:09 -04:00
Gary Russell
9140e4ac18 INT-3791: Don't Wrap Confirms if Already Message
JIRA: https://jira.spring.io/browse/INT-3791

Do not wrap a publisher confirm if the correlation data is a Messge<?>.
2015-08-07 15:42:48 -04:00
Gary Russell
0ce5f12342 INT-3795: TCP: Combo Failover and Cached CFs
JIRA: https://jira.spring.io/browse/INT-3795

Previously, a `CachingClientConnectionFactory` could wrap `FailoverClientConnectionFactory` instances.

It was not possible to wrap `CachingClientConnectionFactory` instances in a `FailoverClientConnectionFactory`.

The failover logic only failed over when an `IOException` occurred, whereas the CCCF wrapped the IOException
in a `MessagingException`.

- Catch all exceptions in the failover logic
- Add real TCP test cases for both scenarios
 - test failover when a connection is closed
 - test failover when the first factory cannot connect at all

INT-3795: Polishing - Fix Test Race

Revert `.travis.yml` changes
2015-08-05 20:33:05 -04:00
Artem Bilan
2376a558a4 Mark MessageGroupQueueTests as LONG_RUNNING_TEST
https://build.spring.io/browse/INT-B41-JOB1-370
2015-08-05 16:16:17 -04:00
Artem Bilan
0f689558ab INT-3792: Fix Some SONAR Vulnerabilities
JIRA: https://jira.spring.io/browse/INT-3792

* Remove `Serializable` requirement for `ThreadStatePropagationChannelInterceptor` generic type
* Increase `PriorityChannelTests` timeout
2015-08-05 14:20:08 -04:00
Gary Russell
7f504efa1b INT-3794: SocketUtils - Bind to Loopback Adapter
JIRA: https://jira.spring.io/browse/INT-3794

On OSX, if a server socket is in use on the loopback adapter, but not on others,
a BindException is not thrown; instead the socket is bound to other adapters.

This causes test failures because tests, generally, expect the socket to be bound to localhost.

Change SocketUtils to attempt to bind to localhost.

Polishing
2015-08-05 12:52:19 -04:00
Gary Russell
57e2fcfbca INT-3793: Fix Namespace Inconsistency
JIRA: https://jira.spring.io/browse/INT-3793

Also fix several typos in the TCP/IP chapter
2015-08-05 11:21:58 -04:00
Gary Russell
8273edd0ea INT-3779: Codec Support Part I - Transformers
JIRA: https://jira.spring.io/browse/INT-3779

MessageConverters and Docs to follow.
2015-08-04 12:42:20 -04:00
Artem Bilan
09fb4f78c9 INT-2166: Add SecurityContext Propagation
JIRA: https://jira.spring.io/browse/INT-2166

* Introduce `ThreadStatePropagationChannelInterceptor` based on the `ExecutorChannelInterceptor`
* Add `SecurityContextPropagationChannelInterceptor`,`SecurityContextCleanupChannelInterceptor`
* Introduce `AbstractExecutorChannel` to utilize `ExecutorChannelInterceptor` logic
* Introduce `MessageHandlingTaskDecorator` to avoid package tangle from `dispatcher` and `channel`
* Introduce `SecurityContextCleanupAdvice` for those cases when we don't get deal with `MessageChannel`s already, but want to have proper way to cleanup `SecurityContext`
* Make `GlobalChannelInterceptorProcessor` as `SmartInitializingSingleton` to avoid `phase` conflicts.
* Fix `MessagingAnnotationPostProcessor` to use `beanFactory.initializeBean(endpoint, endpointBeanName);` instead of manual `start()` invocation bypassing the `phase` logic, hence having a bug, when endpoints have been started very early
* Optimise `AbstractPollableChannel` to use `size` field from `ChannelInterceptorList` instead of `size()` from `Collection<?>`
* Fix `AnnotatedEndpointActivationTests` extracting separate component for annotation configuration instead of using test class directly. This caused very late Messaging Annotations process on that class
* Fix typo in the `spring-integration-jdbc-4.2.xsd`
* Remove some `SOUT`s throughout the project

TODO Docs

PR Comments:

* Remove redundant `AbstractExecutorChannel#executorInterceptors` and make logic based on the `super.interceptors`
 * Fix wrong imports order
 * JavaDocs for `ThreadStatePropagationChannelInterceptor`
 * Docs for `SecurityContext` propagation

INT-3593: Fix FTP PartialSuccess Tests

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

Sort the files for the MPUT tests.

INT-2166: Add SecurityContext Propagation

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

* Introduce `ThreadStatePropagationChannelInterceptor` based on the `ExecutorChannelInterceptor`
* Add `SecurityContextPropagationChannelInterceptor`,`SecurityContextCleanupChannelInterceptor`
* Introduce `AbstractExecutorChannel` to utilize `ExecutorChannelInterceptor` logic
* Introduce `MessageHandlingTaskDecorator` to avoid package tangle from `dispatcher` and `channel`
* Introduce `SecurityContextCleanupAdvice` for those cases when we don't get deal with `MessageChannel`s already, but want to have proper way to cleanup `SecurityContext`
* Make `GlobalChannelInterceptorProcessor` as `SmartInitializingSingleton` to avoid `phase` conflicts.
* Fix `MessagingAnnotationPostProcessor` to use `beanFactory.initializeBean(endpoint, endpointBeanName);` instead of manual `start()` invocation bypassing the `phase` logic, hence having a bug, when endpoints have been started very early
* Optimise `AbstractPollableChannel` to use `size` field from `ChannelInterceptorList` instead of `size()` from `Collection<?>`
* Fix `AnnotatedEndpointActivationTests` extracting separate component for annotation configuration instead of using test class directly. This caused very late Messaging Annotations process on that class
* Fix typo in the `spring-integration-jdbc-4.2.xsd`
* Remove some `SOUT`s throughout the project

TODO Docs

PR Comments:

* Remove redundant `AbstractExecutorChannel#executorInterceptors` and make logic based on the `super.interceptors`
 * Fix wrong imports order
 * JavaDocs for `ThreadStatePropagationChannelInterceptor`
 * Docs for `SecurityContext` propagation

Doc Polishing

Address PR comments

Address PR comments

* Extract `ExecutorChannelInterceptor` logic in the `PollingConsumer`
to have an ability to invoke `afterMessageHandled()` on the TaskScheduler's Thread
for example for the `SecurityContext` clean up
* Get rid of all that redundant "clean up" stuff
* Docs polishing

Fix `NPE` in the `PollingConsumer`

Introduce `ExecutorChannelInterceptorAware` to avoid iterators on each message

Polishing; Docs, Sonar
2015-08-03 09:33:23 -04:00
Gary Russell
fd35d43aba INT-3784: Use acknowledge="transacted" by Default
JIRA: https://jira.spring.io/browse/INT-3784

Also

- suppress WARN log when priority mapping fails
- rework extract payload tests to use a single context

Make a new `JmsMessageDrivenEndpoint` as `private` because it makes sense only for XML `BeanDefinition` variant.
2015-07-31 17:41:31 -04:00
Artem Bilan
4cca684f36 INT-3789: Upgrade to SF 4.2 and other fixes
JIRA: https://jira.spring.io/browse/INT-3789

* Hazelcast -> `3.5.1`
* ActiveMq -> `5.11.1`
* Boon -> `0.33`
* Spring Security -> `4.0.2`
* Kryo -> `3.0.3`
* Fix missed polishing for the `Log4jLevelAdjuster` according required generics:
https://build.spring.io/browse/INT-MJATS41-348
* Fix `ImapIdelIntegrationTests` sporadic failure
* Fix `Kryo` Codec stuff according to the changes in the latest Kryo version
2015-07-31 13:19:28 -04:00