Commit Graph

7376 Commits

Author SHA1 Message Date
Artem Bilan
ee73515047 INT-3313: Fix JMS-outbound requires-reply Logic
JIRA: https://jira.springsource.org/browse/INT-3313

Previously, when `requires-reply="false"` on a `<jms:outbound-gateway/>`
a `null` reply caused a `MessageTimeoutException`, instead of quiet ending of flow.

Conflicts:

	spring-integration-jms/src/test/java/org/springframework/integration/jms/JmsOutboundInsideChainTests.java

Resolved.
2014-03-05 17:09:18 -05:00
Gary Russell
1de46a8bdd INT-3305 Fix SFTP Test Case
JIRA: https://jira.springsource.org/browse/INT-3305
2014-03-05 10:23:41 -05:00
Gary Russell
a6edf85f33 INT-3305 SFTP Close Session on Error
JIRA: https://jira.springsource.org/browse/INT-3305

Previously, if the channel can't be connected (e.g. if the server
does not support SFTP), the connection to the server remained open.

Close the session in the event of a failure.

Add test with the Apache SSHD server.
2014-03-05 16:28:13 +02:00
Gary Russell
00c0533004 INT-3298 WARN if RSFB Falls Back to SeqSizeRS
JIRA: https://jira.springsource.org/browse/INT-3298

Emit a WARN log whenever the `ReleaseStrategyFactoryBean`
falls back to using the `SequenceSizeReleaseStrategy`.

This will happen if no method name is provided and no
annotated method is found, or a null reference is provided.
2014-03-05 11:07:16 +02:00
Gary Russell
29bd9e981f INT-3310 Fix Syslog Error on Socket Close
https://jira.springsource.org/browse/INT-3310

Previously, the syslog adapter tried to convert the ErrorMessage
that results from a socket error to a syslog packet, resulting
in a stack trace on stderr.

Test for the ErrorMessage and log at DEBUG.
2014-02-25 11:08:47 +02:00
Artem Bilan
181b1b9c5f INT-3300: Fix MS ref Regression for i-c-adapter
JIRA: https://jira.springsource.org/browse/INT-3300

The change introduced by https://jira.springsource.org/browse/INT-3147
(Registration of `MessageSource<?>` as a bean with suffix `.source`) broke
the case where `MessageSource<?>` is a reference to an existing bean.

Add check to the `AbstractPollingInboundChannelAdapterParser` for the type
of `source` and apply the appropriate logic.

Conflicts:

	spring-integration-core/src/test/java/org/springframework/integration/config/ChannelAdapterParserTests.java

Resolved.
2014-02-21 18:20:29 -05:00
Gavin Gray
1eb501d272 INT-3290 Fix TCP Deserializer for 0 Length Message
ByteArraySingleTerminatorSerializer does not support multiple
subsequent terminators (zero length messages).

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

* Add unit test to verify bug.
* Fix bug.

Polishing:

* Remove test for `n >= 0`; n cannot be < 0 here
* Move test case to `DeserializationTests`
2014-02-07 13:32:35 -05:00
Artem Bilan
0087103488 INT-3285: Fix AMQP JsonHeaders Regression
JIRA: https://jira.springsource.org/browse/INT-3285

Spring Integration 3.0 introduced the `JsonHeaders` and populates them
from a request AMQP Message to the SI Message. In the case of the `AmqpInboundGateway` and
`JsonMessageConverter`, if the SI flow doesn't do anything with `JsonHeaders`
they are returned to the `AmqpInboundGateway` for reply Message
and may override correct values provided by `JsonMessageConverter` in the `DefaultAmqpHeaderMapper`.

This fix provides the check for headers from the reply Message's `MessageProperties`
and populates `JsonHeaders` if the `MessageProperties` doesn't contains the `__TypeId__` header already.

Note, it is just a fix for regression to restore previous behavior.
There is maybe a reason to revise (Another JIRA) all standard AMQP headers and populate them from SI `MessageHeaders`
in the `DefaultAmqpHeaderMapper`, only if they haven't been populated by `MessageConverter` before.

**Cherry-pick to 3.0.x**

Conflicts:

	spring-integration-amqp/src/test/java/org/springframework/integration/amqp/inbound/InboundEndpointTests.java

Resolved.
2014-02-07 10:43:35 -05:00
Artem Bilan
41808beb29 INT-3279-3.0.x: Fix class tangle
JIRA: https://jira.springsource.org/browse/INT-3279
2014-02-07 10:39:27 -05:00
Spring Buildmaster
42f5d14b92 [artifactory-release] Next development version 2014-01-31 02:06:47 -08:00
Spring Buildmaster
2d9c50b470 [artifactory-release] Release version 3.0.1.RELEASE 2014-01-31 02:06:39 -08:00
Gary Russell
ff90daf575 INT-3280 Fix SFTP Class Tangle
JIRA: https://jira.springsource.org/browse/INT-3280
2014-01-30 11:46:15 +02:00
Artem Bilan
1f45e00cc3 INT-3243: Postpone MVC Handlers Detection
JIRA: https://jira.springsource.org/browse/INT-3243

* Change `IntegrationRequestMappingHandlerMapping` to postpone
Handlers detection as late as possible using `ApplicationListener<ContextRefreshedEvent>`.
This is needed, because `RequestMappingInfoHandlerMapping#afterPropertiesSet()`
iterates over beans from the `BeanFactory` to detect MVC Handlers. But at the same time
Integration Endpoints require a `requestChannel` as a dependency and those may be postponed
for `auto-creation` by `ChannelInitializer` - late-binding issue.
2014-01-27 13:44:01 -05:00
Artem Bilan
124d8745c4 INT-3274: build.gradle: BUILD-SNAPSHOT condition
JIRA: https://jira.springsource.org/browse/INT-3274

* Add condition on `springVersion` to check `BUILD-SNAPSHOT` release category on version
and enable `libs-snapshot` repository

To allow CI plan to build with SF snapshots it's just enough to configure the Gradle option
`-PspringVersion=3.2.7.BUILD-SNAPSHOT`
2014-01-23 15:56:18 -05:00
Gary Russell
d1dfecdd1e INT-3237 Add 2014 Copyright; Fix What's New
JIRA: https://jira.springsource.org/browse/INT-3237
2014-01-21 12:16:06 -05:00
Artem Bilan
451ccb0e22 INT-3244 Fix RedisMEssageStoreTest Race Condition
JIRA: https://jira.springsource.org/browse/INT-3244

Conflicts:

	spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageGroupStoreTests.java

Resolved.
2014-01-21 09:55:58 -05:00
Gary Russell
01b51854d0 INT-3266 Java 6 Compiler Compatibility
- ((CachingSessionFactory<?>.CachedSession) session).dirty();
+ ((CachingSessionFactory.CachedSession) session).dirty();

Failed to compile with Java6 (compiles ok with Java7 with
sourceCompatibility=1.6).
2014-01-21 09:38:52 -05:00
Gary Russell
da4ec8f659 INT-3266 (S)FTP Close Dirty Cached Sessions
If an exception occurs on a session it should be physically closed
and not reused because its state is indeterminate and the next
operation might fail.

Note: The booleans within CachedSession do not need to be volatile
because it is a short-lived object only used by the current thread.

Also fixes the assertion message in RFT.get().

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

INT-3266 Polishing - PR Comments

Remove need for SuppressWarnings.
Fix 2 test cases where the exception has an additional cause.

Fix invalid `GenericMessage` import
Fix `e.getCause()` in `FtpServerOutboundTests` & `SftpServerOutboundTests` tests
2014-01-21 11:58:46 +02:00
Gary Russell
6df2e5b026 INT-3265 Stored Proc Debug Logging
Set up stored procedure name in `SimpleJdbcCall` before setting
up row mappers; previously the debug logg showed `[null]` for
the procedure name.

JIRA: https://jira.springsource.org/browse/INT-3265
2014-01-17 14:54:54 +02:00
Artem Bilan
2fb0707465 INT-3258: Reduce #xpath Missing Log Entries
JIRA: https://jira.springsource.org/browse/INT-3258
2014-01-09 15:13:31 -05:00
Artem Bilan
d4ade73cfb INT-3257 Make AggXmlMValidationEx more convenient
JIRA: https://jira.springsource.org/browse/INT-3257

Conflicts:

	spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XmlPayloadValidatingFilterParserTests.java

Resolved.
2014-01-07 09:41:51 -05:00
Gary Russell
28832d2cd6 INT-3252 Fix AlternativeJdkIdGenerator
JIRA: https://jira.springsource.org/browse/INT-3252

Remove the use of `SecureRandom.generateSeed()` which is not
supported on some platforms.

Note: While this change does not reflect the custom IBM
code noted in the JIRA issue, it does revert the initial
SecureRandom generation to use the same code as
UUID.randomUUID(), so the expectation is that this will
work fine on zOS.
2014-01-03 18:01:08 -05:00
Artem Bilan
91f6265344 INT-3240: i-c-a-parser: Fix gen. MessageSource Id
JIRA: https://jira.springsource.org/browse/INT-3240

Spring Integration 3.0 introduced registration of `MessageSource`s as beans
with an `id` based on the adapter `id` or, as a fallback, generated from
the `MessageSource` class name and the suffix `.source`.
But since that bean wasn't registered as a bean with the generated name (because the suffix was added),
subsequent elements get the same source bean name. This meant that
several anonymous `inbound-channel-adapter` with the same type (`file:`, `ftp:`, `twitter:` etc.)
caused an issue, when the same `MessageSource` bean was used by several `SourcePollingChannelAdapter` beans.

Fix the issue for fallback name generation by using the `SourcePollingChannelAdapterFactoryBean` class name.
Since that is registered, the source will always get a unique name, regardless of whether an id is provided.
2014-01-02 14:14:15 -05:00
Gary Russell
b0c70ab519 INT-3248 Suppress HeaderChannelRegistry Warning
Remove warning from BFCR if there is no HeaderChannelRegistry in
the bean factory. Change the log to DEBUG and remove the stack
trace.

Instead, update the Exception message when a channel name can't be
resolved to a channel to indicate that there is no registry.

JIRA: https://jira.springsource.org/browse/INT-3248
2013-12-21 19:31:38 +02:00
Spring Buildmaster
5ed110c2a0 [artifactory-release] Next development version 2013-12-15 15:15:04 -05:00
Spring Buildmaster
6573a68d6c [artifactory-release] Release version 3.0.0.RELEASE 2013-12-15 11:49:37 -08:00
Piotr Dyraga
484a4fac29 INT-2525 Add Connection as an HTTP Response Header
JIRA: https://jira.springsource.org/browse/INT-2525

INT-2525: Add test for 'Connection' header
2013-12-15 13:46:18 -05:00
Artem Bilan
7e94a3ecde INT-3149: Cleanup of the What's New
JIRA: https://jira.springsource.org/browse/INT-3149

* Add a note about `GatewayMethodMetadata`
* Squash several sections to one by type
* Reorder by importance/interestingness
* Remove a note about `MessagingException` for `RetryAdvice`,
as the last one doesn't wrap exceptions to `MessagingException` on each retry
2013-12-13 16:25:41 -05:00
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