Commit Graph

2293 Commits

Author SHA1 Message Date
Artem Bilan
cb50b1565c INT-3554: Add Expression Setters
JIRA: https://jira.spring.io/browse/INT-3554

**Cherry-pick to 4.0.x**

Polishing
2014-11-07 15:58:22 -05:00
Gary Russell
90c6f2fa3e INT-3555: Fix Header Channel Mapping
JIRA: https://jira.spring.io/browse/INT-3555

Previously, `replyChannel` and `errorChannel` headers were
unconditionally dropped in `AbstractHeaderMapper`. This was
changed in 4.1.0.M1 to allow these headers to be transmitted
in the case that they were translated to a String by a
`HeaderChannelRegistry`.

However, we should still drop these headers if they reference live
`MessageChannel` instances.
2014-11-07 18:50:57 +02:00
Gary Russell
1c9cea162d INT-3545: Don't AutoStart HeaderChannelRegistry
JIRA: https://jira.spring.io/browse/INT-3545

Previously, the `DefaultHeaderChannelRegistry` was auto-started.
This caused the reaper to run and eventually start all the
`taskScheduler` threads, even if the registry was not being used.

- Defer the `start()` until the first channel is stored.
- Do not start the reaper if the bean has been explicitly stopped.
- Deprecate the implementation of `SmartLifecycle`.
2014-11-05 15:13:29 -05:00
Artem Bilan
ecbb4ef386 INT-3538-3: Docs for Idempotent Receiver
JIRA: https://jira.spring.io/browse/INT-3538

I-R Doc Polishing
2014-11-05 14:36:28 -05:00
Artem Bilan
efe3b11fc3 INT-3538: Docs for Routing Slip
JIRA: https://jira.spring.io/browse/INT-3538

INT-3538-2: `RoutingSlipHeaderValueMessageProcessor` improvement

Since `HeaderEnricher` populates `beanFactory` to its `HeaderValueMessageProcessor`s,
there is no reason to specify `RoutingSlipHeaderValueMessageProcessor` as a separate bean.
Therefore the `IntegrationEvaluationContextAware` may not be reached.
Remove its support from `RoutingSlipHeaderValueMessageProcessor` and just rely on the `setBeanFactory`

RS Doc Polishing
2014-11-05 11:26:45 -05:00
Artem Bilan
af19bbfa70 INT-3538: Docs for Scatter-Gather
JIRA: https://jira.spring.io/browse/INT-3538

Phase #1: `Scatter-Gather`

S-G Doc Polishing

INT-3538 Add `requires-reply` to `scatter-gather`

Final S-G Doc Polish
2014-11-05 09:02:09 -05:00
Gary Russell
6f85509920 INT-3549 Fix AMQP o-c-a Validation
JIRA: https://jira.spring.io/browse/INT-3549

`afterPropertiesSet()` checks for `NullChannel` to determine
whether a correlation expression is needed for confirms.

This code fails when `nullChannel` is proxied.

Extract the type before testing.
2014-11-04 20:38:38 +02:00
Gary Russell
f6c36d049d INT-3548 Fix @Payloads Annotation
JIRA: https://jira.spring.io/browse/INT-3548

Refactoring in 4.1 broke the `@Payloads` annotation in the
`MessagingMethodInvokerHelper`.

The test case missed this because it explicitly declares
`@Payloads List<Integer>` which is actually handled by the
case below:

````java
else if (Collection.class.isAssignableFrom(parameterType) || parameterType.isArray()) {
	if (canProcessMessageList) {
		sb.append("messages.![payload]");
		...
````

`List<?>` triggered

````java
else if ((parameterTypeDescriptor.isAssignableTo(messageListTypeDescriptor) || parameterTypeDescriptor
				.isAssignableTo(messageArrayTypeDescriptor))) {
	sb.append("messages");
	...
````

- Add back the logic to detect `@Payloads`.
- Remove `@Payloads` from the existing test.
- Add a new test that uses `List<?>`
2014-11-04 11:33:56 -05:00
Gary Russell
7dcb6ce58f INT-3457 Fix stop(Runnable) in AbstractEndpoint
JIRA: https://jira.spring.io/browse/INT-3547
JIRA: https://jira.spring.io/browse/INT-3546

INT-3486 changed stop(Runnable) so that it could be
overridden by subclasses, to allow separation of the
`stop()` and `callback` invocation.

However, the refactoring changed the logic such that
the `running` field is not reset, causing `doStop()` to
be called even when the component was not running.

Reset the running field.

Also, the MQTT inbound channel adapter did not test
for a `null` `client` in `doStop()`.
2014-11-04 10:07:03 -05:00
Artem Bilan
9e468e520a INT-3540: Add <scatter-gather> to the <chain>
JIRA: https://jira.spring.io/browse/INT-3540
2014-10-30 15:07:43 +02:00
David Liu
1d4785f3d2 INT-3341: Add Redis Queue Gateways
Add RedisQueueOutboundGateway and RedisQueueInboundGateway

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

add test

fix format issue

change expectmessage to extractpayload, fix test potential bug

fix copyright year

fix format and naming issue

fix as Artem's comments

fix as Artem's comments

change boolean condition judgement

INT-3341: Polishing

Minor Doc Polishing
2014-10-26 10:09:04 -04:00
Artem Bilan
ff2b15ea9e INT-2426: Add Idempotent Receiver EIP
JIRA: https://jira.spring.io/browse/INT-2426

INT-2426: pushed `final` modifier fix for Java 6 compatibility

INT-2426: Rework logic to the `MetadataStore`

INT-2426: `IdempotentReceiver` -> `IdempotentReceiverInterceptor`

* Move `Idempotent Filtering` logic to the `IdempotentReceiverInterceptor`, which should be applied as a regular
AOP `Advice` to the `MessageHandler#handleMessage`
* Provide an xml component `<idempotent-receiver>`
* Introduce `IdempotentReceiverAutoProxyCreator` to get deal with `IdempotentReceiverInterceptor` and `MessageHandler`s.
The `Proxying` logic is based on the mapping between interceptor and `consumer endpoint` `ids`
* Introduce `MetadataStoreSelector` along side with `MetadataKeyStrategy` and `ExpressionMetadataKeyStrategy` implementation

INT-2426: Introduce `IdempotentReceiver` annotation

Add `IdempotentReceiverIntegrationTests` in the JMX module to be sure that all proxying works well.

INT-2426: Polishing according PR comments

* Rename `IdempotentReceiverAutoProxyCreatorInitializer`
* Add support for several `IRI` for the one `MH`
* Polishing JavaDocs

INT-2426: Add `What's New` note

Doc Polishing.

More Doc Polishing

Use Timestamp (hex) instead of Id for Value

Facilitate cleanup.
2014-10-24 15:53:05 -04:00
Artem Bilan
134aa5923e INT-3521 completions for ChannelInterceptorList
JIRA: https://jira.spring.io/browse/INT-3521

INT-3521: Rework invocation `index` to the `Deque` of invoked interceptors

Conflicts:
	src/reference/docbook/whats-new.xml

INT-3521: Address PR comments

Create an `interceptorStack` only if there are `interceptor` on the channel.
Invoke `afterSend(Receive)Completion` only `if (interceptorStack != null)`

Minor Doc Polishing
2014-10-22 17:49:48 -04:00
Artem Bilan
fa03c6f268 INT-267: Implement Routing Slip Pattern
JIRA: https://jira.spring.io/browse/INT-267

The implementation looks like:
* There is the `ROUTING_SLIP` header to keep the list of bean ids;
* The `ROUTING_SLIP_INDEX` header keeps track of current `index` in the `ROUTING_SLIP` header;
* `ROUTING_SLIP` List can contain channel names or bean references for the `RoutingSlip` strategy implementations.
They are differentiated with `@` prefix;
* The `<header-enricher>` adds `<routing-slip>` sub-element to specify the comma-delimited value for desired `ROUTING_SLIP` for the downstream flow;
* The `AbstractReplyProducingMessageHandler` adds the logic to get deal with `ROUTING_SLIP` List and the algorithm is:
    - If `ROUTING_SLIP` isn't `null` we build `AtomicInteger` for the current `routingSlipIndex`;
    - the recursive `getReplyChannelFromRoutingSlip` should return a channel name or `null`;
    - if current `ROUTING_SLIP_INDEX` if for the `RoutingSlip` strategy, we check its result for `null` and `incrementAndGet()` the current index or not;
    - for the simple channel name value from `ROUTING_SLIP` list we just `incrementAndGet()` the current index and return the value;
    - the new `ROUTING_SLIP_INDEX` is populated to the headers of new reply message.
* Polishing for `AbstractMessageSplitter`

**TODO**: Docs and applying `RoutingSlip` algorithm for the `AbstractCorrelatingMessageHandler`

INT-267: Move `replyProducing` logic `ARPMH` -> `AMPH`

* Rework `AbstractCorrelatingMessageHandler` to use methods from super class
* Rework `MessageHandlerChain.ReplyForwardingMessageChannel` to use `produceReply`
* Rename `RoutingSlip` -> `RoutingSlipRouteStrategy`
* Add `ExpressionEvaluationRoutingSlipRouteStrategy`

Now `routingSlip` header can be configured like:

```
<routing-slip value="channel1; #{@routingSlipRoutingPojo.get(request, reply)}; @routingSlipRoutingStrategy; #{request.headers[myRoutingSlipChannel]}; channel6"/>
```

Where `;` is used as delimiter, because of `,` in the method invocation from SpEL.
The simple literal (`channel1`) is just a `MessageChannel` `id`.
`@` is used for `RoutingSlipRouteStrategy` bean reference.
`#{...}` used for SpEL.
The `HeaderEnricherParserSupport` parses this `value` to the `List<String>` - a set of bean names, where any SpEL is wrapped
to the `ExpressionEvaluationRoutingSlipRouteStrategy` bean definition

INT-267: Introduce `RoutingSlip` Domain class

Rename `AbstractMessageProducingHandler` methods: `*reply` -> `*output`

Conflicts:
	src/reference/docbook/whats-new.xml

INT-267: Rework `RoutingSlip` -> `Map<List<String>, Integer>`

Since `RoutingSlip` POJO isn't scalable in the distributed multi-language environment,
it would be better to use some Java generic type for this `ROUTING_SLIP` header.

The `Collections.singletonMap(Collections.unmodifiableList(routingSlipPath), 0)` is the best candidate to be convertible to other systems
and allow to have thread-safety.

The `ROUTING_SLIP` header is recalculated now on each `nextPath`

INT-267: Introduce `RoutingSlipHeaderValueMessageProcessor`

* Rework `HeaderEnricherParserSupport` logic to get rid of SpEL parsing
and change `routingSlipPath` to the `ManagedList<String>` to get gain of `property-placehoder`
* Add `<context:property-placeholder>` stuff to the `RoutingSlipTests`

INT-267: Move inline expressions to the implicit `EERSRS` from the `RoutingSlipHeaderValueMessageProcessor`

INT-267: Fix up JavaDocs and add JDBC test-case

INT-267: Address PR comments

INT-267: Polishing according PR comments

Polishing
2014-10-22 15:31:39 -04:00
Artem Bilan
869a8de05f INT-275: Implement Scatter-Gather Pattern
JIRA: https://jira.spring.io/browse/INT-275

In addition fix the `Lifecycle` issue in the `ServiceActivatorAnnotationPostProcessor`

Add Namespace support, Addition tests
   and fix some typos in the XSD

INT-275: Fix failed tests

INT-275: Fix for `replyChannel` Header

Add `sync` reply test-case

INT-275: Make `ScatterGatherHandler` sync

Fix some `MessageHandler`s from `SmartLifecycle`

INT-275: Fix `ScatterGatherHandler.handleRequestMessage` logic

INT-275: Fix `ScatterGatherHandler` JMX proxying issues

* Make `AbstractCorrelatingMessageHandler.getMessageStore()` as `public`
* Move `ScatterGatherHandlerIntegrationTests` to the JMX module to be sure that `ScatterGatherHandler`
works well with `@EnableIntegrationMBeanExport`
* Add xml config sample how to use an internal gatherer's `MessageStore` in the `MessageGroupStoreReaper`
* Add `What's New` notice
2014-10-21 15:14:34 -04:00
Gary Russell
176afcf807 INT-3519 Add Poll Skip Advice
JIRA: https://jira.spring.io/browse/INT-3519

Add a mechanism to allow skipping polls, perhaps
because of some downstream condition.

INT-3519: Polishing
2014-10-21 16:31:10 +03:00
Artem Bilan
5f9b04949e INT-3520: Add Reactor's PersistentQueue Support
JIRA: https://jira.spring.io/browse/INT-3520

INT-3520: Use `Condition` to wait items in the `Queue`

INT-3520: Reworking to the `Semaphore(0)`

* Implement 'artificial infinite wait'
* Add distributed test with infinite `receive()`

INT-3520: Correct usage of `Semaphore`

Minor Doc Polishing
2014-10-20 14:17:47 -04:00
Artem Bilan
a3d8776b5c INT-3516: Allow Optional<> in POJO Method Args
JIRA: https://jira.spring.io/browse/INT-3516

* Add `Optional<>` support for `@Header` in the `MessagingMethodInvokerHelper`
* Add `Optional<>` test-case
* Change `sourceCompatibility` for test to the Java 8

INT-3516: Revert SF version to 4.1.1

Add Docs on the matter

Fix WS Tests; Revert StubJavaMailSender
2014-10-20 09:02:06 -04:00
Artem Bilan
3081c4ac65 Increase receive timeout for some tests
https://build.spring.io/browse/INT-B41-118

Since `send` to the `discardChannel` caused from the separate Thread (`TaskScheduler` from `groupTimeout`)
there is some time window when receiving thread wait on `queue` lock, so `0` timeout to wait isn't enough
2014-10-16 12:27:09 +03:00
Gary Russell
cc78b9ec51 INT-3529 Add 'expire-groups-upon-timeout' to Reseq
JIRA: https://jira.spring.io/browse/INT-3529

Late arriving messages will now be immediately discarded by
default.

INT-3529 Polishing

Move group completion to the Resequencer's `afterRelease()` when
the group is timed out.
2014-10-16 11:42:12 +03:00
Enrique Rodríguez
6f7a8e3002 INT-3528 Use Collections min and max methods where appropriate
JIRA: https://jira.spring.io/browse/INT-3528

Use `min` and `max` methods instead of sorting an entire collection to get the minimum or maximum element.

Change other inline `Comparator<?>`s to the `final` fields
2014-10-15 12:00:52 +03:00
Artem Bilan
252c53db4c INT-3527: WebSocket and 'o-c-a' Improvements
JIRA: https://jira.spring.io/browse/INT-3527

* `WebSocketInboundChannelAdapter` now handles `CONNECT` STOMP message and sends `CONNECT_ACK` message to the `WebSocketSession` immediately
* `ExpressionMessageProducerSupport` implementations now checks the result of `expression` and if it is a `Message<?>` it is sent to channel without creating a new one
which previously wrapped that `Message<?>` as the `payload`.
* Add `<script>` support to the `<outbound-channel-adapter>`
* Upgrade to the SF 4.1.1
* Add appropriate notes to the Docs
2014-10-14 11:38:44 -04:00
Artem Bilan
d5f1bb6516 INT-3512: Add <advice-chain> to the Aggregator
JIRA: https://jira.spring.io/browse/INT-3512

INT-3512: Fix typos

INT-3512: add `expire-` prefix to the advice sub-elements

INT-3512: Mark `AggregatorWithCustomReleaseStrategyTests` as `LONG_RUNNING_TEST`

Doc Polishing
2014-10-14 11:30:18 -04:00
Kris Jacyna
30b58836e5 INT-3500: Consider to add "error-channel" to the <enricher>
JIRA: https://jira.spring.io/browse/INT-3500

* add 'error-channel' to the <enricher> component
* delegate errorChannel to the internal gateway in ContentEnricher
* added tests for xml based and java based enrichers with error channels

INT-3500: Consider to add "error-channel" to the <enricher>

* Fixed typos and comments
* Reworked xml integration test to use the outputChannel and increased timeout
* Added overview in whats-new doc

INT-3500: Consider to add "error-channel" to the <enricher>

* Ensure requestChannel is set if an errorChannel is set
* Increased timeout to fix unit test
* Added details to content-enricher ref doc

Polishing
2014-09-15 14:46:23 +03:00
Artem Bilan
b413239a83 INT-1198: WebSockets: Server Side
JIRA: https://jira.spring.io/browse/INT-1198

INT-1198: WebSocket: Add namespace support

Polishing components according to the namespace support experience

Parser for `<server-container>` and tests

INT-1198: Add parser tests for `<int-websocket:outbound-channel-adapter>`

Introduce `use-broker` on server side

Polishing according PR comments

`What's New` note
2014-09-04 17:27:31 -04:00
Artem Bilan
af2ec0567a INT-3503 equals & hashCode for ToStringFriendlyJN
JIRA: https://jira.spring.io/browse/INT-3503

**Cherry-pick to 4.0.x**

PR Comments and test
2014-09-02 12:55:19 -04:00
Gary Russell
b64bf03fce INT-3506 Async Gateway Improvements
JIRA: https://jira.spring.io/browse/INT-3506
JIRA: https://jira.spring.io/browse/INT-3428

Support flows downstream of the gateway that support
returning a `Future<?>` payload.

Currently, any method that returns a type that is assignable
to `Future<?>` runs async and returns a `FutureTask<?>`.

This prevents a service-interface method that returns a
custom `Future<?>` object from being invoked without wrapping
that `Future<?>` in a `FutureTask<?>`.

Allow the async-executor to be set to `null` causing any method
returning `Future<?>` to run on the calling thread.

Add support for `ListenableFuture<?>`.

If the return type is a `RunnableFuture`, `ListenableFuture` or
`Future`, or exactly a `FutureTask` or `ListenableFutureTask`, run the flow
on the executor (if present); otherwise run on the calling thread.

INT-3506 Fix Object returnType

INT-3506 Polishing - PR Comments

Perform dummy invocations of `submit` and `submitListenable` to
determine the actual return types so that we can determine at
runtime whether the executor will return a type that is compatible
with the method return type. If not, run on the caller's thread.

Add DEBUG Log If Incompatible Future<?>

INT-3506 Add Support for MessagingGateway

Add a constant to indicate no executor.

Add tests.

INT-3506 Polishing and Docs

- Docbook
- XSD
- Change test to send calling thread in payload so we can determine whether
   we need to return a Future or not; previously relied on the thread name
   which was brittle.

Polishing JavaDocs.
Change `amqp.xml` to use `org.springframework.amqp.support.AmqpHeaders` instead of an old one.
2014-08-29 22:17:03 +03:00
Artem Bilan
00c404f383 INT-3492: Deprecate @Payload and @Header(s)
JIRA: https://jira.spring.io/browse/INT-3492

Since `@Paylod` and `@Header(s)` annotations are in the Spring Framework,
there is no more need to support them in Spring Integration.

Deprecate them and leave for backward compatibility.
Will be removed in future releases.

Remove deprecated Gatewa's `#method` expression evaluation context variable

Tested `gradlew clean testall` with and without changed to the tests.

INT-3492: Add `MessagingAnnotationUtils#findMassagePartAnnotation`

Move `MessagingAnnotationUtils` to the `org.springframework.integration.util` package
2014-08-23 12:25:20 -04:00
Gary Russell
162ef1f227 Fix Tests SPR 4.1 Compatibility
GenericMessage.toString() changes.
2014-08-23 12:15:40 -04:00
Artem Bilan
7f74c571d4 INT-3402-3: Channels Late Resolution #3
JIRA: https://jira.spring.io/browse/INT-3402

* Add late resolution of channel names for the `MessagingGatewaySupport`
* Implement delegate logic for internal implementations like `ContentEnricher.Gateway`
2014-08-21 10:25:59 -04:00
Artem Bilan
1c051416ce INT-3489 Reschedule Aggregator's group-timeout
JIRA: https://jira.spring.io/browse/INT-3489

* Catch `MessageDeliveryException` and reschedule `group-time out task`: `AbstractCorrelatingMessageHandler#scheduleGroupToForceComplete`
* Apply `send-timeout` for the `discardChannel`
* Mark `groupRemove = false` in case of `MessageDeliveryException`
* Improve `send-timeout` docs

INT-3489: Recalculate `groupTimeout` on each rescheduling

Add Test for Zero Timeout
2014-08-21 09:23:31 -04:00
Artem Bilan
f84e798272 INT-3370: Add BoonJsonObjectMapper
JIRA: https://jira.spring.io/browse/INT-3370

* Add `BoonJsonObjectMapper`
* Provide some tests
* Remove deprecations
* Polishing test according removed deprecations
* Change `JsonObjectMapper#populateJavaTypes` to get deal with `payload`, not its `class`,
since we can't (and Jackson's `TypeFactory`, too) determine generic type from `Collection`.
Use `iterators` instead to retrieve the type from the first item.

Conflicts:
	build.gradle
	spring-integration-amqp/src/test/java/org/springframework/integration/amqp/support/DefaultAmqpHeaderMapperTests.java

INT-3370: Polishing according PR comments

* Apply Gary's polishing to the Docs
* Fix `RecipientListRouter` JavaDoc warn
* Fix typo in test name for `UdpUnicastEndToEndTests`
* Fix `RedisQueueOutboundChannelAdapterTests` do not use Jackson 1.x

Final Polish
2014-08-20 14:00:03 -04:00
Artem Bilan
cda4a99023 INT-3486: Poller: Prevent Interrupt StackTrace
JIRA: https://jira.spring.io/browse/INT-3486

INT-3486a: PR comments
2014-08-20 10:24:39 -04:00
Artem Bilan
85866a2ea8 INT-3427: Add JsonNodeToStringConverter
JIRA: https://jira.spring.io/browse/INT-3427

INT-3427: Workaround for String -> File converter

INT-3427: PR comments
2014-08-20 10:04:22 -04:00
Artem Bilan
f0ab3b03bd INT-3402 ChannelNames lazy-resolution Refactoring
JIRA: https://jira.spring.io/browse/INT-3402

After applying introduction of `AbstractMessageProducingHandler` there was need some simply refactoring to follow with DRY
2014-08-19 17:16:57 -04:00
Artem Bilan
507fd42d01 INT-3422: Add ChannelInterceptorAware.remove()
JIRA: https://jira.spring.io/browse/INT-3422

* Add two methods:
```
boolean removeInterceptor(ChannelInterceptor interceptor);
boolean removeInterceptor(int index);
```

The method `removeInterceptorsOfType(Class<?> clazz)` isn't good, because we lead undesired behavior, when several provided interceptors might be of the same type (e.g. by superclass)

INT-3422: PR comments
2014-08-19 12:45:35 -04:00
Stéphane Nicoll
463c185b38 Refactor AbstractHeaderMapper
This commit updates AbstractHeaderMapper in a number of ways:

* The 'userDefinedHeaderPrefix' property has been removed as some
  advanced tests revealed that the feature is actually broken right
  now and there is no easy way to fix it. A new richer hook point
  that indicates if the property comes from the target object or the
  standard MessageHeaders has been added.
* A HeaderMatcher interface has been introduced to replace the
  lengthy checks in shouldMapHeader. Several implementations
  of that interface are provided
* An additional pattern has been added that maps any header that is
  *not* a standard header. It uses the standardHeaderPrefix property
  for that purpose
* A number of protected method that were only used to create the
  instance have been removed in favour of a non default constructor.
  Subclasses should provide those *static* values in their own default
  constructor.
* The list of transient headers can now be customized. Transient
  headers are headers that should never be mapped. The standard
  ErrorChannel and ReplyChannel headers have also been removed from
  the default transient headers list as they no longer need to be
  transient

header-mapper: Polishing
2014-08-19 12:02:01 +03:00
David Liu
84421fd91c INT-2856: Add Management for RecipientListRouter
JIRA: https://jira.spring.io/browse/INT-2856

INT-2856:Add support for adding/removing individual recipients to the RecipientListRouter

INT-2856: allow recipient channel null on init

INT-2856: Polishing
2014-08-19 11:30:35 +03:00
Artem Bilan
4dd5064152 INT-3486: Fix typo in the name of MutableMessageBuilderFactory class 2014-08-18 10:01:49 -04:00
Artem Bilan
81f993f0d8 INT-3486 SimplePool suppress InterruptedException
JIRA: https://jira.spring.io/browse/INT-3486

Previously the undesired StackTrace has been logged in case of Thread interruption, e.g. component `stop()`

Suppress `InterruptedException` in the `SimplePool#getItem()`.
Since we do the `Thread.currentThread().interrupt();` on the `catch (InterruptedException e) {` it does not make sense
to rethrow it as a `MessagingException`, because the thread is interrupted anyway.
2014-08-18 10:01:49 -04:00
Artem Bilan
8ac4bfbd2c INT-3477: Add Reactor Promise<?> for Gateway
JIRA: https://jira.spring.io/browse/INT-3477

INT-3477: Fix `reactorEnvironment` propagation

* `MessagingGatewayRegistrar` parser the value for the `reactorEnvironment`
* Provide more interest test-case
* Polishing docs

INT-3477 Require `Environment` in case of Promise

* Do not use Reactor `Environment` as default instance.
* Require `Environment` reference, when is `Promise` method
* Polishing for tests
* Apply Gary's polishing for docs

INT-3477: Assert.notNull -> Assert.state

INT-3477: PR review
2014-08-18 09:53:28 -04:00
Artem Bilan
d69c8cb718 INT-3495 Add FileTailInChAFBean#setErrorChannel
JIRA: https://jira.spring.io/browse/INT-3495

**Cherry-pick to 4.0.x & 3.0.x**

INT-3495 Add `error-channel` to `<tail-i-c-a>`

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

* Fix `AbstractEndpoint` JavaDoc
2014-08-15 11:28:23 -04:00
Artem Bilan
edbbcef5b3 INT-3470: Fix SF 4.1 Compatibility
JIRA: https://jira.spring.io/browse/INT-3470

According to the commit https://github.com/spring-projects/spring-framework/commit/c06ac06,
the `MessagingException` is now `NestedRuntimeException` including nested StackTrace.
Hence test-cases have to be changed to the `Mathers.containsString` instead of `equals` for the `e.getMessage()`

**Cherry-pick to the 4.0.x**
2014-08-12 07:24:51 -04:00
David Liu
938d61f1b0 INT-3460: Add AbstractMessageProducingHandler
JIRA: https://jira.spring.io/browse/INT-3460
2014-08-12 12:42:21 +03:00
Gary Russell
4382a5796e INT-3479 Improve ServiceActivatingHandler.toString
JIRA: https://jira.spring.io/browse/INT-3479

- Remove null `beanName` in `AbstractStandardMessageHandlerFactoryBean`
- Change `ServiceActivatingHandler.toString()`
- Fix aggregator test timing
2014-08-06 13:14:07 +03:00
Kris Jacyna
d2da16145b INT-3485: Remove final from AE.stop(Runnable)
JIRA: https://jira.spring.io/browse/INT-3485

Delegate to doStop() instead of overriding stop() directly

Delegated call to doStop() rather than stop(), added author tag and added unit test for custom doStop(runnable)

Polishing
2014-08-06 13:08:58 +03:00
David Liu
5f214ea559 INT-2474: MGS: logging Exception at debug level
JIRA: https://jira.spring.io/browse/INT-2474
2014-08-05 13:23:45 +03:00
Artem Bilan
1458f56102 INT-3402: Late Resolution for Channel Names
JIRA: https://jira.spring.io/browse/INT-3402

* Move `channel name to channel` resolution logic to the action, e.g. `sendReplyMessage`
* Remove resolution logic from `MessagingAnnotation` Processors
* Fix `AggregatorAnnotationPostProcessor` to invoke `handler.afterPropertiesSet()` one more time,
because of `AbstractMethodAnnotationPostProcessor` `this.beanFactory.initializeBean(handler, handlerBeanName)`
* `Filter` annotation: allow `property-placeholder` for the `discardWithinAdvice`
* Fix `EnricherParserTests4-context.xml` duration: use just `0` for the `reply-timeout`

INT-3402: Add `synchronized double check`

INT-3402: Polishing according PR comments

INT-3402: Optimization for `AbstractCorrelatingMH`
2014-08-04 18:47:34 -04:00
Gary Russell
1c84305f8d Fix Occasional Reaper Expiry Test Failure
https://build.spring.io/browse/INT-MJATS41-32/

Also add a test for expiring a group within an aggregator.

Polishing
2014-07-31 22:43:12 +03:00
Artem Bilan
36cabb7f3c INT-2634: Test for gateway's Map parameter
JIRA: https://jira.spring.io/browse/INT-2634

The Map entries with non-String keys are now skipped just with WARN message,
instead of `IllegalArgumentException` as it was before
2014-07-30 18:04:46 +03:00