JIRA: https://jira.springsource.org/browse/INT-3235
Unable to programmatically wire header expressions or method-specific
properties into a GatewayProxyFactoryBean.
The GPFB has public methods that take arguments of
this type.
Make the class public instead of package-protected.
Add a test case.
JIRA: https://jira.springsource.org/browse/INT-3233
With Windows 7 and Java 7/8 closing a server channel does
not close the underlying socket. Closing the Selector does
close the socket.
It is not clear why this is needed, given that a selector can
be used for multiple sockets.
However, we only use the server side selector for a single
server socket so there is no detriment in closing it.
Also close the selector on the client side (even though it is
used for multiple sockets, because we are stopping the factory
anyway and all sockets will be closed).
However, closing the selector opens us up to 'ClosedSelectorException's
in several places. Add catch blocks to deal with this exception, and only
log an error if the factory is active.
While debugging this issue, I found that a number of (older) tests
left threads running, sockets open etc.
INT-3233 Polishing - PR Comments
JIRA: https://jira.springsource.org/browse/INT-3232
Previously, in the `RedisQueueMessageDrivenEndpoint` all `Exceptions` on `rightPop` operation
were logged with `error` level independently of the state of the Endpoint.
Add `if...else` and log with `debug`, if the Endpoint isn't active and don't publish the event.
JIRA: https://jira.springsource.org/browse/INT-3223
Don't use primitives in Tail factory bean setters so that the placeholders
for attributes that force the Apache implementation can resolve to "".
Test for an empty string in native-options and don't set.
JIRA: https://jira.springsource.org/browse/INT-3227
In MessagingTemplate.TemporaryReplyChannel, it was possible
the `clientHasReceived` boolean could be set by the other
thread after normal message receipt, but before the sender
tests it for the purpose of emitting a duplicate reply log
message.
Capture the boolean value of `clientHasReceived` before
counting down the latch.
Use `Arrays.asList()` instead of `Collections.arrayToList()` in
places where a generic type needs to be supplied by the caller.
This maintains compile-time compatibility with both Spring 3 and 4,
where Spring 4 added the generic type to the utility class.
The four occurrences where this was needed are not impacted
by the fact that `Arrays.asList()` returns an unmodifiable list.
JIRA: https://jira.springsource.org/browse/INT-3006
* Add integration properties `channels.maxUnicastSubscribers` and `channels.maxBroadcastSubscribers`
with default value to `Integer.MAX_VALUE`
* Add SpEL value resolution for those default values from parsers
* Deprecate similar properties from `ChannelInitializer`
INT-3006 `maxSubscribers` from channels' onInit()
* Move default init for `maxSubscribers` to the channels' `onInit()`
from `integrationProperties`, not from parsers
* extract `default` `integrationProperties` from static block in the `IntegrationProperties`
and use them as `default` on `IntegrationContextUtils#getIntegrationProperties`
* Add bean definition expression building to get the default values for `integration properties`
on bean building phase.
INT-3006: Add `taskScheduler.poolSize` property
INT-3006: Polishing
JIRA: https://jira.springsource.org/browse/INT-3216
Previously, After a group has been selected for completion
by the reaper, if the group is otherwise completed before
the reap AND expireGroupsOnCompletion is true AND a new
group with the same ID is created, ALL in the same millisecond,
AND the group creation timestamp is used for the reap criteria,
the new group will be incorrectly reaped.
Also, for a simple MGS, it was not necessary to re-fetch the group
if the group has already been marked complete.
- Defer reaping if the group is already complete (unless it's empty).
- Verify the timestamp hasn't changed (indicating a new group)
Add tests
- Verify no refetch of a complete SMG
- Verify no reap of a complete group (after refetch)
- Verify no reap when the timestamp changed
JIRA: https://jira.springsource.org/browse/INT-3055
* Add to HTTP Outbound Endpoint `uri-variables-expression`
* Add mutually exclusive check for `uri-variables-expression` with `<uri-variable>`
* Tests and Docs
INT-3055: Fixes
* `ExpressionEvalMap` now can apply `Map<String, Object>`,
but the value must have a `String` or `Expression` type.
Polishing
INT-3055 Doc Polishing
JIRA: https://jira.springsource.org/browse/INT-3214
Previously, ApplicationContextEvents were emitted even when the adapter
was stopped.
Do not emit ApplicationContextEvents unless they are stop or close events
and the adapter was stopped in the last 5 seconds.
An existing test case verifies the code (applicationContextEvents).
INT-3214 Polishing
Set default phase to Integer.MIN_VALUE + 1000 so the adapter
is started early, stopped late, while leaving headroom to
configure any downstream consumer to start before, stop after.
JIRA: https://jira.springsource.org/browse/INT-3213
Backwards reference from ....support.channel to
....channel.registry (BeanFactoryChannelResolver).
- Move the registry interface to ....support.channel
- Move the implementation to ....channel
JIRA: https://jira.springsource.org/browse/INT-3212
INT-3212 Fix Failing TCP Test
TcpNioConnections can deadlock when a fixed thread pool is being used.
The deadlock is detected after 60 seconds, but the test case failed
after 20 seconds - before the deadlock was detected.
Change the test to use a cached thread pool instead.
Also, increase concurrency by using threading in the test server
so each socket is handled on a separate thread.
Enchance connectionId to include both local and remote ports to
aid debugging.
Some minor formatting corrections.
JIRA: https://jira.springsource.org/browse/INT-3210
* Parse `Expression` parameters only once at creation phase
* There is still tiny case, when configured parameters don't have
provided parameter, in this case an `input` determines as JavaBean and the
`name` will be populated as bean property via SpEL.
INT-3210: Add params to maps and collections
* If configured parameters don't contain provide param,
parse his expressions and add to parameters of current
`ParameterSource` and enclosing `ParameterSourceFactory`
* Move JPA `ExpressionEvaluatingParameterSource` to inner class
of `ExpressionEvaluatingParameterSourceFactory`, similar to `ExpressionEvaluatingSqlParameterSourceFactory`
Intercepted TCP connections did not publish events.
TcpReceivingChannelAdapterTests did not close server factories after
tests.
Suppress 'no publisher' log messages.
JIRA: https://jira.springsource.org/browse/INT-3199
* Set `TypeDescriptor` to `Void.class` as default `targetParameterType` for falling-back
* Change `fall-thru` only to one method:
* Extract generic type from `Massage` parameter, so now
``` m1(Message<String> message);
m2(String payload);
```
are equal by `payload type` and similar POJO causes ambiguity configuration exception
INT-3199: Polishing and further fixing
* Address PR's comments
* Provide more friendly exception message for `Void.class` method
* Remove the logic around `@ServiceActivator`:
- one part was fixed within INT-3114
- another for `RequestReplyExchanger#exchange` doesn't make sense as it is good candidate
* Add fallback to `Iterator.class` method for `Iterable` payloads
* Add tests
Polishing
INT-3199: Add `handlerMessageMethods`
* Introduce separate properties:
- `handlerMessageMethods` for methods with `Message` parameter
- `handlerMethod`, if there is only one candidate after configuration
* Polishing several tests according new state of `MessagingMethodInvokerHelper`'s properties
Polishing
Revert `RequestReplyExchanger` fallback
Add `fallbackMessageMethods` processing
INT-3199 Polishing
Only revert to RequestReplyExchanger if there are ambiguous
fallback methods - if the target object is an RRE, it will always
have a candidate fallback (exchange).
Add more RRE tests.
Make ParametersWrapper a public inner class - it's only used
within the context of a process() call. Making it public allows
SpEL to access its properties without reflection.
JIRA: https://jira.springsource.org/browse/INT-3209
Previously, the DefaultFileNameGenerator re-parsed the
SpEL expression for every message.
Compile the SpEL once (and if it is changed).
Change unit tests to match changes.
- Core support in file module
- FTP Parser and Test
https://jira.springsource.org/browse/INT-3088
INT-3088 Add SFTP Support for PUT, MPUT
INT-3088 Polishing - PR Comments
INT-3088 Docbook For PUT/MPUT
Allows reply channel resolution after a message has been serialized
somewhere in a flow. Previously, the reply channel was lost.
With this change, the reply channel can be registered and the header
becomes a string (channel name) that can be serialized.
JIRA: https://jira.springsource.org/browse/INT-2269
INT-2269 Rename Registry to HeaderChannelRegistry
- Extract interface
- DefaultHeaderChannelRgistry
INT-2269 Polishing; PR Comments
- Add errorChannel registration as well.
INT-2269 HeaderChannelRegistry - Fix
The internal BridgeHandler in MessagingGatewaySupport did not have
a channel resolver. When a reply was explicitly routed to the gateway's
reply channel, the String representation of the reply channel could
not be resolved to a channel.
Set the BeanFactory on the bridge handler.
Add tests.
INT-2269 HeaderChannelRegistry - Fix JMS/Enricher
The JMS inbound gateway and ContentEnricher instantiate a
MessagingGatewaySupport internally it does not get a
reference to the BeanFactory. This means that the internal
BridgeHandler cannot resolve the String representation of
the reply channel to a channel.
Make ChannelPublishingJmsMessageListener BeanFactory aware, and
propagate the bean factory to the MGS.
Set the MGS bean factory in the ContentEnricher (which is already
BFA).
INT-2269: Polishing
Begin by refactoring `FileTransferringMessageHandler` to use
a `send` operation on RemoteFileTemplate.
Effectively transfer all properties from the adapter to the
template.
This will allow reuse of the send logic from the adapter in
the outbound gateway for `put` and `mput`.
JIRA: https://jira.springsource.org/browse/INT-3203