Commit Graph

7428 Commits

Author SHA1 Message Date
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
Artem Bilan
42800b75d2 INT-3496: JMX Metrics: Int->Long for All count
JIRA: https://jira.spring.io/browse/INT-3496

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

INT-3496: revert `int` methods and introduce `long` methods for `count` metrics

Conflicts:
	spring-integration-jmx/src/main/java/org/springframework/integration/monitor/DirectChannelMetrics.java
	spring-integration-jmx/src/main/java/org/springframework/integration/monitor/PollableChannelMetrics.java
	spring-integration-jmx/src/main/java/org/springframework/integration/monitor/SimpleMessageHandlerMetrics.java
	spring-integration-jmx/src/test/java/org/springframework/integration/jmx/config/ControlBusParserTests.java

Resolved.
2014-08-18 15:06:56 -04:00
Artem Bilan
ffa352fbca INT-3495 Add FileTailInChAFBean#setErrorChannel
JIRA: https://jira.spring.io/browse/INT-3495

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

Conflicts:
	spring-integration-file/src/main/java/org/springframework/integration/file/config/FileTailInboundChannelAdapterFactoryBean.java

Resolved.
2014-08-15 11:21:23 -04:00
Artem Bilan
1af13c0293 INT-3483: Fix AbstractCorrelatingMH deadlock
JIRA: https://jira.spring.io/browse/INT-3483

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

INT-3483 Fix Test Case for < 4.1

JIRA: https://jira.spring.io/browse/INT-3483
2014-07-25 10:53:57 -04:00
Spring Buildmaster
b72ca0e51e [artifactory-release] Next development version 2014-07-08 13:05:41 -07:00
Spring Buildmaster
7febc46360 [artifactory-release] Release version 3.0.4.RELEASE 2014-07-08 13:05:35 -07:00
Gary Russell
539f9e89f0 INT-3453 NIO Always Release Assembler Thread
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
2014-06-27 18:47:52 +03:00
Gary Russell
ec4c4b03b1 INT-3433 Delay Failed IOs
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
2014-06-23 11:34:55 +03:00
JohnA2
eafbe9b6e3 INT-3433 NIO Thread Starvation with Fixed Pool
JIRA: https://jira.spring.io/browse/INT-3433

INT-3433 added the test-case

Conflicts:
	spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioConnection.java
2014-06-23 11:25:13 +03:00
Spring Buildmaster
973e677fc2 [artifactory-release] Next development version 2014-06-02 14:03:56 -07:00
Spring Buildmaster
fd1bd5d272 [artifactory-release] Release version 3.0.3.RELEASE 2014-06-02 14:03:44 -07:00
Gary Russell
e590838571 INT-3423 Fix Expression-Based Splitter
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
2014-05-29 20:05:15 +03:00
Gary Russell
19443d6817 INT-3410 TCP NIO Deadlock with Bound TE
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
2014-05-20 17:42:45 +03:00
Artem Bilan
c49d8f4af7 INT-3407: Fix TX-sync-processor potential NPE
JIRA: https://jira.spring.io/browse/INT-3407

Conflicts:

	spring-integration-core/src/main/java/org/springframework/integration/transaction/ExpressionEvaluatingTransactionSynchronizationProcessor.java
	spring-integration-core/src/test/java/org/springframework/integration/endpoint/PseudoTransactionalMessageSourceTests.java

Resolved.

	Fixed imports and reference to MessageBuilderFactory.
2014-05-16 11:26:03 -04:00
Stevo Slavic
a2ea88beb6 Update preface docs for Java 8 compatibility
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
2014-05-07 09:36:15 -04:00
Artem Bilan
b63085c52f INT-3368: SyslogToMapTrans: Make TAG Optional
JIRA: https://jira.spring.io/browse/INT-3368

INT-3368: PR comments
2014-04-11 14:00:44 -04:00
Gary Russell
ab8e193b01 INT-3355 Improve Redis Tests
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.
2014-04-08 19:42:01 +03:00
Spring Buildmaster
3a186b871a [artifactory-release] Next development version 2014-03-31 13:16:55 -07:00
Spring Buildmaster
0ca790dd9d [artifactory-release] Release version 3.0.2.RELEASE 2014-03-31 13:16:48 -07:00
Gary Russell
a4a8abd6a9 INT-3347 Update Spring Framework Version to 3.2.8
JIRA: https://jira.spring.io/browse/INT-3347
2014-03-31 15:30:40 -04:00
Artem Bilan
5696efc274 INT-3346: Add @Id to CMDbMS.MessageDocument
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.
2014-03-28 11:10:48 -04:00
Gary Russell
04367659b4 INT-3342 Allow Custom TypeLocator for SpEL
JIRA: https://jira.spring.io/browse/INT-3342

Allow customization of the `TypeLocator` used by SpEL
`EvaluationContext`s throughout the framework.
2014-03-27 10:39:32 +02:00
Gary Russell
305472043f INT-3343 Bump JSch Version to 0.1.51
JIRA: https://jira.spring.io/browse/INT-3343
2014-03-26 14:20:03 -04:00
Gary Russell
466fa2bc5c Fix Typo in DEBUG Message
Also add another control-bus test.

Conflicts:

	spring-integration-core/src/test/java/org/springframework/integration/config/xml/ControlBusTests.java

Resolved.
2014-03-14 15:32:53 -04:00