Commit Graph

308 Commits

Author SHA1 Message Date
Marius Bogoevici
54a0d0c26a Zookeeper: use a single ZK instance in tests 2015-06-23 13:24:03 -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
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
Gary Russell
9a5062b510 Upgrade Spring Framework, Security Versions 2015-05-26 15:27:24 -04:00
Artem Bilan
9e4c7e00db INT-3685: Introduce STOMP Adapters
JIRA: https://jira.spring.io/browse/INT-3685

* Add `StompInboundChannelAdapter` to subscribe to STOMP destination and receive messages from them.
Destinations can be added/removed (hence subscribed/unsubscribed) at runtime.
* Add `stompMessageHandler` to the send messages to STOMP destinations.
* `destination` can be extracted from `MessageHeaders`, the `destination` and `destinationExpression` are also supported.
* `RECEIPT` Frame is also supported and emitted as `StompReceiptEvent`
* `StompExceptionEvent` is emitted when we have a `failure` for `CONNECT` Frame or as a reaction to the `ERROR` Frame.
* Introduce `StompSessionManager` abstraction to manage the single `StompSession` and allow to share it between different adapters.
* Add `WebSocketStompSessionManager` implementation over `WebSocketStompClient`
* Add `Reactor2TcpStompSessionManager` implementation for target Broker connections
* Add `StompHeaderMapper`

Address PR comments and JavaDocs

Polishing according PR comments

Polishing
2015-05-26 14:10:52 -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
5065a5a1d5 INT-3645/INT-3612: Upgrade JSch and Paho deps
JIRA: https://jira.spring.io/browse/INT-3645,
https://jira.spring.io/browse/INT-3612

**Cherry-pick to 4.1.x**
2015-05-08 00:01:19 +03:00
Stephane Maldini
78a8d713a3 INT-3644 Un@Ignore testReactorPersistentQueue
JIRA: https://jira.spring.io/browse/INT-3644
Update reactor dependencies
2015-04-22 23:32:53 +03:00
Artem Bilan
f410c4a21d INT-3704 Add Map ctor for SimpleMetadataStore
JIRA: https://jira.spring.io/browse/INT-3704

Some NoSQLs (e.g. Hazelcast) provide a distributed implementations for the `ConcurrentMap`,
so add `SimpleMetadataStore(ConcurrentMap<String, String> metadata)` to allow ot inject any `ConcurrentMap` implementation.
Demonstrate the support for Hazelcast in the `IdempotentReceiverIntegrationTests`

**Cherry-pick to 4.1.x**
2015-04-20 11:25:17 +01:00
Artem Bilan
aa43109009 INT-3702: Compatibility with Spring Security 4.0
JIRA: https://jira.spring.io/browse/INT-3702
2015-04-17 16:32:44 +01:00
Senthil Arumugam, Samiraj Panneer Selvam
d8f175edac INT-3666: Add MongoDbMetadataStore
JIRA: https://jira.spring.io/browse/INT-3666
2015-04-08 11:45:45 +03:00
Artem Bilan
f25a999ca5 INT-3686: CONNECTED & RECEIPT on WebSocket Client
JIRA: https://jira.spring.io/browse/INT-3686

Since `WebSocketInboundChannelAdapter` is positioned as an adapter for WebSocket client side as well,
the appropriate Server-side frames should be handler properly there, too, even if `StompSubProtocolHandler`
isn't designed for the client side usage.

* Add catch of the `CONNECTED` and `RECEIPT` STOMP message types to the `WebSocketInboundChannelAdapter`
* Emit `CONNECTED` as a `SessionConnectedEvent`
* Emit `RECEIPT` as a new introduced `ReceiptEvent`

**Cherry-pick to 4.1.x**

More coverage for the new events stuff
2015-04-03 18:58:04 +01:00
Andy Wilkinson
90e7491d79 Upgrade to Spring Web Services 2.2.1.RELEASE
This commit updates the version of Spring Web Services to
2.2.1.RELEASE. The fix for SWS-892 means that in the event of an
interceptor failing to handle a request, the request is no longer
sent. The interceptor in UriVariableTests has been updated to return
true, indicating that the request has been handled and should be
sent.

Conflicts:
	build.gradle
	spring-integration-ws/src/test/java/org/springframework/integration/ws/config/UriVariableTests.java
2015-03-31 17:43:30 +03:00
Artem Bilan
a60a8733cc INT-3689: Upgrade to Spring Data Fowler
JIRA: https://jira.spring.io/browse/INT-3689

Remove usage of deprecated `mongoTemplate.executeInSession`.
Since MongoDB doesn't provide the `member pinning` guarantee with `requestStart/requestDone`,
this feature has been removed in MongoDB 3.0: https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#what-happened-to-pinning
2015-03-31 11:14:28 +01:00
Gary Russell
056b17aaa7 INT-3197: Docs to AsciiDoc from DocBook
JIRA: https://jira.spring.io/browse/INT-3197

Polishing

Various glitches.

Fix Table of Contents

Polishing - Various Glitches

More Polishing

- Fixes for issues found by side-by-side comparison of htmlsingle output.

Fix Table Formats for PDF

More Polishing - PR Comments

More Polishing - Bad Titles

More Polishing

Work-Around for AsciiDoctor Problem

https://github.com/asciidoctor/asciidoctor/issues/1297

Use a blank line between includes rather than a comment
at the end of include files that end with a callout.

Remove Unresolved qName Entries

Fix Overview PDF Image Sizes

Highlight Schema Imports

More Image Fixes

INT-3197: Port DocBook Changes Since Conversion

Remove DocBook Files
2015-03-20 19:49:42 +02:00
Artem Bilan
75ff56962a INT-3655: Remove Reactor Function Usage
JIRA: https://jira.spring.io/browse/INT-3655

In addition, change `GatewayProxyFactoryBean` to the logic to ensure that the Reactor is really `optional`

INT-3655: Doc Polishing
2015-03-03 12:14:49 -05:00
Gary Russell
80a45715ac INT-3628: Use SchedulingAwareRunner for Long Tasks
JIRA: https://jira.spring.io/browse/INT-3628

Certain tasks in Spring Integration are long running. Indicate
so for the benefit of platforms such as WebLogic that can log warnings
for long running tasks otherwise.

Also fix conflicting versions of commons-io.
2015-02-28 15:16:07 +02:00
Gary Russell
29e65e68af INT-3657: Default MaxMessPerPoll=1 for @InboundCA
JIRA: https://jira.spring.io/browse/INT-3657

With XML/DSL, the MMPP defaults to 1 (via the SPCAFB) but
@InboundChannelAdapter defaulted to -1 (infinity).

Change the annotation to be consistent with the XML/DSL.

Add missing schema docs for the `basePollerType`.

* Fix `AbstractMethodAnnotationPostProcessor` for `maxMessagesPerPollValue` override
* Change `EnableIntegrationTests#foo()` `@InboundChannelAdapter` to use `maxMessagesPerPoll = "2"`
and modify appropriate test-case to be sure that `maxMessagesPerPoll` isn't overriden as it has been done in the original commit.
2015-02-28 14:45:06 +02:00
Artem Bilan
f248394682 INT-3589: Upgrade Dependencies
JIRA: https://jira.spring.io/browse/INT-3589, https://jira.spring.io/browse/INT-3624

* SF - 4.2. Fix Breaking changes for the `ApplicationEventPublisher`
* AMQP 1.5. Without issues
* Reactor - 2.0. Fix for the new `Stream` foundation
* jsonPath - 1.2.0. Fix for new `Predicate` abstraction. Add 'fail-fast error' to the `IntegrationRegistrar`
* Sshd - 0.13.0. Fix for new `VirtualFileSystemFactory` usage
* Spring Data - Fowler
* And others without issues
* Get rid of `reactor.util.StringUtils` usage

INT-3589: Address PR comments

Polishing
2015-02-17 15:09:09 -05:00
Gunnar Hillert
8c81cffd27 INT-3629: Upgrade to Gradle 2.3
JIRA: https://jira.spring.io/browse/INT-3629

Fix Sonar Build
`build.gradle` polishing
2015-02-16 16:26:43 +02:00
Gary Russell
c24a12d19b INT-3586: Map Consumer Metadata Headers
JIRA: https://jira.spring.io/browse/INT-3586

Map the consumer tag and queue `MessageProperties` to
Spring Integration headers.

Use reflection to detect presence of Spring AMQP 1.4.2, to avoid forcing a new Spring AMQP version.

Polishing
2015-01-08 19:53:31 +02:00
Artem Bilan
e53535635d Upgrade AMQP to 1.4.1 and SF to 4.1.3 2014-12-12 21:31:50 +02:00
Gary Russell
266af04bb6 Add BF Required to Test Builds
Previously, the environment variable that ensures all message creators have
a `BeanFactory` required setting the `SI_FATAL_WHEN_NO_BEANFACTORY` environment
variable to `true`.

Add this variable to `build.gradle`, enforcing the test for all builds.
2014-11-17 14:23:59 -05:00
Gary Russell
84b182162f INT-3531 Update to Spring Framework 4.1.2
JIRA: https://jira.spring.io/browse/INT-3531

INT-3531 Fix Stub AMQP Channel

Compatibility with 3.4.x amqp-client.
2014-11-11 17:47:40 +02:00
Gary Russell
6e81950236 Update Spring AMQP to 1.4.0.RC1 2014-10-23 14:49:23 -04:00
Artem Bilan
328bd68702 INT-3516 Fix JPA Build Error
https://build.spring.io/browse/INT-B41-121
2014-10-20 16:02:48 -04:00
Artem Bilan
5f9b04949e INT-3520: Add Reactor's PersistentQueue Support
JIRA: https://jira.spring.io/browse/INT-3520

INT-3520: Use `Condition` to wait items in the `Queue`

INT-3520: Reworking to the `Semaphore(0)`

* Implement 'artificial infinite wait'
* Add distributed test with infinite `receive()`

INT-3520: Correct usage of `Semaphore`

Minor Doc Polishing
2014-10-20 14:17:47 -04:00
Artem Bilan
a3d8776b5c INT-3516: Allow Optional<> in POJO Method Args
JIRA: https://jira.spring.io/browse/INT-3516

* Add `Optional<>` support for `@Header` in the `MessagingMethodInvokerHelper`
* Add `Optional<>` test-case
* Change `sourceCompatibility` for test to the Java 8

INT-3516: Revert SF version to 4.1.1

Add Docs on the matter

Fix WS Tests; Revert StubJavaMailSender
2014-10-20 09:02:06 -04:00
Gary Russell
c94a7cff2b INT-3531 Varargs for JavaMailSender
JIRA: https://jira.spring.io/browse/INT-3531

JavaMailSender now uses varargs instead of [].

Also, add spring-context-support as an optional
dependency to avoid reactor pulling in an old version into
the eclipse .classpath.

You cannot exclude transitive dependencies from optional
(reactor) dependencies.
2014-10-15 14:18:20 -04:00
Artem Bilan
252c53db4c INT-3527: WebSocket and 'o-c-a' Improvements
JIRA: https://jira.spring.io/browse/INT-3527

* `WebSocketInboundChannelAdapter` now handles `CONNECT` STOMP message and sends `CONNECT_ACK` message to the `WebSocketSession` immediately
* `ExpressionMessageProducerSupport` implementations now checks the result of `expression` and if it is a `Message<?>` it is sent to channel without creating a new one
which previously wrapped that `Message<?>` as the `payload`.
* Add `<script>` support to the `<outbound-channel-adapter>`
* Upgrade to the SF 4.1.1
* Add appropriate notes to the Docs
2014-10-14 11:38:44 -04:00
Artem Bilan
a5bddddac2 INT-3515: Fix Some WebSockets Issues
JIRA: https://jira.spring.io/browse/INT-3515

Change test suite to the Tomcat according IO

INT-3515: IllegalStateException for the `WebSocketInboundChannelAdapter`, when `useBroker = true`, but there is no Broker Relay in the Context
2014-09-25 15:15:37 +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
Gary Russell
3d32acf78c Update SPR 4.1, AMQP 1.4 M1, Retry 1.1.1 2014-09-04 16:45:44 -04:00
Artem Bilan
0b917622a6 INT-3504: Deprecate AmqpHeaders
JIRA: https://jira.spring.io/browse/INT-3504

* Deprecate `AmqpHeaders` and extend it from `org.springframework.amqp.support.AmqpHeaders` for backward compatibility
* Change AMQP dependency to `1.4.0`
* Remove usage of deprecated `spring_reply_correlation` and `spring_reply_to` AMQP headers
* Fix syslog `DefaultMessageConverter` JavaDoc

Reformat code
2014-08-28 08:48:33 -04:00
Andy Wilkinson
00a7b08c1d Use com.sun.mail:javax.mail for ReadableMime dependency
com.sun.mail:javax.mail is already part of the Spring IO Platform,
whereas com.sun.mail:mailapi is not.
2014-08-27 10:53:34 +01:00
Gary Russell
9766c8b4e7 Fix JavaMail Dependency
`ImapMessage` has a direct dependency on `ReadableMime`. It is
not clear why this started failing only on the MJATS41 build
but changing the `mailapi` dependency to `compile` fixes it
(tested by pointing the plan to my repo).
2014-08-23 14:45:57 -04:00
Artem Bilan
f84e798272 INT-3370: Add BoonJsonObjectMapper
JIRA: https://jira.spring.io/browse/INT-3370

* Add `BoonJsonObjectMapper`
* Provide some tests
* Remove deprecations
* Polishing test according removed deprecations
* Change `JsonObjectMapper#populateJavaTypes` to get deal with `payload`, not its `class`,
since we can't (and Jackson's `TypeFactory`, too) determine generic type from `Collection`.
Use `iterators` instead to retrieve the type from the first item.

Conflicts:
	build.gradle
	spring-integration-amqp/src/test/java/org/springframework/integration/amqp/support/DefaultAmqpHeaderMapperTests.java

INT-3370: Polishing according PR comments

* Apply Gary's polishing to the Docs
* Fix `RecipientListRouter` JavaDoc warn
* Fix typo in test name for `UdpUnicastEndToEndTests`
* Fix `RedisQueueOutboundChannelAdapterTests` do not use Jackson 1.x

Final Polish
2014-08-20 14:00:03 -04:00
Artem Bilan
d43b89dedc INT-2791 temp-channel-transacted for AMQP Channel
JIRA: https://jira.spring.io/browse/INT-2791

* Add `template-channel-transacted` attribute for the `<amqp:channel>`s to separate configuration for
container and RabbitTemplate
* Make container's `channelTransacted` as `false` by default
* Upgrade to `S-AMQP-1.4.0`
* Add `AmqpHeaders.PUBLISH_CONFIRM_NACK_CAUSE` according to the new `RabbitTemplate.ConfirmCallback#confirm` signature

Conflicts:
	src/reference/docbook/whats-new.xml

Conflicts:
	src/reference/docbook/whats-new.xml

INT-2791: Polishing

Upgrade to S-AMQP-2.0

Fix for mock publisher confirm/return tests, since `channel` is now physically closed, if the `ConnectionFactory` isn't `CachingConnectionFactory`
2014-08-19 15:43:17 -04:00
Artem Bilan
248c97098c INT-1197: Add Support for WebSockets: Client Side
JIRA: https://jira.spring.io/browse/INT-1197

INT-1197: Add JavaDocs and some polishing

Further changes

* Upgrade to SF 4.1
* Rename `SubProtocolHandlerContainer` to the `SubProtocolHandlerRegistry`
* Add `MessageConverter` support to the adapters
* Add `ClientWebSocketContainer.openConnectionException` to be thrown on `getSession` request
* Add `ClientWebSocketContainer.connectionLatch` to wait the connection establishing on first request.
Since the WebSocket connection process is run in the separate Thread, we need to wait it from the first `message send` do not lose the message, if connection hasn't been established yet.

INT-1197: Add `PassThruSubProtocolHandler`

Add `StompIntegrationTests`

INT-1197: Polishing according PR comments

INT-1197: Use SockJs from tests

Fix other detected vulnerabilities

INT-1197: `@Gateway` with `@MessageMapping` test

INT-1197: PR comments

Skip non `SimpMessageType.MESSAGE` to send to the `outputChannel` from `WebSocketInboundChannelAdapter`

Polishing
2014-08-18 12:02:35 -04:00
Artem Bilan
8ac4bfbd2c INT-3477: Add Reactor Promise<?> for Gateway
JIRA: https://jira.spring.io/browse/INT-3477

INT-3477: Fix `reactorEnvironment` propagation

* `MessagingGatewayRegistrar` parser the value for the `reactorEnvironment`
* Provide more interest test-case
* Polishing docs

INT-3477 Require `Environment` in case of Promise

* Do not use Reactor `Environment` as default instance.
* Require `Environment` reference, when is `Promise` method
* Polishing for tests
* Apply Gary's polishing for docs

INT-3477: Assert.notNull -> Assert.state

INT-3477: PR review
2014-08-18 09:53:28 -04:00
Gary Russell
d5b831d210 Remove Unnecessary Deprecation Suppression
Deprecated API usage has been removed from the affected modules.
2014-07-18 15:04:49 -04:00
Artem Bilan
34b257e3f2 INT-3448: Add @Async test for @Gateway
JIRA: https://jira.spring.io/browse/INT-3448

INT-3448: Addressing PR comments

Late Resolution of @Publisher.defaultChannel

Early resolution of the publisher default channel caused
`@ Configuration` factory beans to be instantiated before
Spring Integration bean post processors had been registered.

Use the channel name instead of channel reference and resolve
it when processing the first publish.

Merge branch 'INT-3448' of https://github.com/garyrussell/spring-integration into INT-3448

Conflicts:
	spring-integration-core/src/test/java/org/springframework/integration/configuration/EnableIntegrationTests.java

INT-3448: Polishing
2014-07-08 09:20:18 -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
Gary Russell
24680deeb4 INT-3451 AMQP - 'missing-queues-fatal' Attribute
JIRA: https://jira.spring.io/browse/INT-3451

Add `missing-queues-fatal` attribute to the AMQP
inbound endpoints and AMQP-backed channel.
2014-06-23 10:01:23 +03:00
Florian Schmaus
714db85681 INT-3383: Update to Smack 4.0.0
JIRA: https://jira.spring.io/browse/INT-3383

The family of Message.(set|get)Properties methods has been factored out
of Smack as an extra extension. Use JivePropertiesManager as replacement.

It is no longer necessary to supress Smack path warnings.

Delete custom smack-config.xml, as all it did was disabling
certain (important) SASL mechanisms. Also remove the unit test that
verified this.

Some unit tests mock ChatManager and Chat for no reason, delete
those lines.

XMPPConnection.getHost() and .getPort() are only valid after the
connection got established, due the fact that those information is
often only available after a DNS SRV lookup was performed. Remove the
lines in unit tests that verified their value.

Remove the truststorePath example in documentation, since Smack 4.0 no
longer provides support for providing a custom truststore. Instead
ConnectionConfiguration in Smack 4.0 allows to set a custom SSLContext
(which then again can provide a TrustManager that uses a custom
truststore).
2014-06-17 15:56:19 +03: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
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