Commit Graph

2293 Commits

Author SHA1 Message Date
Artem Bilan
7fdc0d4660 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:03:11 -04:00
Gary Russell
5b3b557cba 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:42:02 +03:00
Gary Russell
3b49d606ac INT-2371 DefaultHeaderChannelRegistry Improvements
JIRA: https://jira.spring.io/browse/INT-3471

- Make final fields protected so they are available to subclasses
- Add property `removeOnGet` allowing the map entry to be removed immediately when it is used
- Add `time-to-live-expression` allowing override of the reaper delay

Polishing

Conflicts:
	src/reference/docbook/whats-new.xml
2014-07-24 11:45:06 +03:00
Liujiong
302edf9221 INT-3465:Content Enricher Improvements
JIRA: https://jira.spring.io/browse/INT-3465

Add support for adding/removing individual recipients to the RecipientListRouter

Modify documentation in what's new and spring-integration-4.1.xsd

Polishing

`AbstractRemoteFileOutboundGateway`: close `outputStream` before `file.delete()` to release exclusive file-lock
2014-07-23 21:42:45 +03:00
Gary Russell
40f1122df2 INT-3420 Aggregator expire-groups-upon-timeout
JIRA: https://jira.spring.io/browse/INT-3420

Add option to allow the empty group to remain after timeout
so late arriving messages can be discarded.

INT-3420 Add Callout Hyperlinks

The aggregator configuration documentation had hyperlinks
from the attribute descriptions to the attribute in the
XML, but not vice-versa. For a large number of attributes
such as this, bi-directional hyperlinks are useful.

INT-3420 Doc Polishing
2014-07-23 10:20:43 +03:00
Artem Bilan
7abefb08df INT-3475: Integer.MAX_VALUE / 2 Phase for MDEs
JIRA: https://jira.spring.io/browse/INT-3475

Change the phase for `SourcePollingChannelAdapterFactoryBean`, `AbstractPollingEndpoint`, `MessageProducerSupport`, `JmsMessageDrivenEndpoint`
to the `Integer.MAX_VALUE / 2`
2014-07-22 11:07:31 -04:00
Artem Bilan
81cacf340c 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:21:33 -04:00
Artem Bilan
3890e892d8 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:32:50 -04:00
Artem Bilan
34b257e3f2 INT-3448: Add @Async test for @Gateway
JIRA: https://jira.spring.io/browse/INT-3448

INT-3448: Addressing PR comments

Late Resolution of @Publisher.defaultChannel

Early resolution of the publisher default channel caused
`@ Configuration` factory beans to be instantiated before
Spring Integration bean post processors had been registered.

Use the channel name instead of channel reference and resolve
it when processing the first publish.

Merge branch 'INT-3448' of https://github.com/garyrussell/spring-integration into INT-3448

Conflicts:
	spring-integration-core/src/test/java/org/springframework/integration/configuration/EnableIntegrationTests.java

INT-3448: Polishing
2014-07-08 09:20:18 -04:00
Artem Bilan
db8b164425 INT-3404: Remove MProducer from AIFileSMS
JIRA: https://jira.spring.io/browse/INT-3404

Previously, `AbstractInboundFileSynchronizingMessageSource` implemented both `MessageProducer` and `MessageSource`.
The `MessageProducer` is really redundant and confusing.
Also, it might produce some side-effects when using JavaConfig.

Provide some other simple but important fix for all `AbstractMessageSource` implementation to invoke `super.afterPropertiesSet()`

Polishing

Add mock bean factory to failing tests.

Revert state assertions in AbstractInboundFileSynchronizingMessageSource;
the fields are state, not arguments, at the time they are being
asserted.
2014-07-02 15:29:08 -04:00
Artem Bilan
1ca631e2c8 INT-3415 Add apply-sequence to xpath-splitter
JIRA: https://jira.spring.io/browse/INT-3415

* Add `XPathSplitterParserTests`

XSD Doc Polishing
2014-07-02 12:49:43 -04:00
Artem Bilan
58932dc31f INT-3426: Add <r-h-a-c> for all outbound-c-a
JIRA: https://jira.spring.io/browse/INT-3426

Provide other fixes for XSD. E.g. not all adapter have had `<poller>`
2014-07-02 16:02:55 +03:00
Artem Bilan
c92d7a5da9 INT-3458: Compatibility with Spring Framework 4.1
JIRA: https://jira.spring.io/browse/INT-3458

* Change Spring AMQP to `1.3.5.RELEASE`
* `HttpRequestHandlingEndpointSupport`: remove `MappingJacksonHttpMessageConverter` registration
* `IntegrationRequestMappingHandlerMapping`: add 'fake' `name()` attribute to the inline `RequestMapping` annotation
* `StoredProcJmxManagedBeanTests`: remove `context.stop();` code, Since `MBeanExporter` deregister MBeans on `stop()` now
* `StoredProcPollingChannelAdapterParserTests`: change deprecated `ParameterizedSingleColumnRowMapper` to the `SingleColumnRowMapper`
* `Jms`: comment out the reflection code to check the value for the `recoveryInterval`, because it is removed already in favor of `backOff`
* `NotificationListeningMessageProducer`: move the start-up listener registration to the `onApplicationEvent`,
because `MBeanExporter` moved `registerBeans()` to the `start()` now.
The same `phase` might cause the issue, that MBeans aren't registered yet for `NotificationListeningMessageProducer`
* `JpaOutboundGatewayTests`: change `@TransactionConfiguration` to the `@Transactional`. Don't know why the first doesn't work now.

**Cherry-pick to 4.0.x**

INT-3458: Addressing PR comments

`NotificationListeningMessageProducer`: defer listener registration until `onApplicationEvent()`
2014-07-01 09:37:29 -04:00
Artem Bilan
119787f020 INT-3445: Fix PublisherRegistrar NPE
JIRA: https://jira.spring.io/browse/INT-3445
2014-06-21 11:33:21 -04:00
Artem Bilan
4b1eed27e3 INT-3442 RedisQMDE Delay stop Until Last Read
JIRA: https://jira.spring.io/browse/INT-3442

Previously `RedisQueueMessageDrivenEndpoint.stop()` returned immediately.
It caused an issue when one more `message` might be read and processed to stopped app.

* Introduce `AbstractEndpoint#lifecycleCondition` and wait on it from `RedisQueueMessageDrivenEndpoint.doStop()`
and `signal()` it from `ListenerTask`.
* Since everything is done around `lifecycleLock` the `RedisQueueMessageDrivenEndpoint.stop()` waits for the proper
'last' message process.
* Add tiny `Thread.sleep(1)` to the `popMessageAndSend` cycle to free `lifecycleLock` for other Threads, e.g. `stop()`

INT-3442: Get rid of `lock` from listener cycle

* Introduce `stopTimeout` to minimize the `stop` thread blocking
* If the message is returned after that timeout it moved back to Redis List using `RPUSH`

INT-3442: Addressing PR comments
2014-06-20 19:05:16 -04:00
Artem Bilan
e8599c5541 INT-3416 Reset SMS.copyOnGet By Default
JIRA: https://jira.spring.io/browse/INT-3416

Fix the `SimpleMessageStoreTests`
2014-06-17 23:15:41 +03:00
Gary Russell
117669fb9a INT-3416 Reset SMS.copyOnGet By Default
JIRA: https://jira.spring.io/browse/INT-3416

Add caution to docs about users getting a hard
reference to the group instead of a copy.
2014-06-17 22:10:02 +03:00
Gary Russell
1df6d872fa INT-3430 AMQP Outbound: Add Eager Connect
JIRA: https://jira.spring.io/browse/INT-3430

Add an option to eagerly connect to rabbit when
only using outbound endpoints. Log an ERROR
if the connection can not be established during
context initialization.

Polishing
2014-06-17 20:55:54 +03:00
Artem Bilan
ca2ce6adac INT-3431: Fix RecipientListRouter.onInit()
JIRA: https://jira.spring.io/browse/INT-3431

The introduced `late channel resolution by name` via https://jira.spring.io/browse/INT-3324
has lost `onInit()` propagation from `RecipientListRouter.onInit()`
2014-06-13 17:35:13 -04:00
Artem Bilan
77b31f58fd INT-3418: xsd-4.0 -> 4.1 2014-06-05 13:34:52 +03:00
Artem Bilan
c0ab912c49 INT-3418: xsd-3.0 -> 4.0 2014-06-05 13:34:41 +03:00
Artem Bilan
9e5e7514e0 INT-3418: xsd-2.2 -> 3.0 2014-06-05 13:34:30 +03:00
Artem Bilan
9bd441c8d0 INT-3418: xsd-2.1 -> 2.2 2014-06-05 13:34:19 +03:00
Artem Bilan
af1cd16027 INT-3418: xsd-2.0 -> 2.1 2014-06-05 13:33:57 +03:00
Artem Bilan
fa33f8f21d INT-3418: xsd-1.0 -> 2.0 2014-06-05 13:33:40 +03:00
Artem Bilan
cedbf6edc2 INT-3418: Prepare 4.1 VERSION
JIRA: https://jira.spring.io/browse/INT-3418

* Create 4.1 XSD
* Clean up Docs for 4.1
* Prepare WebSocket module
* Add Reactor dependency
* Remove Eclipse and SNV artifacts

Phase #1: prepare

Conflicts:
	gradle.properties
2014-05-30 21:14:21 +03:00
Gary Russell
a5694cdc42 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.
2014-05-29 12:11:07 -04:00
Gary Russell
1cc8d8c7f1 INT-3413 Emit Event When an Agg. Expires a Group
JIRA: https://jira.spring.io/browse/INT-3413

Add MessageGroupExpiredEvent with group metadata
such as message count, last modified, whether
the group was discarded or not.

Conflicts:
	spring-integration-core/src/test/java/org/springframework/integration/aggregator/AggregatorTests.java

Polishing
2014-05-22 13:32:16 +03:00
Gary Russell
f396b2a4b4 INT-3386 Improve Aggregator Performance
JIRA: https://jira.spring.io/browse/INT-3386

Eliminate unnecessary group copy during retrieval in the
aggregator. This is expensive with large groups.

Ensure that the reaper uses a snapshot of the group at the
time it is considered for reaping.

AggregatorTests.testAggPerf() -  before:

    AggregatorTests [main] : Sent 0 in 0.0 (10k in 0ms)
    AggregatorTests [main] : Sent 10000 in 4.872 (10k in 4872ms)
    AggregatorTests [main] : Sent 20000 in 16.86 (10k in 11988ms)
    AggregatorTests [main] : Sent 30000 in 36.809 (10k in 19949ms)
    AggregatorTests [main] : Sent 40000 in 65.045 (10k in 28236ms)
    AggregatorTests [main] : Sent 50000 in 100.329 (10k in 35284ms)
    AggregatorTests [main] : Received 60000
    AggregatorTests [main] : Sent 60000 in 143.106 (10k in 42777ms)
    AggregatorTests [main] : Sent 70000 in 147.027 (10k in 3921ms)
    AggregatorTests [main] : Sent 80000 in 158.664 (10k in 11637ms)
    AggregatorTests [main] : Sent 90000 in 177.956 (10k in 19292ms)
    AggregatorTests [main] : Sent 100000 in 205.045 (10k in 27089ms)
    AggregatorTests [main] : Sent 110000 in 240.005 (10k in 34960ms)
    AggregatorTests [main] : Received 60000
    AggregatorTests [main] : Sent 120000 in 282.566 (10k in 42561ms)

After:

    AggregatorTests [main] : Sent 0 in 0.0 (10k in 0ms)
    AggregatorTests [main] : Sent 10000 in 0.612 (10k in 612ms)
    AggregatorTests [main] : Sent 20000 in 0.925 (10k in 313ms)
    AggregatorTests [main] : Sent 30000 in 1.131 (10k in 206ms)
    AggregatorTests [main] : Sent 40000 in 1.288 (10k in 157ms)
    AggregatorTests [main] : Sent 50000 in 1.361 (10k in 73ms)
    AggregatorTests [main] : Received 60000
    AggregatorTests [main] : Sent 60000 in 1.522 (10k in 161ms)
    AggregatorTests [main] : Sent 70000 in 1.619 (10k in 97ms)
    AggregatorTests [main] : Sent 80000 in 1.696 (10k in 77ms)
    AggregatorTests [main] : Sent 90000 in 1.75 (10k in 54ms)
    AggregatorTests [main] : Sent 100000 in 1.81 (10k in 60ms)
    AggregatorTests [main] : Sent 110000 in 1.851 (10k in 41ms)
    AggregatorTests [main] : Received 60000
    AggregatorTests [main] : Sent 120000 in 1.918 (10k in 67ms)
2014-05-20 18:19:45 -04:00
Artem Bilan
39ef91ff84 INT-3408: Fix IRHolder TX-sync Inconsistency
JIRA: https://jira.spring.io/browse/INT-3408

* Add `TransactionSynchronizationFactoryBean`
* Introduce `IntegrationResourceHolderSynchronization`
to get deal with `IntegrationResourceHolder` for custom `TransactionSynchronization`
* Encapsulate `IntegrationResourceHolder` in the `DefaultTransactionSynchronizationFactory`
* Get deal with `IntegrationResourceHolder` and bind it to the `TransactionSynchronizationManager`
only if `TransactionSynchronization` from `transactionSynchronizationFactory`
is `synchronization instanceof IntegrationResourceHolderSynchronization`

INT-3408: Encapsulate binding in the `DefTxSyncF`
2014-05-20 16:00:07 -04:00
Gary Russell
c5500a82fd 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:05:17 +03:00
Artem Bilan
157fc2a084 INT-3407: Fix TX-sync-processor potential NPE
JIRA: https://jira.spring.io/browse/INT-3407
2014-05-16 12:44:39 +03:00
Gary Russell
8a44d4da0b INT-3399 Update spring-retry to 1.1.0
JIRA: https://jira.spring.io/browse/INT-3399

Fix `MessagingTemplate` javadoc warn
2014-05-14 09:23:55 +03:00
Gary Russell
d369103815 INT-3395 Restore MessagingTemplate Constructor
JIRA: https://jira.spring.io/browse/INT-3395
2014-04-29 11:00:59 -04:00
Artem Bilan
81aa7eabd3 INT-3393: Move Boot AutoConfig to Boot
JIRA: https://jira.spring.io/browse/INT-3393
2014-04-29 10:30:41 -04:00
Artem Bilan
34cc492942 INT-3381: Messaging Annotations on @Bean Method
JIRA: https://jira.spring.io/browse/INT-3381

* Add support to mark `@Bean` methods with `Messaging Annotations`
* Addition attributes for `Messaging Annotations`
* Some refactoring and fixing
* Fix `AbstractMappingMessageRouter#onInit()` propagation
* Fix `GemfireGroupStoreTests` (https://build.spring.io/browse/INT-MASTERSPRING40-JOB1-246/test/case/135235772)

There is still some side effect: we need define `MessageChannel` beans explicitly. Since methods are processed within `BPP`,
not all beans with `Messaging Annotations` might be processed.

INT-3381: PR comments and other fixes

INT-3381 Polishing

INT-3381: Revert `RouterFB` & `SplitterFB`
2014-04-29 09:16:11 -04:00
Artem Bilan
38f9cb8500 INT-3380 Add @Bean's @BridgeTo, @BridgeFrom
JIRA: https://jira.spring.io/browse/INT-3380

INT-3380: Polishing

INT-3380: Refactoring

Minor JavaDoc Polishing
2014-04-25 14:31:11 -04:00
Gary Russell
5522b99741 INT-3382 Support Easier Aggregator Extensions
JIRA: https://jira.spring.io/browse/INT-3382

- Make private methods protected; add protected getters
- Support obtaining just metadata from stores
- Support just fetching the first message from a group
- add metaSize() to message group

INT-3382: Polishing
2014-04-25 19:32:28 +03:00
Gary Russell
24f176c897 INT-3376 Support Meta-Annotation Att. Override
JIRA: https://jira.spring.io/browse/INT-3376

Allow user annotations with Messaging Meta-Annotations
override/supplement attributes set on the meta-Annotation.

PR Comments and More

- Do not create a bean definition for the annotation (interface)
when `MessagingGateway` is used as a meta-Annotation.
- For a `MessagingGateway` restore attributes overridden with empty values
- Other PR comments.

Fully support meta-Annotation hierarchy.

Polishing:

* Upgrade JRuby to 1.7.12
* Replace `AnnotationFinder` with moving its methods to `MessagingAnnotationUtils`
* Refactor aggregator classes to use `MessagingAnnotationUtils` to determine the method for annotation
* Fix `IntegrationComponentScanRegistrar` to skip annotation classes
* Fix `MessagingGatewayRegistrar#replaceEmptyOverrides`
* Improve `MessagingAnnotationPostProcessor` to use `ReflectionUtils.USER_DECLARED_METHODS` `MethodFilter`
* Change the `MethodAnnotationPostProcessor` hierarchy to use just list of annotations to process attributes
2014-04-24 21:56:58 +03:00
Gary Russell
aeeb9db4f6 INT-3379 - Allow Placeholders for Enums
JIRA: https://jira.spring.io/browse/INT-3379

Change enumerated attributes to a union with xsd:string
to allow placeholders.

JMS and XML deferred to 4.1 due to the amount of
changes needed to the parsers. See INT-3384.
2014-04-23 13:58:00 -04:00
Gary Russell
17c6f8a350 INT-3372 Add NamedComponent to Remaining MsgSrcs
JIRA: https://jira.spring.io/browse/INT-3372
2014-04-16 21:23:45 +03:00
Gary Russell
8d6aa0fb1e INT-3374 Fix Package Tangle; Part II
JIRA: https://jira.spring.io/browse/INT-3374

Move `getMessageBuilderFactory` from `IntegrationContexUtils`
to `IntegrationUtils`.

Change DOS Newlines to Unix

`AbstractMessageGroupStore`.
2014-04-15 14:08:14 -04:00
Gary Russell
7dabf749c6 INT-3374 Fix Package Tangle; Part I
JIRA: https://jira.spring.io/browse/INT-3374

`DefaultDatatypeChannelMessageConverter`

Move `getConversionService()` from `IntegrationContextUtils`
to `IntegrationUtils` in `support.utils`.
2014-04-15 13:33:24 -04:00
Artem Bilan
18920851d3 INT-3373: Make Messaging Annotations as Meta
JIRA: https://jira.spring.io/browse/INT-3373

Allow messaging annotations to be used as
meta annotations.
2014-04-15 12:42:47 -04:00
Gary Russell
66fe1c74be INT-2352 Support Control-Bus Atomic Router Updates
JIRA: https://jira.spring.io/browse/INT-2352

Add `replaceChannelMappings()` to the `AMMR`.

INT-2352 Polishing - PR Comments

Consolidate tests.
Fix up `@ManagedAttribute` Vs `@ManagedOperation`
Expose `setChannelMappings` over JMX
2014-04-15 18:56:23 +03:00
Artem Bilan
466af8a2f5 INT-2975: Add ValueExpression for Typed SpEL
JIRA: https://jira.spring.io/browse/INT-2975

INT-2975: Add `type` attr. for enricher property

INT-2975: Check for `type`, polishing, docs

Enricher: deprecate property expression type attr
2014-04-15 11:13:37 -04:00
Artem Bilan
2ee179a891 INT-3338: MongoMS: Add priority and sequence
JIRA: https://jira.spring.io/browse/INT-3338

INT-3338: Add Docs

INT-3338: Make `priority` 'smart'

Add `Sort` for all group queries dependently of `priorityEnabled`.
Avoids the need to configure separate collections for different type of `MessageStore`

INT-3338: Add `MongoDbChannelMessageStore`

INT-3338: Polishing, Fixes, Improvements

Doc Polishing

Fix stream test.
2014-04-14 11:44:59 -04:00
Gary Russell
a7489909d7 INT-2738 Add Missing getComponentType() Methods
JIRA: https://jira.spring.io/browse/INT-2738

Add a `getComponentType()` method for all handlers,
message producers, and message sources that implement
`NamedComponent` (see `SPCA.getComponentType()`).

Add rome as an optional dependency - STS complained
because AtomFeedHttpMessageConverter has a dependency
on it.
2014-04-14 16:45:47 +03:00
Gary Russell
85b16f0f6d Reduce MBF Warning Logs to DEBUG
When the bean factory is not provided a WARN log was issued
because the message builder factory cannot be found.

Reduce the logs to DEBUG.
2014-04-11 17:37:48 -04:00
Artem Bilan
96dc725539 INT-3368: SyslogToMapTrans: Make TAG Optional
JIRA: https://jira.spring.io/browse/INT-3368

INT-3368: PR comments
2014-04-11 12:55:52 -04:00