Commit Graph

7835 Commits

Author SHA1 Message Date
Gary Russell
f4e775ec18 INT-3646: Add TCP Server Exception Events
JIRA: https://jira.spring.io/browse/INT-3646

Publish `TcpConnectionServerExceptionEvent`s when unexpected
exceptions occur on server sockets.

INT-3646: Polishing
Fix Reactor tests
2015-02-18 20:17:45 +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
Gary Russell
b07686cdc0 INT-3636: JMX Eliminate Channel Metric Proxies
JIRA: https://jira.spring.io/browse/INT-3636

- Add `enableStats()` managed operation
- Delegate to a channel metrics object instead of using a proxy

INT-3636: Polishing; PR Comments

Change field name in `MBeanExporterHelper`.

INT-3636: Polishing
2015-02-17 13:55:33 +02: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
97c6726fdd Fix Redis Delayer Test
https://build.spring.io/browse/INT-MJATS41-JOB1-238/test/case/155714247

Perhaps a race in Redis; add delay.

Also add a delay between sends so the delays are scheduled in order.
2015-02-15 12:20:54 -05:00
Gary Russell
3f73dfc473 INT-3623: Fix Mail Test File Name
JIRA: https://jira.spring.io/browse/INT-3623

Tests don't run with case-sensitive file system.
2015-02-14 09:35:06 -05:00
Artem Bilan
2f6f269ed8 INT-3623: Make MailSendingMH More Generic
JIRA: https://jira.spring.io/browse/INT-3623

**Cherry-pick to 4.1.x**

INT-3623: Address PR comments
2015-02-13 11:01:49 -05:00
Stuart Williams
b63a8dc967 INT-3513: MutableMessage: Removes the use of DFA
JIRA: https://jira.spring.io/browse/INT-3513

Removing the `rawHeader` access by the `DFA` improves performance.
Tests are added to verify that `MutableMessageBuilderFactory` does
what it purports to, and that the `MutableMessageHeaders` is now
applied, permitting updates to individual headers.

change `@since` to correct/probable release version

INT-3513: Polishing
2015-02-13 11:01:54 +02:00
Gary Russell
9664d4f2fe INT-3634/3558 Fix NPE; Remove Deprecations
JIRA: https://jira.spring.io/browse/INT-3634
JIRA: https://jira.spring.io/browse/INT-3558
2015-02-13 10:55:31 +02:00
Artem Bilan
8c11d7a377 INT-3580: Polishing to the last STOMP tests fix
JIRA: https://jira.spring.io/browse/INT-3580

* Uncomment `org.springframework.integration.ip` category for the IP tests `log4j.properties`
* Since all tests in the `StompIntegrationTests` uses the same application context and therefore the same `SubscriptionRegistry`
the `waitForSubscribe()` should wait exactly for that `subscription` in which it is interested in.
The previous fix wasn't enough
2015-02-13 10:52:52 +02:00
Gary Russell
4286fc6b82 INT-3580: Fix More Stomp Test Race Conditions
JIRA: https://jira.spring.io/browse/INT-3580
2015-02-12 17:49:00 -05:00
Gary Russell
b7d64d12da Fix Race Condition in Test Interceptor (TCP)
The HelloWorldInterceptor (server side) set the
negotiated flag after sending the handshake back.
The next message could be received before the flag
was set and caused the test to fail.

Synchronize the server-side handshaking code so that
we don't start processing the next message before
the negotiated flag is set.

Leave the diagnostic log settings in place for now.
2015-02-12 17:00:29 -05:00
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