Commit Graph

9623 Commits

Author SHA1 Message Date
Gary Russell
7e8ad682f2 Add TCP Interceptor Test Diagnostics 2015-02-12 13:25:22 -05:00
Gary Russell
e974f55eae Remove IgnoredTestSuite in JMX
https://build.spring.io/browse/INT-B41-204/test/#ignored-tests

Inflates the 'ignored tests' count in Bamboo.
2015-02-12 11:56:23 -05: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
Artem Bilan
bc509da062 INT-3631: Fix package tangle for ScatterGatherH
JIRA: https://jira.spring.io/browse/INT-3631

In addition add logging and SOUT hooks for `EnableIntegrationTests` to have more info for investigation of failures on CI like
https://build.spring.io/browse/INT-MJATS41-JOB1-233
2015-02-11 09:51:20 -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
49b4957270 Fix Redis Synchronization Tests
The "transaction" synchronization tests use a `QueueChannel`.

The payload is a live reference to the Redis object.

It is possible that the test for the returned size occurs after
the "transaction" commits.

Change the tests to extract the size() on the poller thread so
that the size is always captured before the "transaction" commits.
2015-02-09 11:17:02 +02:00
Artem Bilan
046875de7f INT-3580: fix race condition for StompIntTests
JIRA: https://jira.spring.io/browse/INT-3580

The test `StompIntegrationTests#handleExceptionAndSendToUser` sends `SUBSCRIBE` and `MESSAGE` messages at once.
Since Spring Websocket support relies on the `ExecutorSubscribableChannel` for `clientInboundChannel`, there is no guaranty that messages are processed
with the same order as they have been sent.
From other side `UserDestinationMessageHandler` shifts messages to the `brokerChannel`, which is an another `ExecutorSubscribableChannel` with its own `Executor`.

Hence there is some race condition when the second message can be handled before the first one.

Add `check subscription` cycle to wait until the `SUBSCRIBE` message registers its subscription to the Broker.
And only after that send the `MESSAGE` message.
2015-02-08 11:34:03 -05:00
Tony Falabella
a7d325adc1 INT-3621: Add Namespace support for appendNewLine
JIRA: https://jira.springsource.org/browse/INT-3621

Polishing for code formatting and simple polishing to Docs
2015-02-05 15:38:35 +02:00
Tony Falabella
24beee9627 INT-3620: add appendNewLine to the FileWritingMH
JIRA: https://jira.spring.io/browse/INT-3620

Add `setShouldAppendNewLine(boolean shouldAppendNewLine)` method to the
`FileWritingMessageHandler` class.  Added similar test methods to the
`FileWritingMessageHandlerTests` class.

INT-3620: `appendNewLine` just only for `FileExistsMode.APPEND`

Also add `appendNewLine` for `File` payload

INT-3620: `appendNewLine` for any `fileExistsMode`
2015-02-02 17:24:07 +02:00
Gary Russell
64207eca14 Fix RedisLockRegistry Copyright Dates 2015-01-23 13:02:07 -07:00
Gary Russell
f85ee572dd Fix Schema Location in New Test 2015-01-14 11:09:27 -05:00
Gary Russell
763b751f20 Add JMS OG Stop/Start Tests
http://stackoverflow.com/questions/27935021/spring-batch-partitioning-with-permanent-queue-as-reply-channel/27944832#27944832
2015-01-14 10:37:19 -05:00
Artem Bilan
34c25a22fa INT-3606: Implement Closeable/Flushable
JIRA: https://jira.spring.io/browse/INT-3606

Change `LifecycleMessageSource` usage to use just `Lifecycle`
2015-01-13 15:32: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
6b7bbdc326 Bump Version to 4.2.0.BUILD-SNAPSHOT 2015-01-13 15:32:06 -05:00
Artem Bilan
6aaee67809 INT-3571-4.2: Propagate Lifecycle to the Target
JIRA: https://jira.spring.io/browse/INT-3571

* Deprecate `LifecycleMessageSource` and change `SourcePollingChannelAdapter` to get deal with `Lifecycle` directly
* Add `Lifecycle` propagation for the `MessagingMethodInvokerHelper` and its users: `MethodInvokingMessageProcessor`,
`ServiceActivatingHandler`, `MethodInvokingMessageHandler`, `MessageTransformingHandler` etc.
* Fix the bug with `MessagingAnnotationPostProcessor` and `Proxy` for the target object, when we should process annotation on the root method,
but create `MethodInvokingMessageHandler` for the method on the `Proxy`. Apply this logic only when `Proxy` is `JdkDynamic`, because of `CGLIB`
does `proxy-target-class`. In case of `JdkDynamicProxy` throw `IllegalArgumentException` if the method isn't extracted to the service interface.

Add `Lifecycle` tests for all endpoint types
2015-01-13 15:31:15 -05:00
Spring Buildmaster
de2c6d3ea0 [artifactory-release] Next development version 2015-01-13 11:35:17 -08:00
Spring Buildmaster
2f54b08685 [artifactory-release] Release version 4.1.2.RELEASE 2015-01-13 11:35:11 -08:00
Gary Russell
cd0c58aba3 INT-3607 Fix <transactional/> Docs
JIRA: https://jira.spring.io/browse/INT-3607
2015-01-13 14:09:05 -05:00
Gary Russell
2581388cc2 INT-3606: Implement Closeable/Flushable
JIRA: https://jira.spring.io/browse/INT-3606

Close the store when an (S)FTP synchronizing MessageSource is stopped.

Will need another commit on 4.2.WIP to change to `Lifecycle`.

Add dirty Flag to Properties MetadataStore

Avoid unnecessary persists.

Remove unnecessary implementation of `AbstractInboundFileSynchronizingMessageSource#getComponentType()`
2015-01-13 15:35:58 +02:00
Gary Russell
8896d500ed Fix Unreliable Redis Test
https://build.spring.io/browse/INT-B41-JOB1-187/test/case/155732315

Purge the list before testing.

Force `listening` to `false` so `rightPush` is called reliably.
2015-01-13 14:21:33 +02:00
Konstantin Yakimov
48f9801b5c INT-3604: Add transactionsfor RedisLockRegistry
JIRA: https://jira.spring.io/browse/INT-3604

There is no test-case to cover the issue, because it isn't so easy to emulate the network glitch between `setIfAbsent` and `expire`
2015-01-13 14:19:50 +02:00
Gary Russell
ec8e8cc3d5 INT-3602: Fix AMQP Direct ReplyTo Handling
JIRA: https://jira.spring.io/browse/INT-3602

Reworked to maintain compatibility with Spring AMQP 1.4.0.
2015-01-12 09:14:06 -05:00
Gary Russell
48ac9a16be INT-3602: Fix AMQP Direct ReplyTo Handling
JIRA: https://jira.spring.io/browse/INT-3602

Direct reply-to addresses can contain '/' (base64); need to use AddressUtils to
properly decode reply-to addresses.

Also suppress a test error in the Spring IO compatibility build until
Spring IO updates to spring-amqp 1.4.2.
2015-01-10 12:52:47 -05:00
Gary Russell
1ac1c734b3 Add Test for an Annotation Based Control Bus
http://stackoverflow.com/questions/27849211/spring-integration-control-bus-configuration-via-annotations/27850695#27850695

Remove `ThreadLocal`
2015-01-09 17:17:33 +02:00
Artem Bilan
703e69ff5c INT-3584: Introduce FileSplitter
JIRA: https://jira.spring.io/browse/INT-3584

INT-3584: Move `iterator` option to ctor

Polishing

- Javadocs
- Fix String payload (missing 'else')
- Support charsets other than the default
- throw MessagingException instead of RuntimeException
- Add more tests to cover all cases

INT-3584: Throw `MessageHandlingException`
2015-01-09 09:41:09 -05:00
Gary Russell
bc025745b9 INT-3598: Disambiguate MQTT Namespace Constructor
JIRA: https://jira.spring.io/browse/INT-3598

- Force the first two constructor args to be of type `String`.
- When no client factory, add one in the parser rather than selecing an alternate ctor.
2015-01-09 13:37:23 +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
b741b86f7e INT-3595: Rename setters for EERHandlerAdvice
JIRA: https://jira.spring.io/browse/INT-3595

The https://jira.spring.io/browse/INT-3554 introduced `Expression` setter variants for those component who accepted only String before.
Since SF `BeanDefinition` is based on the JavaBean specification there is guaranty for stable work when we have overloaded setters.

The `ExpressionEvaluatingRequestHandlerAdvice` has been missed to fix that requirement
2015-01-08 08:55:22 -05:00
Gary Russell
4e67714ad0 INT-3594: Add Another MQTT Converter Constructor
JIRA: https://jira.spring.io/browse/INT-3594

Add a constructor that just takes a `charset`; useful for inbound-only
converters.
2015-01-05 18:59:19 -05:00
Gary Russell
91e7d78884 INT-3592: Fix (S)FTP Gateway CTOR Visibility
JIRA: https://jira.spring.io/browse/INT-3592

CTORs were incorrectly `private` which is ok for XML
configuration, but not for DSL/Java Config.
2015-01-05 14:20:45 +02:00
Gary Russell
722bd3e348 INT-3590: Fix Router Documentation
JIRA: https://jira.spring.io/browse/INT-3590
2014-12-24 11:00:50 -05:00
Konstantin Yakimov
ad16ac51e9 Add the ability to point own local LockRegistry.
JIRA: https://jira.spring.io/browse/INT-3587

There is no ability to use own local LockRegistry to avoid overlapping of produced ReentrantLock objects, it can happens if used unique keys have same masked value for DefaultLockRegistry.

Add a constructor to allow the configuration of a lock registry with a differnt number of locks than the default.
2014-12-23 09:03:06 -05:00
Spring Buildmaster
c56ee449bc [artifactory-release] Next development version 2014-12-12 12:46:41 -08:00
Spring Buildmaster
e80f660d6d [artifactory-release] Release version 4.1.1.RELEASE 2014-12-12 12:46:24 -08: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
e6ffe7dfe1 INT-3579: AMQP Stop the Template if a Lifecycle
JIRA: https://jira.spring.io/browse/INT-3579

Implement `Lifecycle` in the AMQP outbound adapter and propagate
a `stop()` to the `AmqpTemplate` if it implements `Lifecycle`.

Delegate `isRunning()` to the `AmqpTemplate` instead of permanent `true`.
2014-12-12 19:22:49 +02:00
Gary Russell
af601c3096 INT-3578 Fix IllegalArgumentException
JIRA: https://jira.spring.io/browse/INT-3578

Adding `readDelay` to XML namespace for the `TcpConnectionFactoryFactoryBean`
caused an `IllegalArgumentException` when configuring with Java instea of
XML.

Polishing
2014-12-12 11:18:14 +02:00
Gary Russell
864cabcfe0 INT-3450 Support RFC 5424/6587 for SYSLOG
JIRA: https://jira.spring.io/browse/INT-3450

Use LinkedHashMap

- natural iteration order

INT-3450 Polishing - PR Comments

INT-3450: Polishing
2014-12-11 22:28:36 +02:00
Artem Bilan
1a4f98ac4c INT-3466: IMAP: Move peek Option to Properties
JIRA: https://jira.spring.io/browse/INT-3466

INT-3466 Add Docs
2014-12-11 14:54:46 -05:00
Artem Bilan
f89963dc9b INT-3575 TcpNetConnection: flush stream in send()
JIRA: https://jira.spring.io/browse/INT-3575
2014-12-11 19:09:12 +02:00
Artem Bilan
8ec4ab0355 INT-3576: Fix NPE in the RedisAvailableTests
JIRA: https://jira.spring.io/browse/INT-3576
2014-12-10 09:07:37 -05:00
Artem Bilan
3d43ad1aa9 INT-3560: Fix DelayHandler for Duplicate Messages
JIRA: https://jira.spring.io/browse/INT-3560

Previously, messages arriving at the delayer before the
the context was initialized would be emitted twice after
the context `refresh()` or a JMX invocation of `reschedulePersistedMessages()`.

When using a `SimpleMessageStore`, the "re" scheduled
message from the context refreshed event (or a JMX invocation)
would be re-handled unconditionally.

This was due to incorrect logic to handle the way the `SMS` stores messages.

Change the logic to correctly handle (ignore)  duplicate scheduled
releases when using `SMS`.
2014-12-09 18:23:42 -05:00
Artem Bilan
41dcd8a453 INT-3573: Fix EEvalSplitter for Iterator
JIRA: https://jira.spring.io/browse/INT-3573

Fix `seen` `Queue` `NPE` for `(S)FtpInboundRemoteFileSystemSynchronizerTests`:
https://build.spring.io/browse/INT-B41-JOB1-164/test/case/155357717

**Cherry-pick to 4.0.x**
2014-12-09 22:48:18 +02:00
Gary Russell
26dae7bae7 INT-3572: Improve Accept Once Filter Performance
JIRA: https://jira.spring.io/browse/INT-3572

Previously, a blocking queue was used to hold seen files; this was used to enable
FIFO when a max capacity is set.

When used with no capacity, a queue is not needed; also the `contains` operation
on a queue requires a linear search which does not scale well for a large number
of files.

Use a `HashSet` instead to significantly improve the `contains` performance.

Only maintain a queue if a max capacity is set.

Fix `AcceptOnceFileListFilterTests` to be compatible with Java < 8
2014-12-09 18:59:00 +02:00
Artem Bilan
4105c28c7e INT-3563: Add router's id to the MDException
JIRA: https://jira.spring.io/browse/INT-3563
2014-12-08 12:25:45 -05:00
Artem Bilan
8c89ea9969 INT-3568: Improve Endpoint Summary
JIRA: https://jira.spring.io/browse/INT-3568
2014-12-08 12:11:17 +02:00
Artem Bilan
dcb52f3e3b INT-3571: Propagate Lifecycle from SPCA to MS
JIRA: https://jira.spring.io/browse/INT-3571

**Cherry-pick to 4.0.x**

Introduce `LifecycleMessageSource` for `maint` versions to avoid undesired side-effects with already existing `... implements MessageSource<T>, Lifecycle`.
2014-12-05 19:06:04 +02:00
Gary Russell
3e08ca085b INT-3564 Update Javadoc URLs to spring.io
JIRA: https://jira.spring.io/browse/INT-3564

INT-3564 Update Javadoc Stylesheet for JDK8
2014-11-21 13:19:22 +02:00
Gary Russell
224eef3149 INT-3565 ClassCastException with Proxy and DEBUG
JIRA: https://jira.spring.io/browse/INT-3565

Cast to `IntegrationObjectSupport` fails if the handler is
already proxied in `AbstractSimpleMessageHandlerFactoryBean`.

INT-3565 Polishing

- Fix test.
- enhance test to show that directly bound message handler beans are not advised if already proxied.
2014-11-20 20:27:02 +02:00