Commit Graph

7448 Commits

Author SHA1 Message Date
Artem Bilan
66f714e33a INT-3148: Add MetadataStore Chapter
JIRA: https://jira.springsource.org/browse/INT-3148

* Add a general chapter about `MetadataStore`
* Add cross-links between chapters on the matter of `MetadataStore`

Doc Polishing
2013-12-13 16:24:31 -05:00
Gary Russell
ef756bfd6d INT-3235 Make GatewayMethodMetadata Public
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.
2013-12-13 21:16:09 +02:00
Gary Russell
ced1a05df2 INT-3233 NIO, Windows 7 and Java 7/8
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
2013-12-13 20:50:32 +02:00
Gary Russell
50af153298 Update Default Spring Dependency to 3.2.6
Also usable with Spring 4.0.0 and 3.1.4.
2013-12-12 19:48:07 -05:00
Gary Russell
ec71247c9e INT-3043 Add Endpoint Quick Reference Table
JIRA: https://jira.springsource.org/browse/INT-3043

INT-3043: Polishing
2013-12-12 16:56:20 +02:00
Artem Bilan
2df3406c88 INT-3232: RedisQMDE: Polish Log Exceptions
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.
2013-12-11 17:26:49 -05:00
Oleg Zhurakousky
52f5f4ad77 INT-3230 Added support for 'load-balancer-ref' attribute
of the 'channel' element. Added tests and updated documentation

INT-3230 addressed PR comments
2013-12-11 20:47:10 +02:00
Gary Russell
d39b6870c4 INT-3221 Polishing
Remove unused import.

JIRA: https://jira.springsource.org/browse/INT-3221
2013-12-11 09:21:58 -05:00
Artem Bilan
369f0477f1 INT-3220,INT-3224: Fix Twitter & Channel docs
JIRA:
https://jira.springsource.org/browse/INT-3224
https://jira.springsource.org/browse/INT-3220
2013-12-11 09:18:07 -05:00
Artem Bilan
9971ace2ad INT-3221: Deprecate MessageTransformingCI
JIRA: https://jira.springsource.org/browse/INT-3221
2013-12-11 09:05:54 -05:00
Artem Bilan
c2004f1ab3 INT-3228: Remove Previous versions' Deprecations
JIRA: https://jira.springsource.org/browse/INT-3228

Remove elements that were deprecated in earlier
versions; see the migration guide for more information

https://github.com/spring-projects/spring-integration/wiki/Spring-Integration-2.2-to-3.0-Migration-Guide

INT-3228: Revert FileTransferMH#setTempDirectory
2013-12-10 09:21:04 -05:00
Artem Bilan
3e9d0158eb INT-3231: Fix Tail setters types for SPR 3.1.x
JIRA: https://jira.springsource.org/browse/INT-3231
2013-12-10 11:56:17 +02:00
Gary Russell
9c9c93479a INT-3223 Polishing
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.
2013-12-09 15:33:39 -05:00
Gary Russell
1a21dd172f INT-3223 Tail - Exclusive Attributes
JIRA: https://jira.springsource.org/browse/INT-3223

Disallow 'native-options' if any of the attributes
required for the Apache implementation are specified.
2013-12-09 21:25:58 +02:00
Artem Bilan
1a9f4bc947 INT-3219: Document Retry Exception Classification
JIRA: https://jira.springsource.org/browse/INT-3219

* Upgrade to Spring Retry 1.0.3
* Add a section to Reference Manual about Retry Exception Classification
2013-12-09 13:53:56 +02:00
Gary Russell
87d8e86297 INT-3227 Fix Race Condition for WARN Log
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.
2013-12-09 11:27:20 +02:00
Gary Russell
43226da62a Revert to 3.0.0.BUILD-SNAPSHOT 2013-11-27 10:09:08 -05:00
Spring Buildmaster
72cbefbdda [artifactory-release] Release version 3.0.0.RC1 2013-11-26 15:32:27 -08:00
Gary Russell
5f555e31b3 INT-3218 Spring 4 Compatibility
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.
2013-11-26 17:32:20 -05:00
Gary Russell
a08b033b7c What's New Polishing
Typos; add a comment about HTTP paths.
2013-11-26 14:25:09 -05:00
Gary Russell
4a3ba5abd0 INT-3217 Update Default Spring to 3.2.5
JIRA: https://jira.springsource.org/browse/INT-3217

INT-3217 Polishing

PR Comments

Also fixes some other warnings (mainly unused imports).
2013-11-26 19:27:58 +02:00
Artem Bilan
db32486d35 INT-3006: Resolve 'maxSubscribers' from INT Props
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
2013-11-26 11:35:16 -05:00
Artem Bilan
14c966c1fa INT-2562: JPA: Add 'flush' Operation
JIRA: https://jira.springsource.org/browse/INT-2562

INT-2562: Add 'flush-size' & 'clear-on-flush' attrs

INT-2562: Documentation

INT-2562: Polishing

INT-2562: Addressing PR's comments

INT-2562: Fix typos and JavaDocs
2013-11-25 11:07:03 -05:00
Gary Russell
34683bd560 INT-3216 MGS Reaper Improvements
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
2013-11-24 17:53:20 -05:00
Gary Russell
ee6ad2c256 Fix Redis Test - Wait for Container to Listen
https://build.springsource.org/browse/INT-B30X-312/
2013-11-23 15:42:59 -05:00
Gary Russell
b61de881c9 INT-2932 Tcp Event More Doc Polishing
JIRA: https://jira.springsource.org/browse/INT-2932

Add source (the TcpConnetion) to the property list.
2013-11-23 15:02:04 -05:00
Artem Bilan
87798b055f INT-2491: Scripting: Variables Improvements
JIRA: https://jira.springsource.org/browse/INT-2491

* Add support variables for 'inline' scripts
* Add convenient attribute `variables` for script tags
* Introduce `BeanFactoryFallbackBinding` for groovy scripts.

INT-2491: Polishing

* Add check for duplication of provided variables
* Tests and Docs

Polishing
2013-11-22 11:57:26 -05:00
Artem Bilan
a7cabc53b0 INT-3055: HTTP Outbound uri-variables-expression
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
2013-11-21 15:32:27 -05:00
Gary Russell
8ab65c6dd3 INT-3214 Event Adapter Stop All Events
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.
2013-11-21 21:37:16 +02:00
Artem Bilan
6a2583affd INT-2501: Set CI#autoCreate from INT properties
JIRA: https://jira.springsource.org/browse/INT-2501
2013-11-21 19:55:49 +02:00
Artem Bilan
d0501cda4d INT-3215: Redis: Squash ZSet tests to one
JIRA: https://jira.springsource.org/browse/INT-3215

Added fix for `RedisChannelParserTests#testPubSubChannelUsage()`
2013-11-21 13:49:28 +02:00
Gary Russell
2f0f676f48 INT-3213 Fix Package Tangle
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
2013-11-20 22:04:15 -05:00
Gary Russell
c04cfc668a INT-3143 Doc Polishing
JIRA: JIRA: https://jira.springsource.org/browse/INT-3143

Also increase the timeout on an event test.
2013-11-20 17:47:35 -05:00
Artem Bilan
d2bb90f7e0 INT-3143: Add ConfigurableMongoDbMessageStore
JIRA: https://jira.springsource.org/browse/INT-3143

INT-3143: Polishing, fixed and documentation

JIRA: https://jira.springsource.org/browse/INT-3077
2013-11-20 17:23:47 -05:00
Artem Bilan
225c0b4c9f INT-3085: Use RedisProperties for RMDStore
JIRA: https://jira.springsource.org/browse/INT-3085
2013-11-20 16:30:13 -05:00
Artem Bilan
afb369c0eb INT-2500: Add Support for Global Properties
`META-INF/spring.integration.properties`

JIRA: https://jira.springsource.org/browse/INT-2500
2013-11-20 15:58:13 -05:00
Artem Bilan
9c42a65e3c INT-3159: JPA: Add max-results Alias Attribute
JIRA: https://jira.springsource.org/browse/INT-3159

* Deprecate `max-number-of-results`
* Tests and Docs

Doc Polishing
2013-11-20 15:47:47 -05:00
Artem Bilan
405fce672b INT-3212: Fix Failed Tests From CI Builds
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.
2013-11-20 15:10:22 -05:00
Artem Bilan
6b50c49efe INT-3210: JDBC & JPA: Optimize SpEL Parsing
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`
2013-11-20 09:46:21 -05:00
Gary Russell
5bb6e550aa INT-3211 TCP Interceptor Events; Test Polishing
Intercepted TCP connections did not publish events.

TcpReceivingChannelAdapterTests did not close server factories after
tests.

Suppress 'no publisher' log messages.
2013-11-20 11:42:02 +02:00
Artem Bilan
945cb14407 INT-3199: Fix Inconsistency for Candidate Methods
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.
2013-11-19 17:27:56 -05:00
Gary Russell
703b24541f INT-3209 DefaultFileNameGenerator - SpEL Parsing
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.
2013-11-19 15:24:26 +02:00
Gary Russell
a7d4d57090 INT-2997 Document Endpoint Inner Bean Names
JIRA: https://jira.springsource.org/browse/INT-2997

.handler and .source
2013-11-19 13:23:54 +02:00
Gary Russell
adc20970d9 INT-2870/INT-2714 Document IP MessageHeaders
JIRA: https://jira.springsource.org/browse/INT-2870
JIRA: https://jira.springsource.org/browse/INT-2714

INT-2870: Polishing IP Headers Table for PDF
2013-11-19 13:21:14 +02:00
Gary Russell
59d6f7dfc1 INT-3088 (S)FTP Outbound Gateway - PUT and MPUT
- 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
2013-11-19 12:56:48 +02:00
Artem Bilan
88de8117aa INT-3140: Add #xpath() SpEL Function Support
JIRA: https://jira.springsource.org/browse/INT-3140

* Introduce `XPathUtils`
* Add `#xpath()` tests
* Add documentation

INT-3140: Polishing according PR comments

INT-3140 Polishing

- Doc and javadoc polishing
- Fix some compiler warnings (not all xpath)
2013-11-15 15:54:14 -05:00
Gary Russell
fa59b50bdc Fix Failing Test
Producer starts before consumer (same phase) with a fast poller.

Add negative phase to the consumer so he starts first.
2013-11-15 09:27:50 -05:00
Gary Russell
836c8e2556 INT-2269 Add ReplyChannelRegistry
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
2013-11-15 15:23:05 +02:00
Gary Russell
1d0c28852f INT-3204 RemoteFileTemplate Phase II Part 1
- AbstractInboundFileSynchronizer

INT-3204 RemoteFileTemplate Phase II, Part 2

- AbstractRemoteFileOutboundGateway
- Encapsulate Session.readRaw and .finalizeRaw in template.get()

INT-3204 Polishing - PR Comments

JIRA: https://jira.springsource.org/browse/INT-3204

INT-3204: Polishing
2013-11-15 15:13:57 +02:00
Gary Russell
d662e7ee42 INT-3203 Introduce RemoteFileTemplate
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
2013-11-11 17:53:50 -05:00