Commit Graph

7661 Commits

Author SHA1 Message Date
Spring Buildmaster
5e3ca4ed8a [artifactory-release] Release version 4.0.6.RELEASE 2014-12-12 10:57:02 -08:00
Artem Bilan
6bfb8b02d6 Upgrade to AMQP 1.3.7 and SF 4.0.8 2014-12-12 19:58:30 +02:00
Artem Bilan
c68a55fc88 INT-3576: Fix NPE in the RedisAvailableTests
JIRA: https://jira.spring.io/browse/INT-3576
2014-12-10 09:48:05 -05:00
Gary Russell
8e934b9125 INT-3560 Fix DelayHandlerTests for Pre Java 8 2014-12-09 19:08:34 -05:00
Artem Bilan
87a8a5752c 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:34:20 -05:00
Artem Bilan
2ca698854f 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 17:20:50 -05:00
Gary Russell
e714a5a2a8 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 19:01:05 +02:00
Artem Bilan
1f23bf8f0b INT-3563: Add router's id to the MDException
JIRA: https://jira.spring.io/browse/INT-3563
2014-12-08 12:27:22 -05:00
Artem Bilan
f41e9141a6 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 13:43:40 -05:00
Gary Russell
26259e4626 INT-3564 Update Javadoc URLs to spring.io
JIRA: https://jira.spring.io/browse/INT-3564
2014-11-21 13:14:53 +02:00
Gary Russell
f73e920696 INT-3565 Inject Advice Chain to Direct Handlers
JIRA: https://jira.spring.io/browse/INT-3565

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

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.
2014-11-20 13:40:27 -05:00
Spring Buildmaster
2c7c5bb3b0 [artifactory-release] Next development version 2014-11-11 11:41:08 -08:00
Spring Buildmaster
12ec9b7361 [artifactory-release] Release version 4.0.5.RELEASE 2014-11-11 11:41:02 -08:00
Gary Russell
16a081044c 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__
2014-11-05 15:19:51 -05:00
Artem Bilan
39a1c3ce30 INT-3543: Remove context.close() from tests
JIRA: https://jira.spring.io/browse/INT-3543

Quoting Sam Brannen:

> However, one should *never* programmatically close the injected application context in a test,
since the Spring TestContext Framework caches all contexts across the entire JVM process.
If you need to close a context after a test method or test class for some reason,
the only supported and reliable mechanism is `@DirtiesContext`.

**Cherry-pick to 4.0.x**
2014-11-03 08:45:58 -05:00
Artem Bilan
c588288c49 INT-3539: Fix ChannelSecurityInterceptorBPP
JIRA: https://jira.spring.io/browse/INT-3539

Previously the `ChannelSecurityInterceptorBeanPostProcessor` eagerly loaded all beans from its `afterPropertiesSet`
to retrieve the `ChannelSecurityInterceptor`s. According to the `BeanPostProcessor` nature the `afterPropertiesSet` hook isn't legitimate.
It may cause some bad side-effects for other beans, which might not been initialized yet.

Rework `ChannelSecurityInterceptorBeanPostProcessor` to accept `Collection<ChannelSecurityInterceptor>` in the ctor.
Rework `SecurityIntegrationConfigurationInitializer` to iterate over `BeanDefinition`s to determine those of them, which
are `ChannelSecurityInterceptor` or `ChannelSecurityInterceptorFactoryBean`.

**Cherry-pick to 4.0.x**
2014-10-29 10:23:46 -04:00
Gary Russell
e7a64b8ef5 Speed Up Mongo Build When No Mongo
@Rule used a 10 second connection timeout.

Polishing
2014-10-22 16:14:58 +03:00
Gary Russell
064ec921bb 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:35:41 +03:00
Gary Russell
55a0b4324f 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 16:58:42 +03:00
Enrique Rodríguez
ca39d91465 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
2014-10-15 12:07:32 +03:00
Gary Russell
9bb2e5abed INT-3526 Used Expanded URI In Exception Message
JIRA: https://jira.spring.io/browse/INT-3526

Previously, the URI in the exception message is the raw
URI with placeholders, if present.

Use the expanded URI in the message instead.
(cherry picked from commit 113716e)
2014-10-04 17:25:37 +03:00
Gary Russell
d0a125e794 INT-3524 Fix Tooling MessageChannel References
JIRA: https://jira.spring.io/browse/INT-3524

Backport to 4.0 schemas.

A number of references (expected-type) still referred to
the Spring Integration 3.0 MessageChanel.
2014-10-03 08:00:11 +01:00
Artem Bilan
3b40d8c063 INT-3517: Fix HTTP Rome Dep. Logic for SF in CP
JIRA: https://jira.spring.io/browse/INT-3517
2014-09-26 09:23:47 +01:00
王小冋
a46da286db INT-3522: MQTT XSD: Fix client-factory attr type
JIRA: https://jira.spring.io/browse/INT-3522
2014-09-26 11:15:44 +03:00
Spring Buildmaster
507b84021e [artifactory-release] Next development version 2014-09-05 01:27:40 -07:00
Spring Buildmaster
a5df485e91 [artifactory-release] Release version 4.0.4.RELEASE 2014-09-05 01:27:32 -07:00
Artem Bilan
f5fc061ee6 Upgrade to SF 4.0.7, AMQP 1.3.6 and Retry 1.1.1 2014-09-05 10:37:16 +03:00
Andreas Falk
fe309077ce INT-3510: Fixed 'missing INT_MESSAGE_SEQ' error
JIRA: https://jira.spring.io/browse/INT-3510

There has been an error in schema creation scipt for message store on postgresql database:

The statement for creating sequence 'INT_MESSAGE_SEQ' was executed AFTER creating the table that actually uses this sequence
which resulted in sequence not found error.

Further problem was that the the corresponding index 'MSG_INDEX_DATE_IDX' in creation script does not match the index name
'INT_CHANNEL_MSG_DATE_IDX' in drop script. Therfore an error occurred when executing drop schema script for postgresql.

Fixes:

1.Moved creation of sequence 'INT_MESSAGE_SEQ' to first line to be executed before creating the corresponding table
2.Renamed index 'MSG_INDEX_DATE_IDX' to 'INT_CHANNEL_MSG_DATE_IDX' in create script to make drop script work again
On branch INT-3510
2014-09-05 09:49:10 +03:00
Artem Bilan
18c704595a 4.0.x: Fix SF 4.1 compatibility 2014-09-04 14:22:03 +03:00
Artem Bilan
2ffb26a7a3 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
2014-09-02 16:03:59 -04:00
Artem Bilan
c010685d27 INT-3503 equals & hashCode for ToStringFriendlyJN
JIRA: https://jira.spring.io/browse/INT-3503

**Cherry-pick to 4.0.x**

PR Comments and test
2014-09-02 12:56:17 -04:00
Gary Russell
8351e6a013 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
2014-08-27 21:54:46 +03:00
Artem Bilan
dd5224cc58 INT-3486: Poller: Prevent Interrupt StackTrace
JIRA: https://jira.spring.io/browse/INT-3486

INT-3486a: PR comments
2014-08-20 10:47:09 -04:00
Gary Russell
889c084151 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-19 16:01:00 -04:00
Artem Bilan
9d4863c148 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
2014-08-18 14:30:44 -04:00
Artem Bilan
2047998f78 INT-3495 Add FileTailInChAFBean#setErrorChannel
JIRA: https://jira.spring.io/browse/INT-3495

**Cherry-pick to 4.0.x & 3.0.x**
2014-08-15 11:18:39 -04:00
Artem Bilan
705be107ca INT-3470: Fix SF 4.1 Compatibility
JIRA: https://jira.spring.io/browse/INT-3470

According to the commit https://github.com/spring-projects/spring-framework/commit/c06ac06,
the `MessagingException` is now `NestedRuntimeException` including nested StackTrace.
Hence test-cases have to be changed to the `Mathers.containsString` instead of `equals` for the `e.getMessage()`

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

Conflicts:
	spring-integration-amqp/src/test/java/org/springframework/integration/amqp/channel/DispatcherHasNoSubscribersTests.java
	spring-integration-core/src/test/java/org/springframework/integration/handler/advice/AdvisedMessageHandlerTests.java
2014-08-12 22:10:24 +03:00
Gary Russell
bd58077528 INT-3483 Fix Test Case for < 4.1
JIRA: https://jira.spring.io/browse/INT-3483
2014-07-25 10:48:37 -04:00
Artem Bilan
9b2fb8a07f INT-3483: Fix AbstractCorrelatingMH deadlock
JIRA: https://jira.spring.io/browse/INT-3483

**Cherry-pick to 4.0.x & 3.0.x**
2014-07-25 10:28:39 -04:00
Clément Garnier
917a970b27 INT-3480: public DefaultPahoMC.setPayloadAsBytes
JIRA: https://jira.spring.io/browse/INT-3480

In docs, it s said:
```
The DefaultPahoMessageConverter can be configured to return the raw byte[] in the payload by declaring it as a <bean/> and setting the payloadAsBytes property.
```
http://docs.spring.io/spring-integration/docs/4.0.0.M3/reference/html/mqtt.html
2014-07-25 13:17:11 +03:00
Gary Russell
8ad0ab378f INT-3464 Fix Test Filenames 2014-07-24 18:01:45 +03:00
Gary Russell
19d31c3446 INT-3464 Exceptions and AcceptOnceFileListFilter
JIRA: https://jira.spring.io/browse/INT-3464

Previously, if an IO exeption occurred while synchronizing
files, and an AcceptOnceFileListFilter is being used, files that were
not transferred would not be fetched next time.

Add strategy `ReversibleFileListFilter` that can rollback previously
accepted files.

Implement this interface on `AcceptOnceFileListFilter` and
`AbstractPersistentAcceptOnceFileListFilter`.

Add test cases.

Polishing
2014-07-24 18:01:44 +03:00
Gary Russell
8dd6adab52 INT-3474 Suppress DEBUG StackTrace in MIMHelper
JIRA: https://jira.spring.io/browse/INT-3474

When the MethodInvokingMessageHandler skips ineligible methods while
searching it emits a stack trace under DEBUG logging. This is not
needed, a simple log message is enough to convey the information.

Some POJOs gain ineligible methods when wrapped in a proxy so this
is no fault of the developer.

Other reasons for skipping methods (improperly set annotations etc)
continue to emit a stack trace.

INT-3474: Polishing

Rethrow `IneligibleMethodException` as `IllegalArgumentException` in case of a single `method` for processor
2014-07-24 16:53:53 +03:00
Gary Russell
b2f07d0116 INT-651 Suppress Deprecation Warnings 2014-07-18 14:45:04 -04:00
Gary Russell
9858657953 INT-651 Use Local 'Function' Interface
Avoid adding a new dependency after backport.
2014-07-18 14:10:35 -04:00
Artem Bilan
3113b69a87 INT-651: Add Iterator Support for Splitter
JIRA: https://jira.spring.io/browse/INT-651

INT-651: Polishing according PR comments

INT-651: Polishing #2

Doc Polishing
2014-07-18 13:40:55 -04:00
Artem Bilan
dae634346f INT-3473: Set Inactive TcpNioFactory Before Stop
JIRA: https://jira.spring.io/browse/INT-3473

A simple fix to prevent `Selector closed` error loging message on `TcpNioServerConnectionFactory#stop()`

Polishing
2014-07-17 15:39:22 -04:00
Artem Bilan
f0eeb3b2b9 INT-3470: SF 4.1 Compatibility #2
JIRA: https://jira.spring.io/browse/INT-3470

* Apply the last `ChannelInterceptor` changes - just `extends ChannelInterceptorAdapter`
* Change some tests to check content according to the new changes to the `GenericMessage#toString()`

**Cherry-pick to 4.0.x**
2014-07-17 14:33:46 -04:00
Gary Russell
e8898821ae INT-3469 MQTT - Set Callback Before Subscribing
JIRA: https://jira.spring.io/browse/INT-3469

Previously, the callback was set immediately after
subscribing which caused a small possibility of
message loss.

Set the callback before subscribing.
2014-07-10 12:18:10 -04:00
Spring Buildmaster
d1448da321 [artifactory-release] Next development version 2014-07-08 12:11:47 -07:00