Commit Graph

301 Commits

Author SHA1 Message Date
Gary Russell
051b393ed0 Prepare Master for 4.3
Reference to 4.3

Refactor `what's new` for 4.3
2015-11-17 12:12:49 -05:00
Gary Russell
4f648a7e4f INT-3818: Multipart Pass Through Converter
JIRA: https://jira.spring.io/browse/INT-3818

INT-3818: Fix Pre JDK8 Syntax

Polishing - PR Comments

Add author name
2015-09-03 21:00:56 -04:00
Artem Bilan
c86141cff7 INT-3813: HTTP module improvements
JIRA: https://jira.spring.io/browse/INT-3813
2015-09-01 12:50:44 -04:00
Artem Bilan
d89dabe72f INT-3778: STOMP Namespace and Documentation
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
2015-08-11 09:17:05 -04: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
9944e54ce5 INT-3781: Configure HTTP GW Timeout Status Code
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`
2015-07-24 18:37:26 -04:00
Artem Bilan
178c86faa4 INT-3683: Fix typo in schema.sql.vpp
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
2015-07-24 16:10:05 -04:00
Artem Bilan
0fdc63007a INT-3723: Fix HTTP Module for Recent SF Changes
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
2015-06-01 12:43:18 -04:00
Artem Bilan
acaf357d72 INT-3687: Fix CORS & upgrade to IO 2.0
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>
```
2015-05-18 08:58:22 +03:00
Artem Bilan
580ecddcc0 INT-3714: Add HTTP CORS Support
JIRA: https://jira.spring.io/browse/INT-3714

Docs and change Reactor dependency to `RELEASE`

AMQP -> `1.5.0.M1` and rebase

Doc Polishing
2015-05-08 11:31:41 +01:00
Artem Bilan
8f09a88f3c INT-3713: Fix HTTP Inbound with the latest MVC
JIRA: https://jira.spring.io/browse/INT-3713
2015-05-05 15:02:18 +01:00
Artem Bilan
6302c86fb8 INT-3709: Fix HTTP module according SF changes
JIRA: https://jira.spring.io/browse/INT-3709
2015-04-27 09:42:17 +01:00
Artem Bilan
2aac4414df INT-3698: HTTP MH: Remove Internal Converters
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
2015-04-16 15:26:23 +01:00
Artem Bilan
3e851d2e1b INT-3697: Map contentType to HTTP Response
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**
2015-04-13 13:58:26 +03:00
Gary Russell
632740d2cf INT-3626: More Sonar Fixes
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.
2015-02-11 18:12:48 -05: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
Gary Russell
15eb01169d INT-3581: Support selector-expression on WireTap
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
2015-01-13 15:32:06 -05:00
Gary Russell
113716effd INT-3526 Used Expanded URI In Exception Message
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.
2014-10-04 10:11:59 +01:00
Gary Russell
a7b5158f4a INT-3524 Fix Tooling MessageChannel References
JIRA: https://jira.spring.io/browse/INT-3524

A number of references (expected-type) still referred to
the Spring Integration 3.0 MessageChanel.
2014-10-03 07:55:23 +01:00
Artem Bilan
2587ed6bd0 INT-3518: Upgrade versions and some cleanup
JIRA: https://jira.spring.io/browse/INT-3518
2014-09-25 14:35:21 +01:00
Artem Bilan
b413239a83 INT-1198: WebSockets: Server Side
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
2014-09-04 17:27:31 -04:00
Artem Bilan
054f473287 INT-3508: HTTP: Map MessageHeaders.CONTENT_TYPE
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.
2014-09-03 14:38:36 -04:00
Artem Bilan
d0cf1a8080 INT-3488: Map Content-Disposition HTTP header
JIRA: https://jira.spring.io/browse/INT-3488

The `Transfer-Encoding` has been remained as unmapped for the `DefaultHttpHeaderMapper.inboundMapper()`
2014-08-19 14:15:53 -04:00
Artem Bilan
93be035cae INT-3447: HTTP-inbound: status-code-expression
JIRA: https://jira.spring.io/browse/INT-3447

Polishing
2014-07-07 15:03:00 -04:00
Artem Bilan
7b264e83f4 INT-3461: Add rometools Dependency for SF 4.1
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
2014-07-03 14:27:42 -04:00
Artem Bilan
c92d7a5da9 INT-3458: Compatibility with Spring Framework 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()`
2014-07-01 09:37:29 -04:00
Artem Bilan
f5145f531b INT-3418: Final Phase: Cleanup
INT-3418: use versioned XSDs for XSD import
2014-06-09 10:08:30 -04:00
Artem Bilan
77b31f58fd INT-3418: xsd-4.0 -> 4.1 2014-06-05 13:34:52 +03:00
Artem Bilan
c0ab912c49 INT-3418: xsd-3.0 -> 4.0 2014-06-05 13:34:41 +03:00
Artem Bilan
9e5e7514e0 INT-3418: xsd-2.2 -> 3.0 2014-06-05 13:34:30 +03:00
Artem Bilan
9bd441c8d0 INT-3418: xsd-2.1 -> 2.2 2014-06-05 13:34:19 +03:00
Artem Bilan
af1cd16027 INT-3418: xsd-2.0 -> 2.1 2014-06-05 13:33:57 +03:00
Artem Bilan
fa33f8f21d INT-3418: xsd-1.0 -> 2.0 2014-06-05 13:33:40 +03: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
Gary Russell
7dabf749c6 INT-3374 Fix Package Tangle; Part I
JIRA: https://jira.spring.io/browse/INT-3374

`DefaultDatatypeChannelMessageConverter`

Move `getConversionService()` from `IntegrationContextUtils`
to `IntegrationUtils` in `support.utils`.
2014-04-15 13:33:24 -04:00
Gary Russell
a7489909d7 INT-2738 Add Missing getComponentType() Methods
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.
2014-04-14 16:45:47 +03:00
Artem Bilan
35af66c364 INT-3350: Register IntRMHM, if Servlet is Present
https://jira.spring.io/browse/INT-3350
2014-04-02 10:03:21 -04:00
Artem Bilan
97c270c0e2 INT-3330 EnableIntegrationMBeanExport Annotation
JIRA: https://jira.spring.io/browse/INT-3330

INT-3330: Enable SpEL evaluation

INT-3330: Polishing for `MBeanExporterHelper`

INT-3330: Fix `errorChannel` early access

INT-3330: Polishing according PR comments

Polishing - copyrights, author, docs
2014-03-27 12:53:20 -04:00
Biju Kunjummen
98b46c61f3 INT-3323: Add poller element to HTTP-outbound
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
2014-03-13 09:41:35 +02:00
Gary Russell
1c9bcaccee INT-3041 Add Namespace Support For Retry Advice
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
2014-03-11 17:56:51 +02:00
Gary Russell
ff845b5069 INT-3309 Pluggable MessageBuilder
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.
2014-03-06 19:51:12 +02:00
Artem Bilan
ea080e8a9b INT-3284: Add 'spring.factories' Infrastructure
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
2014-02-06 11:58:23 -05: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
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
64cc1faafe INT-3052 RestTemplate with TypeReference for HTTP
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<?>`
2013-12-17 19:03:31 +02:00
Artem Bilan
73a104c955 INT-3184: Test HTTP Matrix Variables
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.
2013-12-17 11:32:46 -05:00
Gary Russell
075e331dcf Revert "INT-3184: Test HTTP Matrix Variables"
This reverts commit b607b6d3c9.
2013-12-17 11:32:28 -05:00
Artem Bilan
b607b6d3c9 INT-3184: Test HTTP Matrix Variables
JIRA: https://jira.springsource.org/browse/INT-3184

* Change `IntegrationRequestMappingHandlerMapping` to postpone
Handlers detection as late as possible using `ApplicationListener<ContextRefreshedEvent>`
2013-12-17 11:24:41 -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