JIRA: https://jira.spring.io/browse/INT-3751
Result was null when `executeScript()` was invoked with non-null variables.
When variable are provided, the result variable is stored in the provided bindings.
JIRA: https://jira.spring.io/browse/INT-3744
MimeMessages are copied to eagerly fetch IMAP messages, this process loses
the `receivedDate` property.
Keep a reference to the source Message and delegate to its `receiveDate()`.
Cover more "void" getters
JIRA: https://jira.spring.io/browse/INT-3700
Change to calculate proper syndicate entry date for comparison when
adding feeds for processing.
I have signed and agree to the terms of the SpringSource Individual
Contributor License Agreement.
unit test for recent changes to FeedEntryMessageSourceTests to verify
proper last seen date calculation.
updates for comments from code review
* newline at EOF on atom.xml
* removed question from code
* fetch files via classpath instead of file system
* 'else' on newline
* authorship on class
Polishing
Conflicts:
spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedInboundChannelAdapterParserTests.java
Conflicts:
spring-integration-feed/src/main/java/org/springframework/integration/feed/inbound/FeedEntryMessageSource.java
spring-integration-feed/src/test/java/org/springframework/integration/feed/inbound/FeedEntryMessageSourceTests.java
JIRA: https://jira.spring.io/browse/INT-3669
Previously the `DelayHandler` incorrectly calculated a `delay` for values which are of the `Date` time.
It always used `new Date()` even for rescheduling for persisted messages.
* Fix `DelayHandler` to calculate `delays` against the `requestDate` of the delayed Message
* In addition fix the expression evaluation root object, when for rescheduling it was the message with `DelayedMessageWrapper` payload instead of original message.
**Cherry-pick to 3.0.x, 4.0.x, 4.1.x**
Conflicts:
spring-integration-core/src/test/java/org/springframework/integration/handler/DelayHandlerTests.java
Resolved
JIRA: https://jira.spring.io/browse/INT-3614
The `extractPayload` is present in the namespace support for `<int-jms:inbound-channel-adapter>`,
but nor `JmsInboundChannelAdapterParser`, neither `JmsDestinationPollingSource` take care of that value.
To be consistent with `<int-jms:message-driven-channel-adapter>` and documentation, introduce that option for
`JmsDestinationPollingSource` and populate it from the `JmsInboundChannelAdapterParser`.
Conflicts:
spring-integration-jms/src/main/java/org/springframework/integration/jms/JmsDestinationPollingSource.java
spring-integration-jms/src/main/java/org/springframework/integration/jms/config/JmsInboundChannelAdapterParser.java
spring-integration-jms/src/test/java/org/springframework/integration/jms/config/jmsInboundWithConnectionFactoryAndDestination.xml
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`.
Conflicts:
spring-integration-core/src/main/java/org/springframework/integration/handler/DelayHandler.java
spring-integration-core/src/test/java/org/springframework/integration/handler/DelayHandlerTests.java
JIRA: https://jira.spring.io/browse/INT-3565
Conflicts:
spring-integration-core/src/main/java/org/springframework/integration/config/AbstractSimpleMessageHandlerFactoryBean.java
Resolved.
INT-3565 Polishing
- Fix test.
- enhance test to show that directly bound message handler beans are not advised if already proxied.
Conflicts:
spring-integration-core/src/main/java/org/springframework/integration/config/AbstractSimpleMessageHandlerFactoryBean.java
Resolved.
JIRA: https://jira.spring.io/browse/INT-3545
Previously, the `DefaultHeaderChannelRegistry` was auto-started.
This caused the reaper to run and eventually start all the
`taskScheduler` threads, even if the registry was not being used.
- Defer the `start()` until the first channel is stored.
- Do not start the reaper if the bean has been explicitly stopped.
- Deprecate the implementation of `SmartLifecycle`.
Conflicts:
spring-integration-core/src/main/java/org/springframework/integration/channel/DefaultHeaderChannelRegistry.java
Resolved.
__cherry-pick to 3.0.x__
Conflicts:
spring-integration-core/src/test/java/org/springframework/integration/channel/registry/HeaderChannelRegistryTests.java
@Rule used a 10 second connection timeout.
Polishing
Conflicts:
spring-integration-mongodb/src/test/java/org/springframework/integration/mongodb/rules/MongoDbAvailableRule.java
Accept changes according to the current version of Mongo driver
JIRA: https://jira.spring.io/browse/INT-3536
The fix for opening multiple IMAP connections in the idle
adapter inadvertently removed the check for the store being
open.
Add `connectStoreIfNecessary()` and test case.
JIRA: https://jira.spring.io/browse/INT-3528
Use `min` and `max` methods instead of sorting an entire collection to get the minimum or maximum element.
Change other inline `Comparator<?>`s to the `final` fields
Conflicts:
spring-integration-core/src/main/java/org/springframework/integration/aggregator/AbstractCorrelatingMessageHandler.java
Conflicts:
spring-integration-core/src/main/java/org/springframework/integration/aggregator/AbstractCorrelatingMessageHandler.java
spring-integration-core/src/main/java/org/springframework/integration/aggregator/SequenceSizeReleaseStrategy.java
spring-integration-core/src/main/java/org/springframework/integration/config/GlobalChannelInterceptorProcessor.java
spring-integration-redis/src/main/java/org/springframework/integration/redis/store/RedisChannelPriorityMessageStore.java
JIRA: https://jira.spring.io/browse/INT-3501
There were several problems:
When a `Folder` is open, an activity on the `Store` opens a new
connection.
The `PingTask` called `isConnected()` on the store, creating a new
connection. The pings (NOOPs) were performed on this connection and
therefore did NOT cancel the `IDLE`.
In any case, the `IDLE` was issued on the folder not the store and
the only way to cancel that IDLE is to cause its `waitIfIdle()` to
be invoked. Conveniently, simply calling `isOpen()` invokes that
method and cancels the IDLE.
Finally, the `SimpleMessageCountListener` unnecessarily invoked
`message.getLineCount()` when a simple `folder.isOpen()` is
sufficient.
Fixes:
1. Do not invoke `openSession` if `this.folder` is not null.
2. Change the `PingTask` to simply invoke `isOpen()`.
3. Move the `PingTask to the receiver for a more efficient algorithm
instead of running on fixed interval. Rename it `IdleCanceler`.
4. Increase the PING timer from 10 to 120 seconds; add setters for it
and the `reconnectionDelay`.
TODO: Namespace support for 4.1. (Not to be back ported).
Add a test IMAP server (ported from Java DSL and enhanced to simulate IDLE
with a new message arriving for the first idle period.
INT-3501 Polishing - PR Comments
Polishing for `PoorMansMailServer` to get rid of `smtp` and `pop3` servers to avoid unnecessary Base64 dependency
Conflicts:
spring-integration-mail/src/main/java/org/springframework/integration/mail/ImapIdleChannelAdapter.java
spring-integration-mail/src/test/java/org/springframework/integration/mail/ImapMailReceiverTests.java
JIRA: https://jira.spring.io/browse/INT-3499
- Suppress (log) 'null' payload error when no correlation data
- Change tests to use a dedicated template for confirms/returns
Conflicts:
spring-integration-amqp/src/test/java/org/springframework/integration/amqp/config/AmqpOutboundChannelAdapterParserTests.java
src/reference/docbook/amqp.xml
Resolved.
Fixed hung assembler described in INT-3453.
Used CountDownLatch instead of sleep()
INT-3453 Add Test Case
Currently failing for me - assembler thread stuck on CDL.
Remove redundant `if (TcpNioConnection.this.writingLatch != null)` from `ChannelInputStream#write`
Conflicts:
spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpNioConnectionTests.java
JIRA: https://jira.spring.io/browse/INT-3433`
If a read fails due to insufficient threads, delay the read
for (default 100ms) - do not re-enable OP_READ until that
time has elapsed. Avoids spinning the CPU.
INT-3433 More Polishing
If the assembler couldn't execute a new assembler after assembling
the current message (when it detected there is more data), in the
finally block it would "continue" only if the socket was still
open.
The test case closes the socket after sending 4 messages so when
this condition occurred, the assembler failed to continue and
data was left in the buffer.
Remove the `isOpen()` check in the finally block and always continue
if there's not another assembler running and there's data available.
INT-3433 More Polishing
We can still get starvation if the selector is in a long
wait (in select()) when a read is delayed.
Whenever a read is delayed, wake the selector so its next
select will use the readDelay timeout.
INT-3433 Reference Docs
Also remove Thread.yield().
Revert redundant boolean return from `TcpNioConnection#checkForAssembler()`
Conflicts:
spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/AbstractConnectionFactory.java
spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioConnection.java
JIRA: https://jira.spring.io/browse/INT-3423
Consider a message containing "one one" and a splitter
with expression "payload.split(' ')", only one message
is emitted.
The default Collection created by SpEL is a HashSet.
Change the ExpressionEvaluatingSplitter to expect a
List instead of a Collection.
Conflicts:
spring-integration-core/src/test/java/org/springframework/integration/splitter/SpelSplitterIntegrationTests.java
JIRA: https://jira.spring.io/browse/INT-3410
When running a fixed thread pool with a bound queue,
and CALLER_RUNS execution rejection policy, it
was possible to deadlock the IO selector thread.
Add a `CompositeExecutor` to use different threads for
IO to those used for message assembly.
Add a `CallerBlocksPolicy` to block the invoking thread
(for a specified time) if the pool is exhausted.
Add documentation.
Polishing
Reference docs in preface mention Spring Integration compatibility with
Java 8, once it's released. Since Java 8 is released, the extra note is
no longer relevant and should be removed.
This patch removes no longer relevant note of pending Java 8 release.
JIRA: https://jira.spring.io/browse/INT-3400
JIRA: https://jira.spring.io/browse/INT-3355
Previously, the RedisAvailableTests unconditionally
flushed Redis; this is not appropriate and could affect
other builds on the CI server (as well as wiping out the
developer's Redis DB).
Change the tests to clean up their own redis data.
Conflicts:
spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisStoreInboundChannelAdapterIntegrationTests.java
spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisStoreOutboundChannelAdapterIntegrationTests.java
spring-integration-redis/src/test/java/org/springframework/integration/redis/rules/RedisAvailableTests.java
spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageGroupStoreTests.java
spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageStoreTests.java
Resolved.
JIRA: https://jira.spring.io/browse/INT-3346
An `@Id` field is required when MongoDB auditing
is enabled in the ApplicationContext.
This change does not make the document Auditable,
it just prevents an exception being thrown when
auditing is enabled.
Also add another control-bus test.
Conflicts:
spring-integration-core/src/test/java/org/springframework/integration/config/xml/ControlBusTests.java
Resolved.