Commit Graph

2293 Commits

Author SHA1 Message Date
Gary Russell
c45b708341 INT-3262 JDK8 Javadoc Commit
Increase receive timeout for `Jsr223TransformerTests#testInt3162ScriptExecutorThreadSafety`.

JIRA: https://jira.springsource.org/browse/INT-3262
JIRA: https://jira.springsource.org/browse/INT-3263
2014-01-15 19:16:37 +02:00
Gary Russell
b5bb4a6fc5 INT-3254: AMQP inbound-gateway: add reply-timeout
JIRA: https://jira.springsource.org/browse/INT-3254

Attribute was missing from the namespace causing issues
with long-running consumers with async handoff.

Also fix typo in http, ampq and core schemas.
2014-01-05 18:02:37 +02:00
Artem Bilan
acf2ad2229 INT-3246: MessageHandlingException Refactoring
JIRA: https://jira.springsource.org/browse/INT-3246

INT-3246: Add description to usage of MHException

Deprecate `MessageRejectedException` constructor

INT-3246: Remove `MessageHandlingException` class
2014-01-03 16:19:01 -05:00
Artem Bilan
0be6ade8f8 INT-3253: Eliminate EasyMock Dependency
JIRA: https://jira.springsource.org/browse/INT-3253

INT-3253 Polishing

Use the mockito test runner to initialize the mocks.
2014-01-03 12:54:41 -05:00
Artem Bilan
f9e0bef434 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 13:31:46 -05:00
Gary Russell
df492e18fa 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 10:46:14 -05:00
Gary Russell
ca0bddffbd INT-3245 Remove SI ChannelInterceptor
Replace with the same class from spring-messaging.

JIRA: https://jira.springsource.org/browse/INT-3245
2013-12-17 16:52:12 -05:00
Gary Russell
c2ee2161a1 INT-3242 Final Polish for 4.0.0.M2
- Rename EiMessageHeaderAccessor to IntegrationMessageHeaderAccessor
- Remove GenericMessage
- Minor TODOs
- Start a new What's new" chapter in the reference

JIRA: https://jira.springsource.org/browse/INT-3242
2013-12-17 14:38:36 -05:00
Artem Bilan
3d5a53d5d3 INT-3165: Deprecate Jackson 1.x Usage
JIRA: https://jira.springsource.org/browse/INT-3165

INT-3165 Polishing

Remove unnecessary SuppressWarnings.
2013-12-17 11:19:16 -05:00
Artem Bilan
ed4f443c4b INT-3156: Resolve deprecations according to SPR 4
JIRA: https://jira.springsource.org/browse/INT-3156

* Resolve `@SuppressWarnings("deprecation")` for HTTP, JDBC modules
* Remove `ParameterizedTypeReference`
* Add `@SuppressWarnings("deprecation")` to `HttpRequestHandlingEndpointSupport`
for `MappingJacksonHttpMessageConverter`
2013-12-17 12:54:50 +02:00
Artem Bilan
19aa52e510 INT-3160: IRMHM: Use Protected Method from Super
JIRA: https://jira.springsource.org/browse/INT-3160

Prior to SPR 4.0 `RequestMappingHandlerMapping#createRequestMappingInfo` was `private`.
So, there was reason to to use reflection in the `IntegrationRequestMappingHandlerMapping`
2013-12-16 15:31:34 -05:00
Gary Russell
e8843f3358 INT-3208 Create 4.0 Schemas
Update the spring.schemas files.

Update the version in the abstract namespace parser.

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

The following is a diff showing changes between the 3.0 and 4.0 schemas...

./spring-integration-amqp/src/main/resources/org/springframework/integration/amqp/config/spring-integration-amqp-3.0.xsd
12c12
< 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-core/src/main/resources/org/springframework/integration/config/xml/spring-integration-3.0.xsd
./spring-integration-event/src/main/resources/org/springframework/integration/event/config/spring-integration-event-3.0.xsd
11c11
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-feed/src/main/resources/org/springframework/integration/feed/config/spring-integration-feed-3.0.xsd
12c12
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-file/src/main/resources/org/springframework/integration/file/config/spring-integration-file-3.0.xsd
13c13
<                 schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
>                 schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-ftp/src/main/resources/org/springframework/integration/ftp/config/spring-integration-ftp-3.0.xsd
13c13
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
15c15
< 		schemaLocation="http://www.springframework.org/schema/integration/file/spring-integration-file-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/file/spring-integration-file-4.0.xsd" />
./spring-integration-gemfire/src/main/resources/org/springframework/integration/gemfire/config/xml/spring-integration-gemfire-3.0.xsd
./spring-integration-groovy/src/main/resources/org/springframework/integration/groovy/config/spring-integration-groovy-3.0.xsd
10c10
< 		schemaLocation="http://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core-3.0.xsd"
---
> 		schemaLocation="http://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core-4.0.xsd"
13c13
< 	<xsd:import namespace="http://www.springframework.org/schema/integration" schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 	<xsd:import namespace="http://www.springframework.org/schema/integration" schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-http/src/main/resources/org/springframework/integration/http/config/spring-integration-http-3.0.xsd
11c11
< 				schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 				schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-ip/src/main/resources/org/springframework/integration/ip/config/spring-integration-ip-3.0.xsd
12c12
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-jdbc/src/main/resources/org/springframework/integration/jdbc/config/spring-integration-jdbc-3.0.xsd
9c9
< 	<xsd:import namespace="http://www.springframework.org/schema/integration" schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 	<xsd:import namespace="http://www.springframework.org/schema/integration" schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-jms/src/main/resources/org/springframework/integration/jms/config/spring-integration-jms-3.0.xsd
14c14
< 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-jmx/src/main/resources/org/springframework/integration/jmx/config/spring-integration-jmx-3.0.xsd
9c9
< 	<xsd:import namespace="http://www.springframework.org/schema/integration" schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 	<xsd:import namespace="http://www.springframework.org/schema/integration" schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-jpa/src/main/resources/org/springframework/integration/jpa/config/xml/spring-integration-jpa-3.0.xsd
12c12
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-mail/src/main/resources/org/springframework/integration/mail/config/spring-integration-mail-3.0.xsd
14c14
< 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-mongodb/src/main/resources/org/springframework/integration/mongodb/config/spring-integration-mongodb-3.0.xsd
11c11
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-redis/src/main/resources/org/springframework/integration/redis/config/spring-integration-redis-3.0.xsd
11c11
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-rmi/src/main/resources/org/springframework/integration/rmi/config/spring-integration-rmi-3.0.xsd
14c14
< 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-scripting/src/main/resources/org/springframework/integration/scripting/config/spring-integration-scripting-3.0.xsd
8c8
< 		schemaLocation="http://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/scripting/spring-integration-scripting-core-4.0.xsd" />
./spring-integration-scripting/src/main/resources/org/springframework/integration/scripting/config/spring-integration-scripting-core-3.0.xsd
11c11
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
./spring-integration-security/src/main/resources/org/springframework/integration/security/config/spring-integration-security-3.0.xsd
./spring-integration-sftp/src/main/resources/org/springframework/integration/sftp/config/spring-integration-sftp-3.0.xsd
13c13
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
15c15
< 		schemaLocation="http://www.springframework.org/schema/integration/file/spring-integration-file-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/file/spring-integration-file-4.0.xsd" />
./spring-integration-stream/src/main/resources/org/springframework/integration/stream/config/spring-integration-stream-3.0.xsd
14c14
< 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-syslog/src/main/resources/org/springframework/integration/syslog/config/spring-integration-syslog-3.0.xsd
13c13
< 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd" />
15c15
< 		schemaLocation="http://www.springframework.org/schema/integration/ip/spring-integration-ip-3.0.xsd" />
---
> 		schemaLocation="http://www.springframework.org/schema/integration/ip/spring-integration-ip-4.0.xsd" />
./spring-integration-twitter/src/main/resources/org/springframework/integration/twitter/config/spring-integration-twitter-3.0.xsd
14c14
< 				schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 				schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-ws/src/main/resources/org/springframework/integration/ws/config/spring-integration-ws-3.0.xsd
14c14
< 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-xml/src/main/resources/org/springframework/integration/xml/config/spring-integration-xml-3.0.xsd
13c13
< 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 			schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
./spring-integration-xmpp/src/main/resources/org/springframework/integration/xmpp/config/spring-integration-xmpp-3.0.xsd
14c14
< 				schemaLocation="http://www.springframework.org/schema/integration/spring-integration-3.0.xsd"/>
---
> 				schemaLocation="http://www.springframework.org/schema/integration/spring-integration-4.0.xsd"/>
2013-12-16 13:04:18 -05:00
Gary Russell
2baea786b1 Merge remote-tracking branch 'upstream/master' into 4.0.0-WIP
Conflicts:
	build.gradle
	gradle.properties
	spring-integration-core/src/main/java/org/springframework/integration/config/RouterFactoryBean.java
	spring-integration-core/src/test/java/org/springframework/integration/channel/config/DispatchingChannelParserTests.java
	spring-integration-core/src/test/java/org/springframework/integration/gateway/GatewayProxyFactoryBeanTests.java
	spring-integration-core/src/test/java/org/springframework/integration/router/config/PayloadTypeRouterParserTests.java
	spring-integration-core/src/test/java/org/springframework/integration/transformer/MessageTransformingChannelInterceptorTests.java
	spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/ConnectionFactoryShutDownTests.java
	spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpNioConnectionReadTests.java
	spring-integration-ip/src/test/java/org/springframework/integration/ip/udp/DatagramPacketSendingHandlerTests.java
	spring-integration-ip/src/test/java/org/springframework/integration/ip/udp/MultiClientTests.java
	spring-integration-ip/src/test/java/org/springframework/integration/ip/udp/UdpChannelAdapterTests.java
	spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/StoredProcMessageHandler.java
	spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/StoredProcOutboundGateway.java
	spring-integration-jdbc/src/main/java/org/springframework/integration/jdbc/StoredProcPollingChannelAdapter.java
	spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/core/AbstractXmppConnectionAwareEndpoint.java

Resolved.
2013-12-16 11:02:40 -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
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
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
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
8dd9340f36 Fixes For Final Spring 4 Polishing
- MessageConverter moved
- MessagingException.failedMessage is immutable
- Cast needed on messagingTemplate.receive()
2013-12-06 15:22:01 -05:00
Gary Russell
feec3eaf84 Merge remote-tracking branch 'upstream/master' into 4.0.0-WIP
Conflicts:
	build.gradle
	spring-integration-amqp/src/main/java/org/springframework/integration/amqp/channel/AbstractSubscribableAmqpChannel.java
	spring-integration-core/src/main/java/org/springframework/integration/channel/ExecutorChannel.java
	spring-integration-event/src/main/java/org/springframework/integration/event/inbound/ApplicationEventListeningMessageProducer.java
	spring-integration-file/src/test/java/org/springframework/integration/file/recursive/FileInboundChannelAdapterWithRecursiveDirectoryTests.java
	spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpConnectionEventListeningMessageProducer.java
	spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/StoredProcOutboundGatewayWithNamespaceIntegrationTests.java
	spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/config/JdbcOutboundGatewayParserTests.java
	spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/config/StoredProcInvalidConfigsTests.java
	spring-integration-jms/src/main/java/org/springframework/integration/jms/SubscribableJmsChannel.java
	spring-integration-jpa/src/test/java/org/springframework/integration/jpa/outbound/JpaOutboundGatewayIntegrationTests.java
	spring-integration-redis/src/main/java/org/springframework/integration/redis/channel/SubscribableRedisChannel.java
	spring-integration-security/src/test/java/org/springframework/integration/security/SecurityTestUtils.java
	spring-integration-xml/src/main/java/org/springframework/integration/xml/selector/XmlValidatingMessageSelector.java

Resolved.
2013-12-06 14:23:23 -05:00
Gary Russell
116cedb3c6 Restore setDefaultChannel to MessagingTemplate
Synonym for the Spring setDefaultDestination for backward compatibility.
2013-12-05 09:24:56 -05:00
Gary Russell
7da027ad63 INT-3189 Fix JavaDocs
Links to classes moved to `spring-messaging`.

Also `MessageHeaders` was inadvertently added back in by the
last merge.

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

__NOTE: Merge to 4.0.0-WIP, not master__
2013-11-27 12:40:18 -05: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
Gary Russell
6fd8d1dba7 Update to Spring 4 Build Snapshot
- IdGenerator package change
- Generics added to CollectionUtils.arrayToList()
2013-11-26 09:28:41 -05:00
Gary Russell
48a005ec2a Use SI BeanFactoryChannelResolver
Resolve channel names in the HeaderChannelRegistry.

Add back MessagingTemplate (subclass of GenericMessagingTemplate).
2013-11-25 18:43:16 -05:00
Gary Russell
a24b9ffa22 Merge remote-tracking branch 'upstream/master' into 4.0.0-WIP
Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/gateway/MessagingGatewaySupport.java
	spring-integration-core/src/main/java/org/springframework/integration/support/channel/BeanFactoryChannelResolver.java
	spring-integration-core/src/main/java/org/springframework/integration/util/MessagingMethodInvokerHelper.java
	spring-integration-core/src/test/java/org/springframework/integration/config/AggregatorParserTests.java
	spring-integration-core/src/test/java/org/springframework/integration/config/annotation/AggregatorAnnotationTests.java
	spring-integration-core/src/test/java/org/springframework/integration/config/xml/ControlBusTests.java
	spring-integration-file/src/main/java/org/springframework/integration/file/DefaultFileNameGenerator.java
	spring-integration-file/src/main/java/org/springframework/integration/file/remote/handler/FileTransferringMessageHandler.java
	spring-integration-file/src/test/java/org/springframework/integration/file/remote/gateway/RemoteFileOutboundGatewayTests.java
	spring-integration-ftp/src/test/java/org/springframework/integration/ftp/config/FtpOutboundGatewayParserTests.java
	spring-integration-ftp/src/test/java/org/springframework/integration/ftp/inbound/FtpInboundRemoteFileSystemSynchronizerTests.java
	spring-integration-ftp/src/test/java/org/springframework/integration/ftp/outbound/FtpServerOutboundTests.java
	spring-integration-groovy/src/main/java/org/springframework/integration/groovy/GroovyScriptExecutingMessageProcessor.java
	spring-integration-http/src/test/java/org/springframework/integration/http/outbound/UriVariableExpressionTests.java
	spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/HelloWorldInterceptor.java
	spring-integration-jpa/src/test/java/org/springframework/integration/jpa/outbound/JpaOutboundGatewayIntegrationTests.java
	spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/store/MongoDbMessageGroupStoreTests.java
	spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/store/MongoDbMessageStoreTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests.java
	spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/SftpOutboundGatewayParserTests.java
	spring-integration-sftp/src/test/java/org/springframework/integration/sftp/inbound/SftpInboundRemoteFileSystemSynchronizerTests.java
	spring-integration-sftp/src/test/java/org/springframework/integration/sftp/outbound/SftpServerOutboundTests.java

Resolved.
2013-11-25 17:59:51 -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
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
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
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
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
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
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
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
ab99c943ab Merge remote-tracking branch 'upstream/master' into 4.0.0-WIP
Conflicts:
	spring-integration-ftp/src/test/java/org/springframework/integration/ftp/outbound/FtpServerOutboundTests.java
	spring-integration-jms/src/test/java/org/springframework/integration/jms/config/JmsMessageDrivenChannelAdapterParserTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests.java
	spring-integration-sftp/src/test/java/org/springframework/integration/sftp/outbound/SftpServerOutboundTests.java

Resolved.
2013-11-07 17:43:19 -05:00
Gary Russell
72dd39bccf INT-2898 Add Persistent FileListFilters
- Abstract implementation
- Implementation for the file system
- Implementation for remote files ((S)FTP)

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

INT-2889 Polishing

- Add (S)FTP test cases
- Docs
2013-11-07 17:31:45 -05:00
Gary Russell
7bc4fe2d0b INT-3047 SFTP Multiplex Over Single Connection
Enable the use of multiple JSch channels over a
single connection.

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

INT-3047: Polishing locks logic

INT-3047 SFTP Reset Cache; Quiesce Shared Sessions

Support resetCache() on the CachingSessionFactory
- reset a shared JSch session so it is reestablished on next use
- immediately close idle sessions
- close in-use sessions as they are returned
- close the channel when an SftpSession is closed and a shared JSch is being used
- physically close a shared JSch session only when the last channel is closed

Polishing

Forgot to save the ftp.xml.

Change CachedSession.epoch to created.

INT-3047 Polishing - PR Comments

- Also add missing docs for `preserve-timestamp`

INT-3047 Polish - PR Comments

Also change epoch to nanoseconds and use a simple != comparison with the
epoch in which a session was created.
2013-11-07 21:10:12 +02:00
Gary Russell
af98fbecc4 Fix Imports After Merge 2013-11-05 14:57:17 -05:00
Gary Russell
9146a374c1 Merge remote-tracking branch 'upstream/master' into 4.0.0-WIP
Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/MessageHeaders.java
	spring-integration-core/src/main/java/org/springframework/integration/context/IntegrationContextUtils.java
	spring-integration-core/src/main/java/org/springframework/integration/json/JsonToObjectTransformer.java
	spring-integration-core/src/main/java/org/springframework/integration/mapping/AbstractHeaderMapper.java
	spring-integration-core/src/main/java/org/springframework/integration/metadata/package-info.java
	spring-integration-feed/src/test/java/org/springframework/integration/feed/inbound/FeedEntryMessageSourceTests.java
	spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisInboundChannelAdapter.java
	spring-integration-redis/src/main/java/org/springframework/integration/redis/outbound/RedisPublishingMessageHandler.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisQueueMessageDrivenEndpointTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisQueueOutboundChannelAdapterTests.java
	spring-integration-test/src/main/java/org/springframework/integration/test/matcher/HeaderMatcher.java
	spring-integration-test/src/main/java/org/springframework/integration/test/matcher/MockitoMessageMatchers.java
	spring-integration-test/src/main/java/org/springframework/integration/test/matcher/PayloadMatcher.java
	spring-integration-twitter/src/test/java/org/springframework/integration/twitter/inbound/SearchReceivingMessageSourceTests.java
	spring-integration-twitter/src/test/java/org/springframework/integration/twitter/inbound/SearchReceivingMessageSourceWithRedisTests.java

Resolved.
2013-11-05 14:30:50 -05:00
Gary Russell
970852741d INT-3154/INT-3137 JavaDoc Formatting
INT-3154 Use SPR Java7 stylesheet to put a box around `<pre class="code"/>`
code.

Update `<pre/>` tags to include class="code".

INT-3137 Remove NOTICE from `JdbcChannelMessageStore`.

JIRA: https://jira.springsource.org/browse/INT-3137
      https://jira.springsource.org/browse/INT-3154
2013-11-05 14:59:27 +02:00
Gary Russell
87988b5032 INT-3064 Message ID Generation
Use the SPR 4.0.0 Message ID Generation algorithm.

JIRA: https://jira.springsource.org/browse/INT-3064
2013-11-04 18:45:21 -05:00
Artem Bilan
ce1f467793 INT-3017: Redis Queue Adapters: Namespace Support
JIRA: https://jira.springsource.org/browse/INT-3017

* Add parsers tests and integration tests
* Polishing Redis XSD
* Fix `JmsMessageDrivenEndpointParser` `LifeCycle` attributes
* Catch `RedisSystemException` after `this.boundListOperations.rightPop`.
It maybe an exception about 'connection closed'.
If the `RedisQueueMessageDrivenEndpoint` is 'active' this exception is rethrown,
otherwise just logged under error category.
* Add Redis queue components docs

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

INT-3017 Doc Polishing
2013-11-04 17:05:13 -05:00
Artem Bilan
5be8ef3fd8 INT-3147: (3167,3173,1941) Improve MetadataStore
Previously, `MetadataStore` couldn't be configured for Twitter Adapters
- only a global one could be used.
The `metadataKey` was generated automatically with a 'difficult' value.

* Register all `MessageSource` for `SourcePollingChannelAdapter`
as beans with id based on adapter id and prefix '.source' (INT-3147)
* Polishing parser to get rid of explicit `MessageSource` beans. (INT-3147)
* Make Feed and Twitter adapters `id` attribute as required -
now it presents a `metadataKey` for `MetadataStore` (INT-3147)
* Add to Twitter adapters a reference attribute for `MetadataStore` (INT-3173)
* Add Twitter adapters `poll-skip-period` attribute (INT-3167)
* Add and implement `MetadataStore#remove` (INT-1941)
* Make `MetadataStore` as `@ManagedResource` (INT-1941)
* Polishing tests

JIRAs:
https://jira.springsource.org/browse/INT-3147
https://jira.springsource.org/browse/INT-3167
https://jira.springsource.org/browse/INT-3173
https://jira.springsource.org/browse/INT-1941

INT-3147: Polishing and fixes

* add domain suffix to `metadataKey`
* change contract of `MetadataStore.remove`
* remove timeout window from `AbstractTwitterMessageSource`
* polishing and fix `SearchReceivingMessageSourceWithRedisTests`

INT-3147: Rebasing and polishing

INT-3147: fix 'metadata' package tangle

INT-3147 Doc Polishing
2013-11-04 12:44:12 -05:00
Gary Russell
1fb838dd1a INT-3190 Fix Package Tangle (JsonHeaders)
https://jira.springsource.org/browse/INT-3190
2013-11-04 17:34:45 +02:00
Mauro Franceschini
cd3f13ac91 INT-3193: Add ObjectToMapTransformer flatten attr
JIRA: https://jira.springsource.org/browse/INT-3193
2013-11-04 10:52:05 +02:00
Gary Russell
cd426d8b22 Fix Imports After Merge 2013-11-01 18:44:54 -04:00
Gary Russell
2bc0c442ce Merge remote-tracking branch 'upstream/master' into 4.0.0-WIP
Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/channel/registry/ChannelRegistry.java
	spring-integration-core/src/main/java/org/springframework/integration/channel/registry/LocalChannelRegistry.java
	spring-integration-core/src/main/java/org/springframework/integration/mapping/AbstractHeaderMapper.java
	spring-integration-core/src/main/java/org/springframework/integration/support/json/AbstractJacksonJsonMessageParser.java
	spring-integration-core/src/test/java/org/springframework/integration/channel/registry/LocalChannelRegistryTests.java
	spring-integration-core/src/test/java/org/springframework/integration/handler/ServiceActivatorDefaultFrameworkMethodTests.java
	spring-integration-jmx/src/test/java/org/springframework/integration/jmx/ServiceActivatorDefaultFrameworkMethodTests.java
	spring-integration-jmx/src/test/java/org/springframework/integration/jmx/config/OperationInvokingOutboundGatewayTests.java

Resolved.
2013-11-01 18:19:02 -04:00