JIRA: https://jira.spring.io/browse/INT-3778
* Add Namespace support for STOMP adapters
* Document the STOMP module
* Fix race condition in the `AbstractStompSessionManager`
* Add `handleTransportError` to the `StompInboundChannelAdapter` and `StompMessageHandler` to log errors during STOMP interactions
* Fix `StompMessageHandler` to handle `RECEIPT` in case of `RECEIPT` header existence, not the common `autoReceipt` option
which can be disable, but the `RECEIPT` header may be present in the message to send
* Increase logging level for the STOMP tests to trace sporadic failures on the CI Server
* Fix several typos
INT-3778: Doc Polishing
JIRA: https://jira.spring.io/browse/INT-3781
- Add mechanisms to set status code on an inbound gateway timeout.
- Send a message to the error channel if configured.
Polishing - Add failedMessage to MTE
Fix Schema Docs; Timeout Detection on Error Flow
Add Zookeeper Leadership Logs
Fix typo in the `SmartLifecycleRoleController`
JIRA: https://jira.spring.io/browse/INT-3683
* In addition fix `inputs` for the Gradle `generateSql` task and regenerate all SQLs
to apply the typo fix.
The previous way to generate sql scripts doesn't work properly. It is always as `UP-TO-DATE`.
Adding `inputs` to the `generateSql` show the correct behaviour.
From other side that makes `cleanSql` task as redundant.
* Applying the Travis config fix to this commit as well.
Fix HTTP test timeout
https://build.spring.io/browse/INT-B41-346
Fix `ProducerAndConsumerAutoStartupTests`
https://build.spring.io/browse/INT-B41-346
Fix `DelayerUsageTests` `time` bean scope bug
https://build.spring.io/browse/INT-B41-347
Fix `HttpInboundGatewayParserTests.java` generics Java < 8 compiler warnings
Increase Tomcat response timeout for WebSocket tests
https://build.spring.io/browse/INT-B41-349
Increase timeout in the `AsyncMessagingTemplateTests#executionException()`
Fix `ClassCastException` for the `StandardWebSocketClient#userProperties`
Increase Delay to 2 Seconds in DelayHandlerTests
JIRA: https://jira.spring.io/browse/INT-3723
Since `RequestMappingHandlerMapping` has reverted to `@RequestMapping` parsing,
restore the previous logic with `@RequestMapping` generation in the `IntegrationRequestMappingHandlerMapping`
Use `AnnotationUtils.synthesizeAnnotation` instead of direct annotation creation through the inline impl
JIRA: https://jira.spring.io/browse/INT-3687
* Change `master` to use IO 2.0 BOM for versions
* Upgrade `jsonPath` to `2.0.0`
* Fix `IntegrationRequestMappingHandlerMapping` according the latest MVC changes around CORS:
https://jira.spring.io/browse/SPR-12933.
* No yet any tests for `Global CORS`: waiting for Namespace support in MVC
Test this with:
```
./gradlew clean springIoCheck -PplatformVersion=2.0.0.BUILD-SNAPSHOT -PJDK8_HOME=<jdk8-home>
```
JIRA: https://jira.spring.io/browse/INT-3698
The `HttpRequestExecutingMessageHandler` added two internal `Converters` to the `ConversionService` before.
In case of parent-child environment it causes memory leak: closing of child context doesn't release
`HttpRequestExecutingMessageHandler` instances, because those internal `Converters` aren't `static`, hence bounded to outer instance.
Actually after introduction since `4.0` version to the `HttpRequestExecutingMessageHandler` the code like:
```
Assert.isTrue(expectedResponseType instanceof Class<?>
|| expectedResponseType instanceof String
|| expectedResponseType instanceof ParameterizedTypeReference,
"'expectedResponseType' can be an instance of 'Class<?>', 'String' or 'ParameterizedTypeReference<?>'.");
if (expectedResponseType instanceof String && StringUtils.hasText((String) expectedResponseType)){
expectedResponseType = ClassUtils.forName((String) expectedResponseType, ClassUtils.getDefaultClassLoader());
}
```
These converters are redundant.
In addition remove the `expected type` for the `uriVariablesExpression` evaluation to avoid `MapToMapConverter`.
**Cherry-pick to 4.1.x, 4.0.x**
INT-3698: Provide robust logic for the `uriExpression` and `httpMethodExpression`
Make some polishing around `Assert`s, when `IllegalStateException` must be presented instead of `IllegalArgumentException`
for the expression evaluation results.
Polishing
JIRA: https://jira.spring.io/browse/INT-3697
Since Spring Integration 4.0 the `MessageHeaders` had been moved to the Spring Messaging module
and `MessageHeaders.CONTENT_TYPE` had been changed from `content-type` name to the `contentType`.
Previously the automatic mapping of `contentType` to the HTTP Request `Content-Type` has been introduced
for the `HttpRequestExecutingMessageHandler`.
This fix do the same for the HTTP Response in case of HTTP Inbound Endpoint.
This allows to transfer HTTP headers automatically from underlying HTTP Outbound Endpoint for HTTP Proxy scenario.
The response from that external HTTP service maybe changed during a downstream flow before sending HTTP Response from the HTTP Inbound Endpoint.
Before this we was forced to map `contentType` to `Content-Type` manually or just rely on the `HttpMessageConverter`s.
**Cherry-pick to 4.1.x**
JIRA: https://jira.spring.io/browse/INT-3626
Remove Direct Array Usages.
With the increased use of java configuration and DSL, it
is no longer safe to directly use array arguments.
(Except in simple wrapper objects).
Avoid (or mark //NOSONAR) catch Throwable.
Remove unused field.
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
JIRA: https://jira.spring.io/browse/INT-3581
Move schemas to 4.2.
Add `selector-expression` to `<wire-tap/>`.
INT-3781: Fix What's New
Bump Namespace Version to 4.2
JIRA: https://jira.spring.io/browse/INT-3526
Previously, the URI in the exception message is the raw
URI with placeholders, if present.
Use the expanded URI in the message instead.
JIRA: https://jira.spring.io/browse/INT-1198
INT-1198: WebSocket: Add namespace support
Polishing components according to the namespace support experience
Parser for `<server-container>` and tests
INT-1198: Add parser tests for `<int-websocket:outbound-channel-adapter>`
Introduce `use-broker` on server side
Polishing according PR comments
`What's New` note
JIRA: https://jira.spring.io/browse/INT-3508
Before SI 4.0 and moving `MessageHeaders` to the Spring Messaging the `MessageHeaders.CONTENT_TYPE` had a value as `content-type`,
which was mapped to the HTTP Header `Content-Type` well.
Starting with SF 4.0 `MessageHeaders.CONTENT_TYPE` has a value `contentType`. It doesn't allow to map HTTP headers properly.
* Add `contentType` mapping logic to the `DefaultHttpHeaderMapper`, to map to the `Content-Type` HTTP header and vice versa.
* Fix bug in the `DefaultHttpHeaderMapper#toHeaders`: `ObjectUtils.containsElement` -> `containsElementIgnoreCase`.
Some HTTP servers can return `Content-Type` as `Content-type` or even `content-type`, although it is `Content-Type` anyway.
* Add test-case with `<int:object-to-json-transformer/>`, when the `application/json` value from `MessageHeaders.CONTENT_TYPE` is properly
mapped to the HTTP `Content-Type`. Prior to this fix we had to remap `MessageHeaders.CONTENT_TYPE` to the `Content-Type` manually using `<header-enricher>`
Reformat code
Use only `MessageHeaders.CONTENT_TYPE` for mapping to/from SI
Move `MessageHeaders.CONTENT_TYPE` logic to the `fromHeaders`
Performance Improvements
Remove toLowerCase() calls within loop of `shouldMapHeader()`.
Pre-build lower case versions of arrays.
JIRA: https://jira.spring.io/browse/INT-3461
To test it: `gradlew :spring-integration-http:testAll -PspringVersion=4.1.0.BUILD-SNAPSHOT`
INT-3461: Add CP condition for `rometools` into the `HttpRequestHandlingEndpointSupport`
INT-3461: Add CLASSPATH check for `RequestEntity` to determine the SF 4.1
JIRA: https://jira.spring.io/browse/INT-3458
* Change Spring AMQP to `1.3.5.RELEASE`
* `HttpRequestHandlingEndpointSupport`: remove `MappingJacksonHttpMessageConverter` registration
* `IntegrationRequestMappingHandlerMapping`: add 'fake' `name()` attribute to the inline `RequestMapping` annotation
* `StoredProcJmxManagedBeanTests`: remove `context.stop();` code, Since `MBeanExporter` deregister MBeans on `stop()` now
* `StoredProcPollingChannelAdapterParserTests`: change deprecated `ParameterizedSingleColumnRowMapper` to the `SingleColumnRowMapper`
* `Jms`: comment out the reflection code to check the value for the `recoveryInterval`, because it is removed already in favor of `backOff`
* `NotificationListeningMessageProducer`: move the start-up listener registration to the `onApplicationEvent`,
because `MBeanExporter` moved `registerBeans()` to the `start()` now.
The same `phase` might cause the issue, that MBeans aren't registered yet for `NotificationListeningMessageProducer`
* `JpaOutboundGatewayTests`: change `@TransactionConfiguration` to the `@Transactional`. Don't know why the first doesn't work now.
**Cherry-pick to 4.0.x**
INT-3458: Addressing PR comments
`NotificationListeningMessageProducer`: defer listener registration until `onApplicationEvent()`
JIRA: https://jira.spring.io/browse/INT-3374
`DefaultDatatypeChannelMessageConverter`
Move `getConversionService()` from `IntegrationContextUtils`
to `IntegrationUtils` in `support.utils`.
JIRA: https://jira.spring.io/browse/INT-2738
Add a `getComponentType()` method for all handlers,
message producers, and message sources that implement
`NamedComponent` (see `SPCA.getComponentType()`).
Add rome as an optional dependency - STS complained
because AtomFeedHttpMessageConverter has a dependency
on it.
JIRA: https://jira.spring.io/browse/INT-3323
Poller is internally supported in the bean definition of an http outbound gateway and outbound adapter, but it is not supported by their schema. This change attempts to fix the schema.
* Added in schema element for base poller, in both outbound adapter and outbound gateway
* Added in tests to ensure that a PollingConsumer is the instance type
* Polishing `import` for test classes
JIRA: https://jira.spring.io/browse/INT-3041
Add namespace support to simplify configuration of
a `RequestHandlerRetryAdvice.
INT-3041 Polishing; PR Comments
* Allow a retry-advice element within the request-handler-advice-chain
* Clean up schema (should not have allowed `synchronization-factory` on
the request-handler-advice-chain.
INT-3041 Polishing; PR Comment
This is still a work in process.
There are a bunch of TODOs in classes
that are not managed by Spring and so
need to have the MessageBuilderFactory
injected.
But I am looking for feedback on the
approach.
INT-3309 Resolve TODOs
Provide access to the MessageBuilderFactory in all classes.
INT-3309 Polishing + Tests
* Fallback to 'fromMessage()' if mutating and inbound message is not MutableMessage
* Add 'alwaysMutate' boolean to MutableMessageBuilderFactory - coerces 'fromMessage' calls to 'mutateMessage'
* Add tests
INT-3309 Polishing; PR Comments
Also add tests to parent/child contexts where the parent has the
default message builder and the child has a mutable message builder.
INT-3309 More Polish; PR Comments
Also fix removeHeader in MMB.
JIRA: https://jira.springsource.org/browse/INT-3284
* Introduce `IntegrationConfigurationBeanFactoryPostProcessor`, `IntegrationConfigurationInitializer`
* Apply `IntegrationConfigurationInitializer` and 'spring.factories' for HTTP and Security modules
INT-3284: Address PR's comments
JIRA: https://jira.springsource.org/browse/INT-3287
* Fix package tangle (INT-3287)
* Apply `IntegrationConfigurationInitializer` for `MBeanExporterHelper`
* Previously, there was a separate `ChannelSecurityInterceptorBeanPostProcessor`
for each `ChannelSecurityInterceptor` whereas now, there is one `ChannelSecurityInterceptorBeanPostProcessor`
that processes all interceptors
INT-3284 Refactoring around config package tangle
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.
JIRA: https://jira.springsource.org/browse/INT-3052
Add support of `ParameterizedTypeReference` as a result of
`expectedResponseTypeExpression` evaluation for
`RestTemplate.exchange` with `ParameterizedTypeReference` parameter
Now `expectedResponseTypeExpression` can be evaluated to `Class<?>`,
`String` and `ParameterizedTypeReference<?>`
JIRA: https://jira.springsource.org/browse/INT-3184
* Change `IntegrationRequestMappingHandlerMapping` to postpone
Handlers detection as late as possible using `ApplicationListener<ContextRefreshedEvent>`.
This is needed, because `RequestMappingInfoHandlerMapping#afterPropertiesSet()`
iterates over beans from `BeanFactory` to detect MVC Handlers. But at the same time
Integration Endpoints require `requestChannel` as dependency and those may be postponed
for `auto-creation` by `ChannelInitializer` - late-binding issue.
JIRA: https://jira.springsource.org/browse/INT-3184
* Change `IntegrationRequestMappingHandlerMapping` to postpone
Handlers detection as late as possible using `ApplicationListener<ContextRefreshedEvent>`