Commit Graph

91 Commits

Author SHA1 Message Date
Artem Bilan
2862c449c5 INT-4251: Add Initial Testing Framwork and Docs
JIRA: https://jira.spring.io/browse/INT-4251

MockIntegration PoC

Demonstrate how `MockIntegration.mockMessageSource()` can be used.
Even from the XML Config!
The same semantics can be applied for any other our mocking features we will add to the `MockIntegration`

Add `testMockMessageSourceDynamicFlow()`

Improve `MockIntegration.Context.instead()` for target bean type assertion

Some refactoring, improvements and JavaDocs

* Move `MockIntegration.Context` to its own `MockIntegrationContext` class
* Rename `@MockIntegrationTest` to `@SpringIntegrationTest` since we talk there not only about mocks, but any other possible testing feature for integration
* Add `@SpringIntegrationTest#stopEndpoints()` attribute for endpoints bean names patterns
* Add `IntegrationEndpointsInitializer` to customize `AbstractEndpoint`s according options from the `@SpringIntegrationTest`
Right now it is only about making them `autoStartup = false`

* Rename `SI-test` to `SI-test-support`
* Rename `SI-mock` to `SI-test`
* Rename `@SpringIntegrationTest#stopEndpoints()` to `noAutoStartup()`
* Fix JavaDocs according PR comments
* Increase timeouts in some sporadically failed tests
* Draft for the `testing.adoc`

Fixes spring-projects/spring-integration-java-dsl#23

Fix `testing.adoc` a bit

* Document Testing Support
* Fix a couple typos in the `xml.adoc`
* Add `package-info.java` files to `/test/` sub-packages

Improve docs according PR comments

Fix typos in `TestUtils` JavaDocs

Add `What's New` note about Java DSL and Testing support

Doc Polishing
2017-03-31 14:39:08 -04: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
Gary Russell
c8c8160e2d Sonar Fixes
https://sonar.spring.io/component_issues/index?id=org.springframework.integration%3Aspring-integration%3Amaster#resolved=false|severities=CRITICAL

Fix the only 2 code smells that Sonar deems "critical".
2017-01-11 10:35:56 -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
Gary Russell
f070de0b7e Sonar Fixes
https://sonar.spring.io/component_issues?id=org.springframework.integration%3Aspring-integration%3Amaster#resolved=false|types=BUG

In `IntegrationFlowRegistration` double check locking is ok for `inputChannel`
because we're assigning an existing object, but `MessagingTemplate` constructs
a new object for which double check locking doesn't work.

In any case, for both these items, the chance of concurrent access is extremely low
and is idempotent anyway, so remove double check locking.

Several inner classes can be static.

Other minor fixes.
2016-11-18 14:08:35 -05:00
Artem Bilan
ba576bbc0d ReactiveConsumer Improvements
* Add `ConsumerSubscriber` to adapt `Consumer<?>` to the `Subscriber<?>`
* Add `SubscribableChannelPublisherAdapter` to adapt `SubscribableChannel` to `Publisher<?>` via `Flux.create()` on subscription
* Add `PollableChannelPublisherAdapter` to adapt `PollableChannel` to `Publisher<?>` via `Mono.delayMillis()` and `flatMap()` for `channel.receive()`

Use `concatMap()` for `PollableChannel`

Iterate `PollableChannel` until there is a data

Fix Lambda signature error via explicit class declaration:
```
java.lang.ClassFormatError: Duplicate field name&signature in class file org/springframework/integration/endpoint/ReactiveConsumer$PollableChannelPublisherAdapter$1
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.springframework.integration.endpoint.ReactiveConsumer$PollableChannelPublisherAdapter.lambda$new$2(ReactiveConsumer.java:163)
```
Looks like Java bug:

Move `Iterator<Message<?>>` instance to the `subscribe()` to avoid race conditions when we have several subscribers.

In other words make `Iterator<Message<?>>` subscriber-specific, but at the same time avoid re-instantiation for each `Flux.concatMap()` call caused by the previous `repeat()`

Upgrade to Reactor 3.0.3 and others

* Make fixes according Reactor 3.0.3 changes
* Remove redundant `TestSubscriber` in favor of `StepVerifier` and `mock(Subscriber)`
* Rework `PublisherIntegrationFlow` Reactive Streams implementation to the out-of-the-box `ReactiveConsumer` and `ReactiveChannel`
2016-11-16 09:23:10 -05:00
Gary Russell
67d6cd0c89 Lambdas for Remaining Modules JPA -> ZK
Polishing - PR Comments and Closeable Warnings

Eclipse emits bogus warnings with exceptions in lambdas.
Even though the lambda might run on another thread, elipse thinks it could
cause the context to not be closed.

SPR-14854: MessageChannel is now a @FunctionalInterface

* Additional Lambda polishing and some code style fixes
2016-10-28 16:06:11 -04:00
Artem Bilan
12fb590b95 Mainly Checkstyle Violation Fixes
* Upgrade to Checkstyle `7.1`
* Relax `RequireThis` rule a bit. Right now it does the effort only in case of overlapping. See https://github.com/checkstyle/checkstyle/issues/2362 for more info
* Enable some annotation rules and provide fixes for violations
* Enable `tabs indents` rule. This was the biggest fix in this PR
* Resolve `TODO` in the `MessagingMethodInvokerHelper` and fix tests to meet `IllegalStateException` now

Remain Checkstyle version `6.16.1` and reinstate `RequireThis` rule

The latest Checkstyle has a bug with local scope variables if they have the same names as property.

Revert some literals splitting

Fix some line length exceeding and code style
2016-09-22 13:23:51 -04:00
Frank Sigalas
763547562c INT-4110: TestMailServer.ImapServer improve reply to FETCH ENVELOPE
JIRA: https://jira.spring.io/browse/INT-4110
2016-09-15 13:17:42 +03:00
Gary Russell
dfb6ab1e08 INT-4098: IMAP Content Rendering Consistency
JIRA: https://jira.spring.io/browse/INT-4098

Polishing - What's New

Schema Polishing

Also fix a test to align it with changes to the test mail server.
2016-08-23 12:20:25 -04:00
Gary Russell
c0ce6cee1d Move TestMailServer to spring-integration-test
JIRA: https://jira.spring.io/browse/INT-4022
2016-08-19 13:54:06 -04:00
Artem Bilan
d6045aa48b Fix Checkstyle violations 2016-08-18 14:32:46 -04:00
Artem Bilan
6ccad0daa8 Upgrades and fixes for compatibility 2016-08-18 12:42:06 -04:00
Gary Russell
ebbd28c415 INT-4083: RedisLockRegistryTests - Diagnostics
JIRA: https://jira.spring.io/browse/INT-4083
2016-07-29 11:11:57 -04:00
Gary Russell
ae0939d55f GH-1824: Comment Out HeapDumper in s-i-test
Resolves #1824
2016-06-07 09:18:23 -04:00
Gary Russell
9e092d44f7 INT-3996: Fix JdbcChannelMessageStore Javadoc
JIRA: https://jira.spring.io/browse/INT-3996

One of the query provider implementations was missing. To avoid a maintenance
nightmare, simply reference the interface's javadoc which lists all known
implementations.

* Simple `JdbcChannelMessageStore` JavaDocs polishing
* Add `LogAdjustingTestSupport` to the `StompIntegrationTests` to trace failures in the future.
* Also change the test `Start/Stop` messages to the `WARN` level in the `LogAdjustingTestSupport`, because `DEBUG` doesn't work everywhere.
Maybe some logging systems mix misconfiguration, like we have in the WebSocket modules with the Embedded Tomcat
2016-04-18 10:51:10 -04:00
Gary Russell
57f96bb759 checkstyle Misc Rules
checkstyle Nesting

checkstyle GenericWhitespace

checkstyle MethodParamPad

checkstyle NoWhiteSpace

checkstyle ParenPad Script

checkstyle ParenPad
2016-04-05 17:21:29 -04:00
Gary Russell
05cc7be644 checkstyle WhiteAround
WhiteAroundCheck script
2016-04-05 13:50:11 -04:00
Gary Russell
842aded9a4 checkstyle MutableException
checkstyle EmptyBlock

checkstyle fixRightCurly Script

checkstyle EmptyStatement

checkstyle RightCurly

checkstyle TailingWhite

checkstyle NeedBraces

Fix the line separator in the `fixRightCurly.gradle`
2016-04-05 13:10:33 -04:00
Gary Russell
43af472c3a checkstyle HideUtilityClassConstructor
https://sonar.spring.io/issues/search#componentRoots=org.springframework.integration%3Aspring-integration|createdAt=2016-04-01T10%3A00%3A36%2B0000|sort=UPDATE_DATE|asc=false
2016-04-01 16:18:28 -04:00
Artem Bilan
b5745af148 INT-3937: Deprecate Reactor Environment usage
JIRA: https://jira.spring.io/browse/INT-3937
2016-03-28 11:38:06 -04:00
Artem Bilan
ef40a939cf Add check header rule and fixHeaders task
Add "new line" in the header end

* Optimization for the `fixHeaders.gradle`
* Apply the `fixHeaders` for the affected classes
2016-03-07 15:08:51 -05:00
Artem Bilan
f7e04918c5 SocketUtils: Fix the multi port function for 0
https://build.spring.io/browse/INT-B43-47
2015-12-28 18:49:27 -05:00
Artem Bilan
287173bc67 Fix TCP tests to use 0 port
https://build.spring.io/browse/INT-MJATS41-495
https://build.spring.io/browse/INT-AT42SIO-16

Can be backported to `4.2.x` on demand
2015-12-28 18:22:07 -05:00
Gary Russell
d16cd9748c INT-799: Remove Core Deps from s-i-test
JIRA: https://jira.spring.io/browse/INT-799

Some test classes (e.g. `TestUtils`) were duplicated in core to avoid cyclic
dependency.

Now that core messaging has been moved to spring-messaging, it is possible
to remove the dependencies on `spring-integration-core` from `spring-integration-test`.

A few minor test cases have been moved to `spring-integration-core`.

The simple polishing to the `build.gradle` and `ServiceActivatorOnMockitoMockTests`
2015-12-07 20:39:00 -05:00
Gary Russell
79745c8b08 Add Debug for Amqp Channel Tests 2015-11-10 12:58:50 -05:00
Gary Russell
1849cda1c1 Extract LogAdjustingTestSupport
Also add test debugging to JmsOutboundGatewayTests.
2015-11-07 11:06:19 -05:00
Artem Bilan
0f689558ab INT-3792: Fix Some SONAR Vulnerabilities
JIRA: https://jira.spring.io/browse/INT-3792

* Remove `Serializable` requirement for `ThreadStatePropagationChannelInterceptor` generic type
* Increase `PriorityChannelTests` timeout
2015-08-05 14:20:08 -04:00
Gary Russell
7f504efa1b INT-3794: SocketUtils - Bind to Loopback Adapter
JIRA: https://jira.spring.io/browse/INT-3794

On OSX, if a server socket is in use on the loopback adapter, but not on others,
a BindException is not thrown; instead the socket is bound to other adapters.

This causes test failures because tests, generally, expect the socket to be bound to localhost.

Change SocketUtils to attempt to bind to localhost.

Polishing
2015-08-05 12:52:19 -04:00
Gary Russell
fd35d43aba INT-3784: Use acknowledge="transacted" by Default
JIRA: https://jira.spring.io/browse/INT-3784

Also

- suppress WARN log when priority mapping fails
- rework extract payload tests to use a single context

Make a new `JmsMessageDrivenEndpoint` as `private` because it makes sense only for XML `BeanDefinition` variant.
2015-07-31 17:41:31 -04:00
Artem Bilan
4cca684f36 INT-3789: Upgrade to SF 4.2 and other fixes
JIRA: https://jira.spring.io/browse/INT-3789

* Hazelcast -> `3.5.1`
* ActiveMq -> `5.11.1`
* Boon -> `0.33`
* Spring Security -> `4.0.2`
* Kryo -> `3.0.3`
* Fix missed polishing for the `Log4jLevelAdjuster` according required generics:
https://build.spring.io/browse/INT-MJATS41-348
* Fix `ImapIdelIntegrationTests` sporadic failure
* Fix `Kryo` Codec stuff according to the changes in the latest Kryo version
2015-07-31 13:19:28 -04:00
Artem Bilan
ec12b289c2 INT-3786: Fix Several Sporadic Test Failures
JIRA: https://jira.spring.io/browse/INT-3786

* Increase `receiveTimeout` for several `QueueChannel` and `CountDownLatch` based tests
* Fix `FileSplitterTests` for Windows compatibility - `UTF-8` for bytes conversion
* Make some STOMP tests as `LongRunning`

The next fixing phase
2015-07-30 15:28:02 -04:00
Gary Russell
448f9a52d2 Debugging for TCP FailOver Tests
Add LogLevelAdjuster; enable TRACE debugging for this test class.
2015-07-30 12:44:41 -04:00
Gary Russell
75a7b63350 Experimental: Support Gradle --parallel
This should be treated as experimental but with these changes it seems to build ok.

BUILD SUCCESSFUL

Total time: 5 mins 15.533 secs

It turns out that our sporadic Redis problems were fixed in a later version of Jedis.

The problem was that the `connection.subscribe()` exited immediately. When I started adding debug
logic, the problem went away (because I was using a newer versio of Jedis).

spring-data-redis 1.5.2 is updated to work with the 2.7.3 version of Jedis.

Polishing
2015-07-23 12:23:25 -04:00
Gary Russell
06ffc19b0b INT-3616: Zookeeper LockRegistry
JIRA: https://jira.spring.io/browse/INT-3616

Zookeeper implementation of `LockRegistry`, for example to support
clustered aggregators (when using external message group stores).

INT-3616: Polishing; PR Comments
2015-06-24 11:53:04 -04:00
Marius Bogoevici
8782d097cf INT-3691 Add ZookeeperMetadataStore
JIRA: https://jira.spring.io/browse/INT-3691

- create new core interfaces `ListenableMetadataStore` and `MessageStoreListener`;
- create new module `spring-integration-zookeeper`;
- add `ZookeeperMetadataStore` implementation

Polishing

Polishing

- moved classes into core/test where necessary, including conversion methods
- properly renamed `MetadataStoreListenerAdapter`
2015-06-17 13:54:35 -04:00
Gary Russell
195ee70568 INT-3632: Sonar Improvements
JIRA: https://jira.spring.io/browse/INT-3632

- Use Map.entrySet()
- Double check locking only works when the field(s) are volatile
- Remove unnecessary instanceof tests
2015-02-10 18:00:07 -05:00
Artem Bilan
00c404f383 INT-3492: Deprecate @Payload and @Header(s)
JIRA: https://jira.spring.io/browse/INT-3492

Since `@Paylod` and `@Header(s)` annotations are in the Spring Framework,
there is no more need to support them in Spring Integration.

Deprecate them and leave for backward compatibility.
Will be removed in future releases.

Remove deprecated Gatewa's `#method` expression evaluation context variable

Tested `gradlew clean testall` with and without changed to the tests.

INT-3492: Add `MessagingAnnotationUtils#findMassagePartAnnotation`

Move `MessagingAnnotationUtils` to the `org.springframework.integration.util` package
2014-08-23 12:25:20 -04:00
Artem Bilan
cedbf6edc2 INT-3418: Prepare 4.1 VERSION
JIRA: https://jira.spring.io/browse/INT-3418

* Create 4.1 XSD
* Clean up Docs for 4.1
* Prepare WebSocket module
* Add Reactor dependency
* Remove Eclipse and SNV artifacts

Phase #1: prepare

Conflicts:
	gradle.properties
2014-05-30 21:14:21 +03:00
Artem Bilan
f1cd5ede66 INT-3324: Simple refactoring to Routers
JIRA: https://jira.spring.io/browse/INT-3324

* Move `private` `ExpressionControlBusFactoryBean$ControlBusMethodFilter` class
to the `org.springframework.integration.expression.ControlBusMethodFilter`
to make it as convenient to use from JavaConfig
2014-03-13 14:41:00 -04:00
Gary Russell
776705e6c4 INT-3308 SubscribableChannel Optimization
JIRA: https://jira.springsource.org/browse/INT-3308

INT-3308 Move Optimization to AbstractDispatcher

- avoids the need for `canShortCutDispatcher()`
- optimizes all framework channels, including AMQP, JMS
- slight additional performance improvement

INT-3308 FinalSingleHandlerChannel

This is still a work in process.

TODO:Parser, parser tests.

See the DirectChannelTests for perforance results.

INT-3308 'Final' Channel Parser Changes, Tests

INT-3308 Polishing; PR Comments

INT-3308 Polishing

* Rename 'final' attribute to 'fixed-subscriber'
* Rename `BasicSingleFixedSubscriberChannel` to `FixedSubscriberChannel`

INT-3308 Polishing

* Rename test cases to match channel
* Fix parser error messages
* Add more exclusive attribute/element tests

INT-3308 More Polishing

* Remove remaining textual references to 'final'
* WARN log if the single subscriber has auto-startup="false"
* Handle the case when a fixed subscriber channel is declared after its handler
* Support the use of a fixed subscriber channel for elements created by an AbstractOutboundChannelAdapterParser
2014-03-06 13:28:08 +02:00
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
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
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
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
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
7dcd2b5fe9 Remove SI GenericMessage
- Deprecate for now to ease XD migration.
2013-10-24 09:46:30 -04:00
Andy Wilkinson
28ab8394de Build on top of Spring 4's new messaging types
This commit updates Spring Integration to depend upon Spring 4, making
use of the message types that have moved from Spring Integration into
Spring's new spring-messaging module.

The default message converter no longer supports conversion of a
message that is null, throwing an IllegalArgumentException if an
attempt is made to convert null. Furthermore, GenericMessagingTemplate
does not support sending null, again throwing an
IllegalArgumentException. Previously, MessagingTemplate had no-oped an
attempt to send null.

ConcurrentAggregatorTests and AggregatorTests both had a single test
that was specifically testing the behaviour of an aggregator that
returns null for its message. These tests have been removed.

CorrelatingMessageHandlerTests have been updated to specify some
additional behaviour for its mocks so that null messages are not
returned.

These are the only functional changes that have been made. All other
changes are simply for moving to the repackaged and/or renamed types.

In the move to being part of core Spring, a number of constants and
header accessor methods have moved from MessageHeaders to
MessageHeaderAccessor. This commit continues this pattern for
the enterprise integration headers that are specific to Spring
Integration. A new class, EiMessageHeaderAccessor, has been created.
This class provides constants and methods for working with SI-specific
headers. The main code and tests have been updated to use this new
class.
2013-10-08 16:42:22 -04:00