Commit Graph

7451 Commits

Author SHA1 Message Date
Artem Bilan
fa808faece Upgrade to Gradle 2.14 for CI server compatibility 2016-12-23 12:57:00 -05:00
Artem Bilan
1f5f119442 INT-3950: Fix Aggregator documentation
JIRA: https://jira.spring.io/browse/INT-3950

Previously there was a mention of the `MessageGroupStore.expireMessageGroup(groupId)` which just doesn't existing
in the Framework and never has been there.

* Fix the documentation for the existing `MessageGroupStore.expireMessageGroups(timeout)`.
Although the mention there of `Control Bus` requires to have `@ManagedOperation` on the method.

* Add `@ManagedOperation` for the `MessageGroupStore.expireMessageGroups(timeout)` and confirm with the test-case: `AggregatorWithMessageStoreParserTests`
* Fix the same docs in the XSD for `<aggregator>`
* Fix other typos in the `aggregator.adoc` and `resequencer.adoc`

Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/store/AbstractMessageGroupStore.java

Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/store/AbstractMessageGroupStore.java
	src/reference/asciidoc/aggregator.adoc
	src/reference/asciidoc/resequencer.adoc

Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/store/AbstractMessageGroupStore.java
	spring-integration-core/src/main/java/org/springframework/integration/store/MessageGroupStore.java
	spring-integration-mongodb/src/main/java/org/springframework/integration/mongodb/store/ConfigurableMongoDbMessageStore.java
2016-02-08 12:24:16 -05:00
Gary Russell
32981ded89 INT-3915: Possible Memory Leak in FileChannelCache
JIRA: https://jira.spring.io/browse/INT-3915

Close the redundant `FileChannel` when Map collision occurs.
(cherry picked from commit b5ec73b)
2015-12-15 19:59:58 -05:00
Artem Bilan
88eb7894de INT-3908: Fix NPE in the AbstractAggrMGProcessor
JIRA: https://jira.spring.io/browse/INT-3908

**Cherry-pick to ALL**
2015-12-14 13:00:05 -05:00
Artem Bilan
4606954cd2 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 16:13:41 -05:00
Artem Bilan
65e2430079 INT-3503 equals & hashCode for ToStringFriendlyJN
JIRA: https://jira.spring.io/browse/INT-3503

**Cherry-pick to 4.0.x**

PR Comments and test
2015-12-08 16:13:06 -05:00
Artem Bilan
be4fd62cea 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.

Conflicts:
	spring-integration-ip/src/test/java/org/springframework/integration/ip/udp/UdpChannelAdapterTests.java
Resolved.
2015-11-20 11:03:03 -05:00
Artem Bilan
2f808ce9a4 Fix "unmerged" PipelineNamedReplyQueuesJmsTests
https://build.spring.io/browse/INT-B30X-431/
2015-11-13 13:36:40 -05:00
Gary Russell
086fa0a335 INT-3885: Fix JMS Outbound Gateway Concurrency
JIRA: https://jira.spring.io/browse/INT-3885

Possible dropped reply, causing timeout.

WARN org.springframework.integration.jms.JmsOutboundGateway#1.replyListener-1 jms.JmsOutboundGateway:1202
    - Failed to consume reply with correlationId 164a49bf-c41d-4c0b-b012-55deecf001d1_2
      java.lang.RuntimeException: No sender waiting for reply

- Reproduced by running the test in a loop
- Cleaned up test to aid debugging - capture a unique message at each stage
- Added additional debug logging to th gateway

Polishing
(cherry picked from commit f1bd6e3)
(cherry picked from commit 6183f24)
2015-11-13 12:46:43 -05:00
Artem Bilan
9d2b818ecf INT-3871: Fix NPE in the JsonPropertyAccessor
JIRA: https://jira.spring.io/browse/INT-3871

**Cherry-pick to 4.1.x, 4.0.x, 3.0.x**
2015-11-10 11:31:25 -05:00
Spring Buildmaster
41231cd230 [artifactory-release] Next development version 2015-10-27 11:55:30 -07:00
Spring Buildmaster
6b53f9ea1c [artifactory-release] Release version 3.0.8.RELEASE 2015-10-27 11:55:24 -07:00
Gary Russell
6f7a5b93db Revert s-d-MongoDB Version 2015-10-27 14:18:02 -04:00
Gary Russell
926fe304ed Bump Spring Project Versions 2015-10-27 13:14:19 -04:00
Artem Bilan
429f1bd642 IMAP: Fix the cast issue mocking correct type
https://build.spring.io/browse/INT-B30X-JOB1-424
2015-10-23 13:16:39 -04:00
Artem Bilan
e9b3b22a9a INT-3859: Fix NPE in the ImapMailReceiver
JIRA: https://jira.spring.io/browse/INT-3859

The Java Mail `MessageCache.getMessageBySeqnum()` has the code:
````java
if (msgnum < 0) {		// XXX - < 1 ?
    if (logger.isLoggable(Level.FINE))
	logger.fine("no message seqnum " + seqnum);
        return null;
}
````
about which the `IMAPFolder.search` doesn't care:
````java
matchMsgs[i] = getMessageBySeqNumber(matches[i]);
````
therefore pops `null`s to the top for the `ImapMailReceiver`

* Fix `NPE` filtering the `Message[]` from `null` items

Note: its enough difficult to reproduce it because it isn't clear how we can end up with:
````java
if (seqnums[msgnum-1] > seqnum)
		break;		// message doesn't exist
````

in the `MessageCache`.
That's why there is no test-cases on the matter.

**Cherry-pick to 3.0.x**

Conflicts:
	spring-integration-mail/src/main/java/org/springframework/integration/mail/ImapMailReceiver.java
Resolved.
2015-10-23 11:27:19 -04:00
Artem Bilan
9dfc72805e INT-3850: Fix SpEL usage in the CacheWritingMH
JIRA: https://jira.spring.io/browse/INT-3850

**Cherry-pick to 4.1.x, 4.0.x, 3.0.x**

Conflicts:
	spring-integration-gemfire/src/test/java/org/springframework/integration/gemfire/outbound/CacheWritingMessageHandlerTests.java
	spring-integration-gemfire/src/main/java/org/springframework/integration/gemfire/outbound/CacheWritingMessageHandler.java
Resolved.
2015-10-09 13:56:35 -04:00
Artem Bilan
0951547079 INT-3848: ERROR log for the null beanName
JIRA: https://jira.spring.io/browse/INT-3848

When the `ConsumerEndpointFactoryBean` is created programmatically
the `beanName` property may be missed and the `catch` for the `NPE`
just hides an issue with the `DEBUG` log message.

Add check for the `null` on the `bean` and log the issue on ERROR level.

**Cherry-pick to the 4.1.x, 4.0.x and 3.0.x**
2015-10-07 12:54:11 -04:00
Artem Bilan
1934d408c1 INT-3843: Backport NPE Fix for TCP ConFactories
JIRA: https://jira.spring.io/browse/INT-3843

**Cherry-pick to the 3.0.x**

Conflicts:
	spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioServerConnectionFactory.java
Resolved.
2015-10-07 12:38:58 -04:00
Artem Bilan
524177522f INT-3845: Backport NPE Fix in the DHCR
JIRA: https://jira.spring.io/browse/INT-3845

**Cherry-pick to the 3.0.x**
2015-10-07 12:32:15 -04:00
Artem Bilan
1ada398c7d INT-3841: Fix NPE in the AmqpChannelFactoryBean
JIRA: https://jira.spring.io/browse/INT-3841

Previously the `isPubSub` was as `Boolean` object and `null` by default.
Convert it to the primitive to achieve the `false` logic by default as expected.

INT-3841: Fix New Test

New test channel remains as a listener on the connection factory.

Conflicts:
	spring-integration-amqp/src/test/java/org/springframework/integration/amqp/channel/ChannelTests.java
Resolved.
2015-10-07 11:32:55 -04:00
Gary Russell
d395e38890 INT-3837: TCP GW - Propagate Socket Timeout
JIRA: https://jira.spring.io/browse/INT-3837

INT-3103 introduced exception propagation to waiting gateway threads.

However, `SocketTimeoutException`s were not propagated (in all cases
since 4.2 and for single-use sockets since 3.0).

Conflicts:
	spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/TcpOutboundGatewayTests.java

Resolved.

Remove beanfactory from backported test.
2015-09-28 10:27:25 -04:00
Artem Bilan
14ccd6ef5b INT-3767: Fix JPA Parser for parameter-source
JIRA: https://jira.spring.io/browse/INT-3767

The `JpaInboundChannelAdapterParser` has missed to parse `parameter-source`,
as well as the parser test-case has been missed.

In addition fix JPA xsd for wrong type references.

Conflicts:
	spring-integration-jpa/src/test/java/org/springframework/integration/jpa/config/xml/JpaInboundChannelAdapterParserTests.xml

resolved.
2015-07-22 12:10:31 -04:00
Gary Russell
c51299b1b2 INT-3751: Fix Python Scripting
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.
2015-06-23 16:32:30 -04:00
Artem Bilan
bd62b4191d Fix missed backport changes:
https://build.spring.io/browse/INT-B30X-415
2015-06-17 17:12:52 -04:00
Gary Russell
9f5d717bc9 INT-3744: Fix IMAPMessage receivedDate
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
2015-06-17 16:24:50 -04:00
Gary Russell
6ccb00b330 INT-3715: Fix Thread Safety in SyslogTransformer
JIRA: https://jira.spring.io/browse/INT-3715

`SimpleDateFormat` is not thread-safe.
2015-05-13 12:42:56 +03:00
Artem Bilan
2d1b3eb6d4 Feed: Fix imports conflict after cherry-picking 2015-04-17 19:25:36 +03:00
Aaron Loes
f385d984f9 INT-3700: Fix FeedEntryMS for correct lastTime
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
2015-04-17 19:15:17 +03:00
Spring Buildmaster
4707865b2f [artifactory-release] Next development version 2015-04-03 04:45:40 -07:00
Spring Buildmaster
26ed78630a [artifactory-release] Release version 3.0.7.RELEASE 2015-04-03 04:45:23 -07:00
Gavin Gray
a46820baf9 INT-3684: Rebuild Tail Command on Restart
JIRA: https://jira.spring.io/browse/INT-3684

Conflicts:
	spring-integration-file/src/test/java/org/springframework/integration/file/tail/FileTailingMessageProducerTests.java

Conflicts:
	spring-integration-file/src/test/java/org/springframework/integration/file/config/FileTailInboundChannelAdapterParserTests-context.xml
	spring-integration-file/src/test/java/org/springframework/integration/file/config/FileTailInboundChannelAdapterParserTests.java
2015-03-31 16:15:15 +03:00
Artem Bilan
14419ba3f7 INT-3669: Fix DelayHandler for the Date delay
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
2015-03-03 10:58:13 -05:00
Artem Bilan
6781e035d9 INT-3614 Fix extractPayload for JMS i-c-adapter
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
2015-02-18 18:07:39 -05:00
Artem Bilan
1c0fa63204 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`.

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
2014-12-10 08:57:40 -05:00
Gary Russell
cd556dbc6d INT-3564 Update Javadoc URLs to spring.io
JIRA: https://jira.spring.io/browse/INT-3564
2014-11-21 13:16:31 +02:00
Gary Russell
4f7ee6f8ad INT-3565 Inject Advice Chain to Direct Handlers
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.
2014-11-20 13:39:13 -05:00
Spring Buildmaster
0012d4c0ba [artifactory-release] Next development version 2014-11-11 11:21:44 -08:00
Spring Buildmaster
f641be58dd [artifactory-release] Release version 3.0.6.RELEASE 2014-11-11 11:21:29 -08:00
Gary Russell
48bb1a329a INT-3545: Don't AutoStart HeaderChannelRegistry
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
2014-11-06 14:03:06 +02:00
Gary Russell
34f340a879 Speed Up Mongo Build When No Mongo
@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
2014-10-22 16:24:28 +03:00
Gary Russell
3be6016987 INT-3537 RemoteFileTemplate Close Stream
JIRA: https://jira.spring.io/browse/INT-3537

Stream not closed if session cannot be created.

Add `try {} finally {}`.

__cherry-pick to 4.0.x, 3.0.x__

Conflicts:
	spring-integration-file/src/main/java/org/springframework/integration/file/remote/RemoteFileTemplate.java
	spring-integration-ftp/src/test/java/org/springframework/integration/ftp/session/FtpRemoteFileTemplateTests.java
2014-10-22 12:36:54 +03:00
Gary Russell
d2196252bd INT-3536 Fix Mail Receiver Regression Issue
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.
2014-10-21 17:01:01 +03:00
Enrique Rodríguez
d7691e78f3 INT-3528 Use Collections min and max methods where appropriate
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
2014-10-15 12:18:17 +03:00
Spring Buildmaster
e011542c50 [artifactory-release] Next development version 2014-09-05 01:15:09 -07:00
Spring Buildmaster
e65f6ea700 [artifactory-release] Release version 3.0.5.RELEASE 2014-09-05 01:15:03 -07:00
Artem Bilan
29fdceab4c Upgrade to SF 3.2.11 and AMQP 1.2.2 2014-09-05 10:16:04 +03:00
Artem Bilan
53a49c0d59 INT-3509 Add Convert Node & DOMSource to Document
JIRA: https://jira.spring.io/browse/INT-3509

**Cherry-pick to 3.0.x and 4.0.x**

Polishing

- Javadoc
- Refactor duplicated code

Conflicts:
	spring-integration-xml/src/test/java/org/springframework/integration/xml/DefaultXmlPayloadConverterTests.java

Resolved.
2014-09-02 16:08:53 -04:00
Gary Russell
561005b78e INT-3501 Fix IMAP Idle
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
2014-08-27 22:05:10 +03:00
Gary Russell
e1cabb801e INT-3499 AMQP Confirms/Returns Polishing
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.
2014-08-20 10:18:34 +03:00