Commit Graph

8185 Commits

Author SHA1 Message Date
Marcin Pilaczynski
8bf8caa22e INT-3883: UDP: destination and socket expressions
JIRA: https://jira.spring.io/browse/INT-3883

UDP Outbound Channel Adapter is able to use given UDP Inbound Adapters
server socket (outgoing packets will have source port same as incoming
packets destination port).

* Introduce `destinationExpression` instead of hard-coded `host/port` logic in the `DatagramPacketMessageMapper`
* Make `UnicastSendingMessageHandler.destinationExpression` mutually exclusive with `host/port` pair
* Move `socketExpression` to the setter as it is absolutely different option from the `destination`
* Make `UnicastSendingMessageHandler` expressions logic based on the `requestMessage`

INT-3883 Code review fixes.

Further polishing

Polishing according PR comments

Rework the String socket address logic just to the expected `URI` style.
Accept `2016` for changed classes.
2016-01-04 14:31:40 -05:00
Gary Russell
41c48548f1 Fix AsciiDoctor Conversion Problems 2016-01-01 11:25:42 -05:00
Artem Bilan
1bd955bef0 @Publisher and @Gateway JavaDocs
PR Comments

Additional info

Polishing
2015-12-30 13:13:01 -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
d71236ee76 (S)FTP Doc Polishing 2015-12-25 10:46:42 -05:00
Artem Bilan
66d02a6b95 Fix compatibility with IO Platform
https://build.spring.io/browse/INT-MJATS41-492

The SI-4.3 has been upgraded to openJpa-2.4.0 for Class Transformation on Java 8 support.
 The Spring IO is still on openJpa-2.3.0.
 Using version in the agent pattern isn't good idea to distinguish the proper jar, because IO does version re-mapping at runtime.
 Change the pattern to consider version as is, but don't match other openJpa jars (transitive required dependencies) in the classpath, e.g. `openjpa-persistence-jdbc` .
2015-12-24 11:13:03 -05:00
Artem Bilan
6e32deb60f Upgrade some dependencies for 4.3 2015-12-23 09:47:14 -05:00
Artem Bilan
59eb565296 Fix handler-advice.adoc
Cherry-pick to `4.2.x`
2015-12-22 18:16:25 -05:00
Gary Russell
6bc619dc22 INT-3921: SimplePollSkipAdvice
JIRA: https://jira.spring.io/browse/INT-3921

Polishing - PR Comments

Also increased some timeouts in JsonPathTests (and fixed a loop counter).
2015-12-21 14:37:23 -05:00
Gary Russell
ed874ea84a TCP ConnectionFactoryTests Race Condition
Wait for events.
2015-12-21 11:38:55 -05:00
Gary Russell
0458220756 TCP ConnectionFactoryTests Diagnostics
https://build.spring.io/browse/INT-SONAR-1582/
2015-12-20 16:07:01 -05:00
Artem Bilan
b7aa54a016 INT-2456: Polish http.adoc
JIRA: https://jira.spring.io/browse/INT-2456

Note: I don't see reason to extract separate paragraphs for gateway/adapter pairs.
2015-12-16 18:48:04 -05:00
Gary Russell
758a6bdab1 INT-3914: Add CompoundTriggerAdvice
JIRA: https://jira.spring.io/browse/INT-3914
2015-12-16 15:08:52 -05:00
Gary Russell
b5ec73b638 INT-3915: Possible Memory Leak in FileChannelCache
JIRA: https://jira.spring.io/browse/INT-3915

Close the redundant `FileChannel` when Map collision occurs.
2015-12-15 19:53:15 -05:00
Gary Russell
aca5646181 Retry Advice Test Polishing
Clean up and add test with recovery.
2015-12-15 19:49:58 -05:00
grafjo
52e690bc89 Fix sftp.adoc typos 2015-12-15 19:49:02 -05:00
Gary Russell
180ada63b0 INT-3912: TCP Server Listening Event
JIRA: https://jira.spring.io/browse/INT-3912

Polishing - PR Comments
2015-12-15 10:15:13 -05:00
Artem Bilan
471d08250d Add MulticastRule to Check the NIC for Tests
Add `skip` variable

Polishing

Tests failed after installing VirtualBox.

Further polishing to skip `vboxnet` NICs.

Also explicitly set the multicast socket `interface` (instead of `networkInterface`)
to address a specic IPAddress if a NIC has multiple bindings.

Add `@MulticastRule` to `DatagramPacketMulticastSendingHandlerTests` (separate into
new test file).

Fix tests to use the rule's NIC.
2015-12-14 18:17:27 -05:00
Artem Bilan
68c0df5286 INT-3911: Restore removed @Deprecated
JIRA: https://jira.spring.io/browse/INT-3911

Deffer the removal to `5.0`
2015-12-14 12:35:00 -05:00
Artem Bilan
8a82585121 INT-3908: Fix NPE in the AbstractAggrMGProcessor
JIRA: https://jira.spring.io/browse/INT-3908

**Cherry-pick to ALL**
2015-12-14 12:06:08 -05:00
Artem Bilan
ddcca027f1 RedisStoreTest: increase timeouts 2015-12-14 12:02:18 -05:00
Artem Bilan
69c98c4aad INT-3909 @Ignore ClientWebSocketContainerTests
https://jira.spring.io/browse/INT-3909
2015-12-14 11:37:28 -05:00
Artem Bilan
7da183f8ed INT-3834: Upgrade to Smack-4.1.5
JIRA: https://jira.spring.io/browse/INT-3834
2015-12-09 12:09:25 -05:00
Gary Russell
0fc1f555e7 Test FTP Server - Let OS Choose Port 2015-12-09 11:29:06 -05:00
Artem Bilan
c810aaae12 INT-3897: Fix deadlock in the StompMessageHandler
JIRA: https://jira.spring.io/browse/INT-3897

The `StompMessageHandler` synchronized on the `sessionHandler` during `connectIfNecessary()`
performing mutually exclusive connect operation in the `StompSessionManager`.
Since the last one synchronizes on all `sessionHandler`s during its own operations, we end up with the deadlock
waiting for the `connectSemaphore`.

Change synchronization monitor object to the `connectSemaphore` accomplishing the same desired mutually exclusive connect logic
in the `StompMessageHandler`.

**Cherry-pick to 4.2.x**
2015-12-09 10:50:53 -05:00
Artem Bilan
5bc3208096 INT-3832: Upgrade to JsonPath-2.1.0
JIRA: https://jira.spring.io/browse/INT-3832
2015-12-08 19:30:44 -05:00
Artem Bilan
cf528c0b5d INT-3665: Remove Deprecations and Resolve Issues
https://jira.spring.io/browse/INT-3665

Fixes according Travis report

Introduce `...ExpressionString(String)` setter

Some further fixes and polishing

Address PR comments
2015-12-08 16:48:29 -05:00
Artem Bilan
84fdd98428 INT-3904: Fix NPE in the JsonPropertyAccessor
JIRA: https://jira.spring.io/browse/INT-3904

When we use the same expression several times, the SpEL engine cache an `accessor` after the first use.
The next evaluation just bypass `canRead()` and in case of JSON that mean that we don't check that the income has the field or not.
For this case the `read()` must return `TypedValue.NULL` instead of just `null`.
2015-12-08 15:55:54 -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
5850022bfe Fix Python Scripting Javadoc 2015-12-07 15:48:57 -05:00
Gary Russell
255247ca9a Code Polishing (Sonar)
- remove redundant modifiers
- overridable methods called from ctors

Polishing - PR Comments
2015-12-07 15:39:13 -05:00
Gary Russell
ddb4321e1d INT-3900: Fix Doc
QOS > 0, not > 1.
2015-12-07 14:23:04 -05:00
Gary Russell
9fff767f71 INT-3900: MQTT: Don't Unsubscribe if !cleanSession
JIRA: https://jira.spring.io/browse/INT-3900

The message-driven adapter should not unsubscribe if `cleanSession` is
`false`.

INT-3900: MQTT: Changes for 4.3 Only

Doc Polishing
2015-12-07 14:10:24 -05:00
Gary Russell
e3d6f3fb6c INT-3884: Javadoc Fixes 2015-11-29 20:39:09 -05:00
Gary Russell
396b9146d2 JMS Test Polishing 2015-11-26 13:29:24 -05:00
Gary Russell
4ff19def3f Router Doc Polishing - Formatting 2015-11-26 12:14:00 -05:00
Artem Bilan
51b161ae4d INT-3534:MethodInvokingMLP Don't Copy Collection
JIRA: https://jira.spring.io/browse/INT-3534

Previously the `MethodInvokingMessageListProcessor` copied `Collection<Message<?>>`
in its `process()` method for the `delegate` to a new `Collection` unconditionally.

To improve performance, the collection is no longer copied unconditionally
in the `ExpressionEvaluatingMessageGroupProcessor`.

Also add an `important` note to the `aggregator.adoc` about the restriction with `unmodifiableCollection`.
2015-11-24 14:45:59 -05:00
Artem Bilan
15e2187fd2 INT-2787: Map correlationId to JMS Property
JIRA: https://jira.spring.io/browse/INT-2787

The `correlationId` is `UUID` object by default Framework behavior.
This type isn't allowed for JMS Message properties mapping.

Add the mapping for the `IntegrationMessageHeaderAccessor.CORRELATION_ID` header as a `String`,
since on the other side it simply can be converted to the `UUID` object back.
For example `AbstractCorrelatingMessageHandler` does that automatically on the correlation function using `UUIDConverter`.

The provided `SplitterAggregatorTests` demonstrates the scenario when we weren't be able to aggregate by the unsupported `UUID` type.

I don't consider this as back-port fix, because the same can be simply achieved with the custom `JmsHeaderMapper`.
From other side this fix maybe like some side-effect breaking change.

I don't consider any `UUID` message header as a candidate to be converted to String and mapped, because to do that unconditionally
may cause some undesired issues. From other side it can be done with the custom `JmsHeaderMapper` in the end-application.
2015-11-24 13:32:19 -05:00
Gary Russell
c0ca5a9b89 INT-3894: Polishing
Remove IPv4 from build.gradle.
Fix race for ackPort.
2015-11-24 11:35:43 -05:00
Gary Russell
b4218982da INT-3984: UDP: OS Selected Server Port
JIRA: https://jira.spring.io/browse/INT-3894

Allow UDP server port (and sender Ack port) to be selected by the operating system.

Also fix multicast tests to run on all platforms.

Change tests to use OS selected port.
2015-11-23 17:16:23 -05:00
Artem Bilan
1cc1b2ef79 INT-3895: Fix MonitorTests Race Condition
JIRA: https://jira.spring.io/browse/INT-3895

* `@Ignore` `DelayerUsageTests.testDelayWithCustomScheduler()` as very weak test. (We can consider it to remove at all: doesn't test anything from our side)
* Add `LogAdjustingTestSupport` diagnostic to the `OutboundGatewayFunctionTests`

Tentative commit to see more logs from Travis

Additional diagnostics

More STOMP Diagnostics
2015-11-23 15:02:10 -05:00
Gary Russell
fc0af2fed6 INT-3896: JMX: Fix Double Router MBean Export
JIRA: https://jira.spring.io/browse/INT-3896

Routers created by the `RouterFactoryBean` were not suppressed from being exported
by the context exporter when an `IMBE` is present.

Move the suppression logic to `postProcessAfterInitialization()` so the annotation on
the bean created by the factory bean is detected. The annotation is not detected on
the factory bean itself in `postProcessBeforeInitialization()`.
2015-11-21 13:07:02 -05:00
Artem Bilan
b621417380 INT-3893: UnicastReceivingChannelAdapter: fix NPE
JIRA: https://jira.spring.io/browse/INT-3893

Polishing

Send on the calling thread if the executor is shut down.
2015-11-20 10:52:07 -05:00
Artem Bilan
350355e362 Fix one more STOMP WebSocket test race condition
https://build.spring.io/browse/INT-B43-JOB1-7

We need to wait for the **real** `UNSUBSCRIBE` from server before go ahead.
2015-11-19 19:23:10 -05:00
Artem Bilan
e55a7b8234 Fix WebSocket tests the same way as STOMP before
See https://jira.spring.io/browse/INT-3888 and its PullRequest

Note: rework `StompIntegrationTests` logic to use SockJS Client (that was enabled on the server side before).
This helps us to use `sessionId` which is as a `user` key on subscription phase.
In case of Standard Tomcat WebSocket Client we end up with the race condition when both client and server uses the same
`static` variable in the `WsSession` class, so we can't determine the server session correctly by the id on the client side.
The subscribe/send/unsubscribe logic works well because we are based on the **web socket** for the session, independently of its id.
2015-11-19 18:11:35 -05:00
Gary Russell
73bc3fedf5 INT-3889: Fix AMQP PubSub Channel Test Race Cond.
JIRA: https://jira.spring.io/browse/INT-3889

The test case `pubSubLostConnectionTest` forces the connection closed and
then sends another message. It is testing recovery.

However, since the pub/sub queue is an auto-delete queue, we need to wait until
the new consumer is established and the queue exists, before sending the message after the test.
Otherwise, since the exchange is fanout, the message is simply dropped.

Also set `@DirtiesContext` on other tests.

Also remove non-tests.

I have __not__ removed the diagnostics because I don't believe this addresses AMQP-543.
2015-11-19 12:03:08 -05:00
Artem Bilan
c67cce1563 INT-3892: Make ExpRatioTests Thread.sleep()-free
JIRA: https://jira.spring.io/browse/INT-3892

 **Cherry-pick to 4.2.x**
2015-11-19 11:49:51 -05:00
Artem Bilan
c0d1277b55 INT-3888: Fix STOMP Test for Race Condition
JIRA: https://jira.spring.io/browse/INT-3888

Note sure yet what race condition we have in the `DefaultSubscriptionRegistry`,
but that looks for me better to follow with the standard `SubscriptionRegistry.findSubscriptions()`
to check subscription present, unless fail during `send()` because of `destinationLookup` early exit.

Fix for the `StompServerIntegrationTests`

Looks like we have to `reconnect()` for any `handleTransportError()` activity,
otherwise we are just hang in the Reactor's TCP reconnect loop without freeing resources
for other activities, e.g. start Embedded STOMP Broker.

Increase `receive` timeout in case of wait for the Broker Start
2015-11-19 08:55:13 -05:00
Gary Russell
f80c0db0df INT-3861: Mail Namespace Support for userFlag
JIRA: https://jira.spring.io/browse/INT-3861

Allow the custom `userFlag` to be configured using the namespace.

Polishing according PR comments
2015-11-18 18:12:00 -05:00