Commit Graph

7675 Commits

Author SHA1 Message Date
Gary Russell
8cf1fbb533 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-19 22:48:46 +02:00
Gary Russell
9979f4eed6 INT-3652: Fix NPE: TCP Caching Connection Factory
JIRA: https://jira.spring.io/browse/INT-3652

Conflicts:
	spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/CachingClientConnectionFactory.java
	spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/CachingClientConnectionFactoryTests.java
2015-02-19 22:18:03 +02:00
Artem Bilan
f5a06129c8 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`.
2015-02-18 18:19:31 -05:00
Gary Russell
c45a050e2b 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

Conflicts:
	spring-integration-core/src/test/java/org/springframework/integration/gateway/AsyncGatewayTests.java
	spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/ConnectionEventTests.java
	src/reference/docbook/whats-new.xml
2015-02-18 22:01:51 +02:00
Tony Falabella
6854cb8227 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:30:01 +02:00
Gary Russell
651ac2d3df 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 15:57:18 -05:00
Gary Russell
bdfa658e23 Update Copyright to 2015 2015-01-13 14:22:28 -05:00
Gary Russell
d54b27dd0d INT-3607 Fix <transactional/> Docs
JIRA: https://jira.spring.io/browse/INT-3607
2015-01-13 21:18:07 +02:00
Konstantin Yakimov
1bc3cfd35e 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:28:38 +02:00
Gary Russell
2231f1d68f 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.

Conflicts:
	spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/config/xml/MqttParserUtils.java
	spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/config/xml/MqttMessageDrivenChannelAdapterParserTests-context.xml
	spring-integration-mqtt/src/test/java/org/springframework/integration/mqtt/config/xml/MqttMessageDrivenChannelAdapterParserTests.java

Remove test for unsupported `empty topics` functionality
2015-01-09 13:50:14 +02:00
Gary Russell
3fbd863fcb 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:23:17 +02:00
Gary Russell
38c05ec796 INT-3590: Fix Router Documentation
JIRA: https://jira.spring.io/browse/INT-3590
2015-01-05 14:23:16 +02:00
Konstantin Yakimov
1ec5df7c3a 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:14:06 -05:00
Spring Buildmaster
c0722733bc [artifactory-release] Next development version 2014-12-12 10:57:17 -08:00
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