Commit Graph

1983 Commits

Author SHA1 Message Date
Paul Martin
85aead337f INT-4241: Wrap ArrayNodes with ArrayNodeAsList
JIRA: https://jira.spring.io/browse/INT-4241

To allow `ArrayNode` to be treated as `List` in SpEL expressions, wrap them to the internal `ArrayNodeAsList` implementation

Fix Checkstyle errors

* Add `iterator()` support to the `ArrayNodeAsList`
2017-03-27 17:33:43 -04:00
Gary Russell
e9c4bb95a4 Eclipse/JDT Type Inference Workaround in Test
- Remove an unused type argument
- Add a missing type argument
2017-03-24 15:55:48 -04:00
Artem Bilan
78bab07874 Java DSL polishing around HeaderEnricherSpec
* Make `HeaderEnricherSpec extends ConsumerEndpointSpec` to avoid extra
EIP-method with two `Consumer`s, when only one for
the `HeaderEnricherSpec` can address all the options - header enricher,
as well as target endpoint
* Move `this.endpointFactoryBean.setHandler(this.handler)` into
the `ConsumerEndpointSpec#doGet()` instead of ctor to avoid
duplicate code from the target implementations (e.g. `BarrierSpec`)
2017-03-23 13:32:41 -04:00
Artem Bilan
df9593a528 INT-4244: Optimize JpaOutboundGateway for Message
JIRA: https://jira.spring.io/browse/INT-4244

The `JpaOutboundGateway` returns a whole `Message` for reply copying request headers.
Building the reply a `AbstractMessageProducingHandler` uses `MessageBuilder` to create a new `Message` with all request headers because of `shouldCopyRequestHeaders() == true`

* To avoid some overhead with new `Message` and `MessageBuilder` for nothing, just return a JPA result as is and let super class to build the Message

* Optimize all reply producers to return `MessageBuilder` to the super `handleMessage()` process
* Return the whole `gatherResult` `Message<?>` from the `ScatterGatherHandler` to have ability to transfer reply headers as well
* Mark `DelayHandler`  as `shouldCopyRequestHeaders() return false` since it doesn't modify Message and returns it as is after delay
2017-03-23 11:40:25 -04:00
Artem Bilan
752fe0356f Reinstate warns for publish events from Initiator
JIRA: https://jira.spring.io/browse/INT-4220,
https://jira.spring.io/browse/INT-4246

* Stop one more internal `initiator` in the `LockRegistryLeaderInitiatorTests`
2017-03-23 11:39:07 -04:00
Vedran Pavic
fb7e4d6869 INT-4246: Revoke leader when lock isn't acquired
JIRA: https://jira.spring.io/browse/INT-4246

The `LockRegistryLeaderInitiator` currently does not revoke leadership
when leading instance is unable to acquire lock from the underlying lock.
This can result in multiple `LockRegistryLeaderInitiator` instances becoming
 leaders in the exceptional situations such as lock timeouts.

* Handle leadership revoking when leading `LockRegistryLeaderInitiator`
is unable to acquire lock

Polish javadoc

**Cherry-pick to master**

Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/support/leader/LockRegistryLeaderInitiator.java
	spring-integration-core/src/test/java/org/springframework/integration/support/leader/LockRegistryLeaderInitiatorTests.java

* Stop initiators in the end of test
2017-03-23 11:06:12 -04:00
Ian Bondoc
6616242831 Support for request sub-flow in content enricher
Fixed issues as per code review and added a test for terminating sub flow

Simplified implementation of enricher sub flow and simplified tests

Polishing
2017-03-23 09:55:50 -04:00
Artem Bilan
3a98b1c974 Refactoring for some DSL methods
To avoid some extra methods and let to operate with more cleaner API, merge some specs to single entity

* Make `EnricherSpec` and `AbstractRouterSpec` as `extends ConsumerEndpointSpec`
* Remove extra methods in the `IntegrationFlowDefinition`
* Provide refactoring and fixed to `enrich()` and `route()` functions according the `ConsumerEndpointSpec` merge
* Port `TransformerTests` from SI-Java-DSL project
2017-03-20 17:57:10 -04:00
Gary Russell
70652739b8 JavaConfig/DSL Docs for Routers (Part 1)
Also fix DSL messing `sendTimeout` property for routers.
Since other message handlers have this property on the `ConsumerEndpointSpec`, add support there
instead of `RouterSpec`, for consistency.
Also fix `ConsumerEndpointSpec` `sendTimeout` - can be applied to any
`AbstractMessageProducingHandler`, not just `AbstractReplyProducingMessageHandler`.
Ditto for `async`.

Polishing
2017-03-20 13:04:56 -04:00
Gary Russell
c85b9cbb20 Add JavaConfig Docs for Delayer
Also add `setDelayExpressionString()`.
2017-03-17 14:28:30 -04:00
Artem Bilan
8da89c7cce INT-4100: Improve RequestReplyExchanger
JIRA: https://jira.spring.io/browse/INT-4100

* Add `throws MessagingException` to the `RequestReplyExchanger` to make it fully messaging contract based
* Add test to the `ServiceActivatorDefaultFrameworkMethodTests` to demonstrate how many info is in the stack trace after `RequestReplyExchanger`
* Document how to be with the `throws` clause in custom gateways
* Fix `boolean` attributes in the `spring-integration-5.0.xsd`

* Fix `AbstractChannelAdapterParser` do not populate endpoint attributes if component is nested
* Fix typo in the `AmqpOutboundChannelAdapterParserTests`
* Increase timeouts in the  `MixedDispatcherConfigurationScenarioTests`

Reinstate `auto-startup` to none by default.
 Not all components expects `true` by default in their initial state

Also https://jira.spring.io/browse/INT-3432

Document the behavior of the `throws` clause on gateway method

Remove unrelated `bridge` id from the `<chain>`

Add What's new about  `RequestReplyExchanger` changes

Doc Polishing.
2017-03-14 18:11:32 -04:00
Artem Bilan
d3fb8b8f9e INT-4192: Improve ExprEvaluatingReleaseStrategy
JIRA: https://jira.spring.io/browse/INT-4192

To avoid implicit overhead for loading messages from persistent message store, use entire `MessageGroup` as root object for expression evaluation context

Also see https://github.com/spring-projects/spring-integration/wiki/Spring-Integration-4.3-to-5.0-Migration-Guide
2017-03-14 15:02:45 -04:00
Artem Bilan
b3f461e139 INT-4018: Resolve some TODOs
JIRA: https://jira.spring.io/browse/INT-4018

* Resolve some TODOs as expected
* Remove some as logically or physically with useless effort
* Leave others for future considerations
2017-03-14 12:30:47 -04:00
Andreas Baer
3aa830b7c0 INT-4101: failedMessage on TX failure in pollers
JIRA: https://jira.spring.io/browse/INT-4101

Document `PassThroughTransactionSynchronizationFactory`

Copyright year and author name added

Documentation improved

Polishing
2017-03-09 14:24:42 -05:00
Yi EungJun
2ca05b3c44 fix a typo
s/configfuring/configuring/
2017-03-08 09:32:12 -05:00
Gary Russell
37683f1b80 INT-4219: Test Polishing
JIRA: https://jira.spring.io/browse/INT-4219

- Use `AdditionalAnswers.returnFirstArgument` instead of lambda to return first arg
- Enable CheckStyle `AvoidStaticImport` for tests
- Fix static import violations in tests
2017-03-06 11:13:39 -05:00
Artem Bilan
dd0c426d14 Fix EnableIntegrationTests to use regex matcher
https://build.spring.io/browse/INT-MASTER-575

Looks like SpEL compiles classes to name with unpredictable number
2017-03-03 22:35:25 -05:00
Gary Russell
a50d866f81 INT-4219: Add @UseSpelInvoker
JIRA: https://jira.spring.io/browse/INT-4219

Defer Expression Compilation; Resolve Placeholders

Uncomment BeanExpressionResolver Stuff

Fix Test Failures (Deferred Expression Parsing)

More Test Fixes

Broke tests that manipulated the EXPRESSION_PARSER - change
EXPRESSION_PARSER_DEFAULT to reference EXPRESSION_PARSER from the super class.

More Tests and Docs

Doc Polishing
2017-03-03 20:11:05 -05:00
Artem Bilan
4403519e5f INT-4225: Polishing
Fix static imports for `@Default`
Add JavaDoc for the `SimpleWebServiceOutboundGateway.setExtractPayload()`
2017-03-02 17:58:11 -05:00
Artem Bilan
28e8f23fd0 INT-4225: Add MessageConverters Infrastructure
JIRA: https://jira.spring.io/browse/INT-4225

* To allow flexible way to convert incoming messages for the target arguments in method invocation
add `ConfigurableCompositeMessageConverter` global bean under `ARGUMENT_RESOLVER_MESSAGE_CONVERTER_BEAN_NAME`
* Retrieve that bean for the `MessageHandlerMethodFactor` in the `MessagingMethodInvokerHelper` to enrich afterwards target `HandlerMethodArgumentResolver`s
* The `ContentTypeConversionTests` demonstrates conversion incoming JOSN `string` into the target POJO argument in the service method

*  Add `@Primary` support
* Add documentation about `@Primary` and `contentType` conversion

INT-1800: Add MTOM Support for WS

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

The Simple WebService Inbound and Outbound Gateways can operate with `WebServiceMessage`s directly.
This allows to create those messages manually and add attachments to them.
Or, on the other hand, process incoming messages with attachments manually.

For this purpose the `SimpleWebServiceOutboundGateway` is supplied with new `extractPayload` property.
Also the `UnmarshallingTransformer` can now process `MimeMessage` as payload to unmarshal it into object graph with attachments if that

INT-4225: Add MessageConverters infrastructure

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

* To allow flexible way to convert incoming messages for the target arguments in method invocation
add `ConfigurableCompositeMessageConverter` global bean under `ARGUMENT_RESOLVER_MESSAGE_CONVERTER_BEAN_NAME`
* Retrieve that bean for the `MessageHandlerMethodFactor` in the `MessagingMethodInvokerHelper` to enrich afterwards target `HandlerMethodArgumentResolver`s
* The `ContentTypeConversionTests` demonstrates conversion incoming JOSN `string` into the target POJO argument in the service method

*  Add `@Primary` support
* Add documentation about `@Primary` and `contentType` conversion

Doc Polishing

Change `@Primary` to `@Default`

Doc Polishing
2017-03-02 17:44:45 -05:00
Gary Russell
5fe605470b Javadoc Polishing 2017-03-02 09:06:19 -05:00
Artem Bilan
695b168b0b INT-4234: Fix LambdaMessageProcessor logic
JIRA: https://jira.spring.io/browse/INT-4234

When the actual argument type is `Message` there is no reason to go down the `if...else` logic.
This doesn't work for Lambda anyway because of generics erasure in case of `GenericTransformer`, but that is the fix for case of direct interface implementation
2017-03-01 11:31:02 -05:00
Artem Bilan
8cdcd14d35 INT-4229: SpEL Customization Via Java Config
JIRA: https://jira.spring.io/browse/INT-4229

* Make `SpelPropertyAccessorRegistrar` as `public` class and provide more API to customize it.
This class allows to register `PropertyAccessor` s for shared `EvaluationContext`
* Document how to configure SpEL functions and `PropertyAccessor` s with Java Config

**cherry-pick to 4.3.x**
2017-03-01 11:17:43 -05:00
Gary Russell
e19a376aef INT-4237: FWMH: Acquire Lock Before Flushing
JIRA: https://jira.spring.io/browse/INT-4237

It was possible to flush (close) the file while a write was in process; more likely when
`flushWhenIdle` is false.

This probably would not occur in the real world, just tests with short flush intervals,
but certainly possible.

There is already a lock used to prevent concurrent writes while appending; use the same
lock when flushing.
2017-03-01 10:59:47 -05:00
Gary Russell
66b53e749f INT-4233: Prework - Simple JSON Serializer
JIRA: https://jira.spring.io/browse/INT-4233

INT-4233: Add (S)FTP FileInfo Header (Streaming)

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

Add the complete file info as JSON (when Jackson or Boon available) to the message headers
when streaming inbound.

Provide a mechanism to configure Boon to provide similar output to Jackson.

Also allow subclasses to provide their own object mapper.

Also clean up after the AMQP DSL tests, and don't use a queue `foo`. I often have such a queue
with content; this caused tests to fail.

Use SimpleJsonSerializer

Doc Polishing

Polishing - PR Comments

More Polishing

* Polishing according latest PR comments
2017-02-24 13:24:35 -05:00
Artem Bilan
af711a0d30 Fix tests for wrong messages in assertions
https://build.spring.io/browse/INT-MASTER-560/

**Cherry-pick to 4.3.x**
2017-02-24 13:13:40 -05:00
Gary Russell
56f72cb736 INT-4224: Improve Direct Handler Binding Docs
JIRA: https://jira.spring.io/browse/INT-4224

Explain when `ref` can can be used on certain endpoints.
2017-02-24 12:27:51 -05:00
Artem Bilan
693adfd774 INT-4227: Allow Custom Messaging Annotations
JIRA: https://jira.spring.io/browse/INT-4227

Expose `MessagingAnnotationPostProcessor` for inheritors.
The `CustomMessagingAnnotationTests` demonstrates how custom Messaging Annotation can be registered and used

**Cherry-pick to 4.3.x**

Add `setupCustomPostProcessors()` and `addMessagingAnnotationPostProcessor` to the `MessagingAnnotationPostProcessor`

Expose some API for inheritors
2017-02-24 10:39:54 -05:00
Gary Russell
f23360d539 INT-4236: Status for SmartLifecycleRoleControlller
JIRA: https://jira.spring.io/browse/INT-4236

Add methods to obtain status from the `SmartLifecycleRoleController`.

* Polishing according PR comments.
* Fix log messages in the `SmartLifecycleRoleController` from the Zookeeper mentioning
2017-02-23 15:31:32 -05:00
Gary Russell
f043d6ca0b INT-4228 Fix Hidden Channel Bean Definition Error
JIRA: https://jira.spring.io/browse/INT-4228

Previously, if a bean definition for a channel exists, but has configuration issues,
the `AbstractMethodAnnotationPostProcessor` still went ahead and created a `DirectChannel`.
Only with TRACE logging was the root cause apparent.

This was because all `BeanException` s cause that behavior.

Now, only `NoSuchBeanDefinitionException` will cause auto-creation of channels.

Tested with mocks and a real Boot app, which now correctly reports

```
15:28:41.582 [main] DEBUG o.s.b.d.LoggingFailureAnalysisReporter - Application failed to start due to an exception
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'rabbitConnectionFactory' available
```
2017-02-14 16:30:20 -05:00
Artem Bilan
10372826b7 Add Log4jLevelAdjuster to PollerAdviceTests
https://build.spring.io/browse/INT-FATS5IC-85
2017-02-13 13:00:00 -05:00
Artem Bilan
8276bf8eae MMIH: Use Original Method for InvocableHandMethod
The `MessagingMethodInvokerHelper` extracts `targetClass` to process methods and avoid extra methods when class is Proxy

The `InvocableHandlerMethod` is based on the reflection method invocation and we should use runtime methods on the proxy to invoke.
We don't see such a problem in SpEL because it is parsed from the plain String to the real code later

Polishing

Add an Advice to the test.
2017-02-07 12:53:40 -05:00
Artem Bilan
9839b5fcaa INT-4218: MessagingMethodInvokerHelp Improvements
JIRA: https://jira.spring.io/browse/INT-4218

* Add `InvocableHandlerMethod` invocation threshold logic to give up eventually in favor of permanent expression evaluation
* Add `ParametersWrapper.toString()` for better logging messages
* Log `InvocableHandlerMethod` invocation failure message in favor of SpEL only once when `failedAttempts` is exceeded already
* Switch to `spelOnly` mode after that
* Refactor `MessagingMethodInvokerHelper.processInternal()` to separate SpEL or Ivocable logic via their own invocation methods
* Move `MessagingMethodInvokerHelper.HandlerMethod` static fields to the `MessagingMethodInvokerHelper` level since it doesn't matter from this class perspective but can be reused in other places from top level of the `MessagingMethodInvokerHelper` class
* Catch `IllegalArgumentException` with the `java.lang.ClassCastException@...` message.
See http://stackoverflow.com/questions/16042591/reflections-illegalargumentexception-causes for more info

Address PR comments

* Make `handlerMethod.failedAttempts` conditional expression as `>=` to avoid race conditions in multi-threaded environment
* Analyze StackTrace for the class of the `IllegalStateExpception` avoid SpEL fall back in case of user exception, not reflection invocation
* Fix race condition in the `TcpNioConnectionTests`, when atomic value is set after `latch.countDown()`
2017-02-06 11:43:29 -05:00
Artem Bilan
e06c0e2927 Add convenient IntegrationFlowDefinition.bridge()
To avoid confusing `.bridge(null)` in the end of flow for replying to the gateway on top introduce simple `.bridge()` with just delegation to the `.bridge(null)` with the same result as before
2017-02-02 18:18:10 -05:00
Gary Russell
218daa94e8 INT-4222: Don't Propagate a null ConversionService
JIRA: https://jira.spring.io/browse/INT-4222

See INT-4214; the `DefaultMessageHandlerMethodFactory` requires a conversion service
and sets up a default.

Some SI components propagated a `null` conversion service which overwrote the default
causing runtime exceptions.

    Caused by: java.lang.IllegalArgumentException: ConversionService must not be null
	at org.springframework.util.Assert.notNull(Assert.java:163) ~[spring-core-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
2017-02-01 12:45:01 -05:00
Artem Bilan
9616cc72a1 INT-4220: Leaders: warn event publishing errors
JIRA: https://jira.spring.io/browse/INT-4220

Currently when an error is thrown from the event publishing the role granting is broken and we just go to the role revoking.

* Since it's just an event publishing it shouldn't effect the original leader election.
* `try...catch` event publishing in the `LeaderInitiator` and `logger.warn` an `Exception`
* Make `leader/Context` as `@FunctionalInterface` for simple Lambda use-case like `NULL_CONTEXT` - `() -> false`
* Remove all the internal `NullContext` implementations in favor of above mention Lambda
* In the `LockRegistryLeaderInitiator` use `CustomizableThreadFactory` instead of custom `ThreadFactory` for prefixing
* Add `zookeeper/leader/LeaderInitiator#getContext()` for external usage and consistency with other similar components
* Fix `CuratorContext.toString()` typo
2017-01-31 14:37:45 -05:00
Artem Bilan
a4bfd2cc42 INT-4221: Properly use Spring's Assert class
JIRA: https://jira.spring.io/browse/INT-4221

* Upgrade to those versions of Spring project dependencies which potentially will provide similar fix

**Cherry-pick to 4.3.x**
2017-01-30 22:27:59 -05:00
Artem Bilan
63e715a685 DSL-140: Improve Logic for outputChannel in DSL
Fixes spring-projects/spring-integration-java-dsl#140

Allow to provide any custom `MessageProducer` impl for the `.handle()`, not only `AbstractReplyProducingMessageHandler` extension

Polishing
2017-01-30 14:00:15 -05:00
Gary Russell
3276353bde INT-4217: Checkstyle Fix
JIRA: https://jira.spring.io/browse/INT-4217
2017-01-27 15:02:45 -05:00
Gary Russell
c5c874f563 INT-4217: SpEL Compilable for Required Header Args
JIRA: https://jira.spring.io/browse/INT-4217

Previously, SpEL method calls with required header parameters had the following form:

    #target.messageAndHeader(message, headers['number'] != null ? headers['number'] : T(org.springframework.util.Assert).isTrue(false, 'required header not available: number'))

The SpEL compiler cannot compile this because the else clause of the ternary has no `exitDescriptor` to indicate the type.

Change the expression to use a function for required headers.
Also use an Elvis operator when possible.

Some examples of new expressions:

    #target.optionalAndRequiredHeader(headers['prop'] ?: null, #requiredHeader(headers, 'num'))

    #target.optionalAndRequiredDottedHeader(headers['dot1'] != null ? headers['dot1'].foo : null,
         #requiredHeader(headers, 'dot2').baz

In the second case, we can't use an Elvis because we're accessing a `foo` property of the header.

__cherry-pick to 4.3.x__

- make `ParametersWrapper` `static`
- minor conflicts in imports
- remove the perf test

* Polishing: remove redundant annotation args for their default values usage
2017-01-27 14:40:04 -05:00
Gary Russell
eaaa21ef5d Fix Compiled SpEL Test
Several problems:

- Setting the system property is not enough since the `static` parser already has its configuration
- Changing the ParametersWrapper to `private` makes property accessing not compilable (the method and class must be public).
- The expression...

    #target.messageAndHeader(message, headers['number'] != null ? headers['number'] : T(org.springframework.util.Assert).isTrue(false, 'required header not available: number'))

...is not compilable anyway because the right arguent to the `!=` is not compilable because the `TypeReference.exitTypeDescriptor` is `null`.

This commit addresses the first two.

Polishing

Use a compilable method.

* Simple polishing
2017-01-24 19:01:32 -05:00
Artem Bilan
3b82c698f3 Fix CollectionArgumentResolver JavaDoc typo 2017-01-24 12:22:41 -05:00
Artem Bilan
b3db6a97a2 INT-4214: Migrate to InvocableHandlerMethod
JIRA: https://jira.spring.io/browse/INT-4214

* Rework `MessagingMethodInvokerHelper` to delegate to the `InvocableHandlerMethod` with its `HandlerMethodArgumentResolver` infrastructure instead of SpEL
* Introduce several `HandlerMethodArgumentResolver` to address some SI use-cases like `@Payloads`, `@Payload(expression = "")` and `Collection` as argument
* Initialize `DefaultMessageHandlerMethodFactory` in the `MessagingMethodInvokerHelper.start()`.
With that I observed several `Lifecycle` problem when we don't have proper delegate from the top.
* Fix `AbstractCorrelatingMessageHandler` and similar to delegate `Lifecycle` properly
* Fix `ReactiveConsumer` to delegate `Lifecycle` to the `MessageHandler`
* Fix `MutableMessage` do not `generateId()` and set `timestamp` headers if we already have them in the provided headers
* With all that `Lifecycle` many tests must be fixed to call `start()`

Add SpEL fallback variant to the MessagingMethodInvokerHelper

Add `MessagingMethodInvokerHelper.setUseSpelInvoker(boolean)`

Add `MethodInvokingMessageProcessorTests.testPerformanceSpelVersusInvocable()`

Add Compiled SpEL comparison

* Add `MapArgumentResolver` to cover `Properties` case
* add `MessagingMethodInvokerHelper.HandlerMethod.spelOnly` state, when we definitely can perform ony SpEL for provided arguments, e.g. `@Header` with expression
* Catch `IllegalStateException` with the `"argument type mismatch"` message to fallback to SpEL invocation
* Add `Iterator` support for the `CollectionArgumentResolver`
* Add `integrationConversionService` bean registration into the `TestUtils.createTestApplicationContext()`
* Tweak `.travis.yml` to try to download latest JDK, the current `1.8.0_31` is pretty old already and has some bugs
* Adjust some failing tests to use `TestUtils.createTestApplicationContext()` to rely on newly added `integrationConversionService` bean

Fix failed tests: `ctx.refresh()`

Polishing current year in Copyright

* JavaDocs for `CollectionArgumentResolver` and `MapArgumentResolver`
* Propagate `ConversionService` from the `MessagingMethodInvokerHelper` to the `MapArgumentResolver.java`

Fix `MessagingMethodInvokerHelper` to propagate `BeanFactory` into `MapArgumentResolver` as well
The `MapArgumentResolver` now `extends AbstractExpressionEvaluator`, too
Fix JavaDoc typo
2017-01-24 12:15:22 -05:00
Artem Bilan
2659baa821 Checkstyle ImportOrder for main and fixes 2017-01-23 12:58:36 -05:00
Artem Bilan
6ac0c7316a Add IntegrationFlowDefinition.implicitChannel state to be sure that we don't add nullChannel if we wire-tap the real channel.
Otherwise we end up with the case to break the flow which expect message from the explicit channel.
Add JavDocs to `.wireTap()` to explain behaviour in the end of flow
2017-01-23 12:45:09 -05:00
Artem Bilan
36f3c533aa INT-4210: DSL: Make a final .log() Terminal
JIRA: https://jira.spring.io/browse/INT-4210

Previously use-case like:
```
.transform()
.log()
.get();
```
failed with the `Dispatcher has no subscribers` for an implicit channel populated by the `.wireTap()` because actually `LoggingHandler` is placed on the wire-tapped channel

Since logically it looks like end-user tries to have `LoggingHandler` as a terminal of the flow, we add `nullChannel` if `WireTapSpec` is in the end of the flow definition.

If user would like to continue flow (e.g. return reply to the `replyChannel`), he must end more EIP-methods after `.log()` (like before, of course)
2017-01-23 12:45:09 -05:00
Artem Bilan
bc5910b4e1 Fix JavaDoc typo in the IntegrationFlowDefinition
https://build.spring.io/browse/INT-MASTER-512
2017-01-13 13:55:22 -05:00
Artem Bilan
129ebdc625 INT-4207: Fallback for replyChannel Resolution
JIRA: https://jira.spring.io/browse/INT-4207

Enhance `AbstractMessageProducingHandler` to fallback for `replyChannel` to the `reply` if it is `Message`.
That lets to avoid extra `bridge` configuration afterwards to make that `reply` as `request` for the same `replyChannel` resolution.

This situation happens in case of error handling when the request message is `ErrorMessage`, typically without original headers to properly consult.
But at the same time `failedMessage` in the `MessagingException` has all required headers.
2017-01-13 11:10:51 -05:00
Gary Russell
fd082db245 Minor Polishing
Unused imports etc.
2017-01-12 09:22:02 -05:00
Artem Bilan
54654546b9 INT-4206: Upgrade to Mockito 2.5
JIRA: https://jira.spring.io/browse/INT-4206

* Fix unnecessary dependency resolution in BOM module
* Fix `MessagingMethodInvokerHelper` to handle `$MockitoMock$` generated classed which isn't CGLib `Proxies` any more
* Provide fixes for test classes according upgrade to Mockito `2.5`
* Fix Ceckstyle do not allow static imports for deprecated Mockito classes
2017-01-09 18:39:25 -05:00