Commit Graph

2293 Commits

Author SHA1 Message Date
Artem Bilan
64a7a7e021 INT-3339: Add priority to the JdbcChannelMS
JIRA: https://jira.spring.io/browse/INT-3339

INT-3339: Improve `priority` logic

INT-3339: Add `MESSAGE_SEQUENCE` stuff

INT-3339: Docs

INT-3339: Polishing and PR comments

INT-3339 Polishing

Fix Oracle Test Case.
Doc polishing.
2014-04-10 16:28:07 -04:00
Artem Bilan
3f40c40641 INT-3365: Add SmartLifecycle for Annotations
JIRA: https://jira.spring.io/browse/INT-3365

INT-3365 Polishing
2014-04-10 12:50:44 -04:00
Artem Bilan
55c4e26619 INT-3356: Add InboundChannelAdapter Annotation
JIRA: https://jira.spring.io/browse/INT-3356

INT-3356 Polishing

Long lines and doc polish.
2014-04-09 14:56:12 -04:00
Gary Russell
89a7743640 INT-3360 Fix Package Tangle
JIRA: https://jira.spring.io/browse/INT-3360

Move LockRegistry from util to support.
2014-04-08 12:01:51 -04:00
Artem Bilan
8ffc86f3d2 INT-3351: Add @Poller for Messaging Annotations
JIRA: https://jira.spring.io/browse/INT-3351

INT-3351: Polishing according PR comments

* Add `property-placeholder` support for `@Poller`
* Change `ref` to `value`
* Add JavaDoc for `array` workaround
* Add docs

INT-3351: Polishing and fixes

INT-3351 More Tests

INT-3351: PR comments

INT-3351 Final Polishing
2014-04-08 10:09:32 -04:00
Artem Bilan
9754d59f62 INT-3358: Make MutableMessage package protected
JIRA: https://jira.spring.io/browse/INT-3358
2014-04-07 19:19:49 +03:00
Gary Russell
4dee2a224b INT-3353 Concurrent RedisMetadataStore
JIRA: https://jira.spring.io/browse/INT-3353

Shared metadata for PersistentAcceptOnceFileListFilters.

INT-3353 Polishing; PR Comments
2014-04-07 17:38:33 +03:00
Artem Bilan
eb0d1ddc84 INT-2595: Add Time-Based ReleaseStrategy Option
JIRA: https://jira.spring.io/browse/INT-2595

* Add `group-timeout` and `group-timeout-expression` to the Correlation Endpoint
* Add logic to the `AbstractCorrelatingMessageHandler` to schedule group for `forceComplete`,
when the target `ReleaseStrategy` returns `false`

INT-2595: Polishing according PR comments

INT-2595: Expose `lock-registry` and further docs

INT-2595 Doc and Test Polishing

INT-2595: Fix typos

INT-2595 More Minor Doc Polish
2014-04-05 10:49:20 -04:00
Gary Russell
9dee131e3c INT-3349 BeanFactory Propagation
JIRA: https://jira.spring.io/browse/INT-3349

Several FactoryBeans did not propagate the BeanFactory
to their created object(s). Beans that create messages
must have access to a bean factory to get the
message builder factory.

Fix the FactoryBeans and add a mock FB to all tests that
need one.

Add a runtime environment variable to make any infractions
fatal. This should be set to `true` on CI builds and on
framework developer environments.
2014-04-02 14:15:48 -04:00
Artem Bilan
969310b453 INT-3327: Add IntegrationConverter Annotation
JIRA: https://jira.spring.io/browse/INT-3327

INT-3327: Addressing PR comments

Polishing
2014-03-31 13:02:47 -04:00
Artem Bilan
c11e3ba3b5 INT-3337: MongoDbMessageStore Refactoring
JIRA: https://jira.spring.io/browse/INT-3337

INT-3337: Addressing PR comments

INT-3337: Add support to store/read Messages

* Add support to store/read `ErrorMessage`. As a trick for `Throwable` is selected (de)serializing converter

INT-3337: Add converters for `Message<?>` impls

INT-3337: Make `MDbMS.MessageWrapper` AuditAware

Add `_id` persistence field

Addressing PR comments

Polishing

- Docs
- Check for null ApplicationContext
- Add afterPropertiesSet() to tests
2014-03-28 16:46:48 -04:00
Artem Bilan
6d6bef58b2 INT-3326 Add GlobalChannelInterceptor Annotation
JIRA: https://jira.spring.io/browse/INT-3326

INT-3326: Add parent-child test

INT-3326: Fix `ClassCastException` for `GCII`

INT-3326: Rebase and Polishing

INT-3326: Fix `GCII` for `getBeanNamesForType`

INT-3326: Add `GlobalChannelInterceptor` annotation

JIRA: https://jira.spring.io/browse/INT-3326

INT-3326: Add parent-child test

INT-3326: Fix `ClassCastException` for `GCII`

INT-3326: Rebase and Polishing

INT-3326: Fix `GCII` for `getBeanNamesForType`

INT-3326 Polishing Doc, JavaDocs

Also fix a typo in the bean name for the CI processor.

INT-3326: Polishing

Doc Polishing
2014-03-28 14:04:22 -04:00
Artem Bilan
42a13c830d INT-2743: Improve <header-enricher>.<priority>
JIRA: https://jira.spring.io/browse/INT-2743
2014-03-28 13:06:49 -04:00
Artem Bilan
97c270c0e2 INT-3330 EnableIntegrationMBeanExport Annotation
JIRA: https://jira.spring.io/browse/INT-3330

INT-3330: Enable SpEL evaluation

INT-3330: Polishing for `MBeanExporterHelper`

INT-3330: Fix `errorChannel` early access

INT-3330: Polishing according PR comments

Polishing - copyrights, author, docs
2014-03-27 12:53:20 -04:00
Gary Russell
1d6e80ecd0 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:23:38 +02:00
Gary Russell
70c43c8eed Test, Javadoc Cleanup
* Remove an unnecessary test.
* Fix timing in header channel registry test.
* Fix Javadocs in VetoCapableInterceptor
2014-03-26 10:09:32 -04:00
Gary Russell
b92134fae7 INT-3332 GlobalChannelInterceptorBeanPostProcessor
Implicit channel declaration for items downstream
of a `ChannelInterceptor` were not created.

The `BPP` eagerly fetched the interceptors during its
own creation; this caused the context initialization to fail
because the channel initializer hasn't run yet.

Defer creation of the interceptor beans until they are
actually needed.

Also, when using `@Configuration`, the channelInitializer
is no longer the first bean in the bean factory.

INT-3332 Use SmartLifeCycle to Apply Interceptors

Instead of using a bean post processor, the interceptor
processor now performs the channel interception when beans
in phase Integer.MIN_VALUE are started - after all beans
have been instantiated.

Polishing
2014-03-19 15:33:32 +02:00
Artem Bilan
23a26ca38e INT-3328: Add EnablePublisher Annotation
JIRA: https://jira.spring.io/browse/INT-3328

INT-3328: Polishing
2014-03-18 16:30:41 -04:00
Gary Russell
a8c8a4fed5 INT-3325 Add Redis Channel Message Group Store
JIRA: https://jira.spring.io/browse/INT-3325
JIRA: https://jira.spring.io/browse/INT-1870

Optimized MGS for QueueChannel - uses a LIST for
each channel and LPUSH, RPOP.

* Also fix MutableMessage to be Serializable

INT-1870 Priority Redis Channel Message Store

Supports priorities 0-9 (+ no priority).

Priorities out of that range are treated as no priority.

Polishing - Add Marker Interfaces

* Emit a `WARN` log if a channel is used with a regular MessageGroupStore
* Allow message-store on namespace when defining a priority channel

INT-3325 Polishing; PR Comments

Fix some typos in JavaDocs and Docs
2014-03-18 12:34:06 +02:00
Gary Russell
a9faa5836f Fix Typo in DEBUG Message
Also add another control-bus test.
2014-03-14 15:24:00 -04:00
Artem Bilan
f1cd5ede66 INT-3324: Simple refactoring to Routers
JIRA: https://jira.spring.io/browse/INT-3324

* Move `private` `ExpressionControlBusFactoryBean$ControlBusMethodFilter` class
to the `org.springframework.integration.expression.ControlBusMethodFilter`
to make it as convenient to use from JavaConfig
2014-03-13 14:41:00 -04:00
Artem Bilan
8429424d46 INT-3317: Remove comparator from resequencer
JIRA: https://jira.spring.io/browse/INT-3317

In addition add `AbstractCorrelatingMessageHandler.discardChannelName` for convenience with JavaConfig

INT-3317: Add `AbstractCorrMH.outputChannelName`

INT-3317: Fix further `BF` population

Also add `MessageFilter.discardChannelName`

Move `XPathExpressionEvaluatingHeaderValueMessageProcessor` to the `xml.transformer.support` package

Additional polishing

Polishing

PR comments.
2014-03-12 11:25:17 -04:00
Gary Russell
75af72a77c INT-3319 Fix BeanFactory Propagation
JIRA: https://jira.spring.io/browse/INT-3319

The `MessageBuilderFactory` abstraction relies on the bean factory
being propagated to all classes that create messages.

Some classes were missed in the initial PR.
2014-03-12 12:03:31 +02:00
Gary Russell
1c9bcaccee INT-3041 Add Namespace Support For Retry Advice
JIRA: https://jira.spring.io/browse/INT-3041

Add namespace support to simplify configuration of
a `RequestHandlerRetryAdvice.

INT-3041 Polishing; PR Comments

* Allow a retry-advice element within the request-handler-advice-chain
* Clean up schema (should not have allowed `synchronization-factory` on
    the request-handler-advice-chain.

INT-3041 Polishing; PR Comment
2014-03-11 17:56:51 +02:00
Gary Russell
5d0eafc608 INT-3316 BeanFactoryTypeConverter Concurrency
JIRA: https://jira.spring.io/browse/INT-3316

The `SimpleTypeConverter` delegate uses property editors
which are not thread safe. We protect against concurrent
access when the source is not a String, but when a String,
we delegate to the `STC`.

Synchronize access to the `STC.convertIfNecessary()` method.
2014-03-10 13:42:15 -04:00
Artem Bilan
7adc9537b6 INT-3314: Fix BeanFactory Population for SAH
JIRA: https://jira.springsource.org/browse/INT-3314

Add to `ServiceActivatingHandler` `beanFactory` population code for the `MessageProcessor` delegate

INT-3314: Populate `BF` to `HValueMProcessor`s

Make `XPathExpressionEvaluatingHeaderValueMessageProcessor` as `public`

INT-3314: Populate `BF` to `HE.messageProcessor`

INT-3314: Add `BF` `NPE` protection

INT-3314 XPath Header Enricher Test

Add a test that verifies the `BeanFactoryTypeConverter` is used
(convert to a TimeZone object).
2014-03-10 12:01:53 -04:00
Gary Russell
ff845b5069 INT-3309 Pluggable MessageBuilder
This is still a work in process.

There are a bunch of TODOs in classes
that are not managed by Spring and so
need to have the MessageBuilderFactory
injected.

But I am looking for feedback on the
approach.

INT-3309 Resolve TODOs

Provide access to the MessageBuilderFactory in all classes.

INT-3309 Polishing + Tests

* Fallback to 'fromMessage()' if mutating and inbound message is not MutableMessage
* Add 'alwaysMutate' boolean to MutableMessageBuilderFactory - coerces 'fromMessage' calls to 'mutateMessage'
* Add tests

INT-3309 Polishing; PR Comments

Also add tests to parent/child contexts where the parent has the
default message builder and the child has a mutable message builder.

INT-3309 More Polish; PR Comments

Also fix removeHeader in MMB.
2014-03-06 19:51:12 +02:00
Artem Bilan
4c775bce9d Fix JavaDocs issues 2014-03-06 14:33:18 +02:00
Gary Russell
776705e6c4 INT-3308 SubscribableChannel Optimization
JIRA: https://jira.springsource.org/browse/INT-3308

INT-3308 Move Optimization to AbstractDispatcher

- avoids the need for `canShortCutDispatcher()`
- optimizes all framework channels, including AMQP, JMS
- slight additional performance improvement

INT-3308 FinalSingleHandlerChannel

This is still a work in process.

TODO:Parser, parser tests.

See the DirectChannelTests for perforance results.

INT-3308 'Final' Channel Parser Changes, Tests

INT-3308 Polishing; PR Comments

INT-3308 Polishing

* Rename 'final' attribute to 'fixed-subscriber'
* Rename `BasicSingleFixedSubscriberChannel` to `FixedSubscriberChannel`

INT-3308 Polishing

* Rename test cases to match channel
* Fix parser error messages
* Add more exclusive attribute/element tests

INT-3308 More Polishing

* Remove remaining textual references to 'final'
* WARN log if the single subscriber has auto-startup="false"
* Handle the case when a fixed subscriber channel is declared after its handler
* Support the use of a fixed subscriber channel for elements created by an AbstractOutboundChannelAdapterParser
2014-03-06 13:28:08 +02:00
Artem Bilan
f0a1f81931 INT-3312: Add Support for outputChannelName
JIRA: https://jira.springsource.org/browse/INT-3312

* Add `setOutputChannelName` to `AbstractReplyProducingMessageHandler` and `SourcePollingChannelAdapterFactoryBean`
to allow to have 'late binding' and resolve the real channel from `AC` on component initialization, instead of creation phase
* Add `setRequestChannelName` and `setReplyChannelName` to `ContentEnricher` for the same purpose
* Make `HeaderValueMessageProcessor` implementation `public`. It is useful for JavaConfig and DSL
* Polishing parsers to use classes, not their names as strings

INT-3312: PR comments

INT-3312: Polishing
2014-03-05 12:18:48 -05:00
Gary Russell
5c68029a72 INT-3298 WARN if RSFB Falls Back to SeqSizeRS
JIRA: https://jira.springsource.org/browse/INT-3298

Emit a WARN log whenever the `ReleaseStrategyFactoryBean`
falls back to using the `SequenceSizeReleaseStrategy`.

This will happen if no method name is provided and no
annotated method is found, or a null reference is provided.
2014-03-05 17:25:53 +02:00
Gary Russell
727a554ccf INT-3294 Support Implicit Input Channel with Ann.
JIRA: https://jira.springsource.org/browse/INT-3294

Previously, implicit input channel creation was not
supported for annotated endpoints.

Register a `DirectChannel` if the input channel does
not exist in the context.
2014-03-04 18:28:57 -05:00
Artem Bilan
5d2820dfbe INT-1834: Register Beans for Annotated Handlers
JIRA: https://jira.springsource.org/browse/INT-1834

The general issue has been raised about `MessageHistory` for annotated endpoints (`@ServiceActivator`, `@Transformer` etc.)

* Register generated `MessageHandler`s as beans with concrete names based on component, method and annotation.
* Add tests and docs

In addition revert the version for JRuby to 1.7.8 as other latests versions have a NPE issue around `System.console()`

Doc Polishing
2014-03-03 16:55:54 -05:00
Artem Bilan
12287056d3 INT-3297: Add @MessagingGateway Support
JIRA: https://jira.springsource.org/browse/INT-3297

* Add `<gateway>` annotation analogue and its `MessagingGatewayRegistrar` to register `GatewayProxyFactoryBean` based on annotation attributes
* Add `@IntegrationComponentScan` and its `IntegrationComponentsRegistrar` to scan packages for integration components
* Add implementation to scan `@MessagingGateway`
* Add simple `@MessagingGateway` test

INT-3297: Further improvement

* Make `GatewayParser` to delegate the hard work to the `MessagingGatewayRegistrar`
* Add Docs
* Checked all existing tests

INT-3297: Polishing

INT-3297: Get rid of annotation dep from GWParser

Polishing - Docs and Assertion

Assert that the `@MessagingGateway` is on an interface.
2014-03-03 16:06:06 -05:00
Artem Bilan
6a840783e7 INT-3300: Fix MS ref Regression for i-c-adapter
JIRA: https://jira.springsource.org/browse/INT-3300

The change introduced by https://jira.springsource.org/browse/INT-3147
(Registration of `MessageSource<?>` as a bean with suffix `.source`) broke
the case where `MessageSource<?>` is a reference to an existing bean.

Add check to the `AbstractPollingInboundChannelAdapterParser` for the type
of `source` and apply the appropriate logic.

INT-3300: Get rid of Spring Boot dependency

Remove test case that introduced a cyclic dependency.
2014-02-21 18:22:22 -05:00
Gary Russell
ccb0b8aa8e INT-3295 Add Doc For Global MessageConverter
JIRA: https://jira.springsource.org/browse/INT-3295

Plus test.
2014-02-12 14:12:27 -05:00
Gary Russell
25489adaa3 INT-3295 Datatype Channel : Use MessageConverter
JIRA: https://jira.springsource.org/browse/INT-3295

Instead of invoking the conversion service directly, do it
via a MessageConverter (DefaultDatatypeChannelMessageConverter).

That way, users can override the MessageConverter; for example,
XD wants to look at the content-type header during the conversion
process (and update the content-type).

INT-3295 Polishing

PR Comments.
2014-02-12 20:21:09 +02:00
Artem Bilan
814caea5d5 INT-3293: Add Lambda Strategies
JIRA: https://jira.springsource.org/browse/INT-3293
2014-02-11 10:50:50 -05:00
Artem Bilan
8cbaef7c6b INT-3292: Add support for Boot AutoConfiguration
JIRA: https://jira.springsource.org/browse/INT-3292

As far as Spring Boot reads `spring.factories` for key
`org.springframework.boot.autoconfigure.EnableAutoConfiguration`,
there is no difficulties to provide a hook to enable Spring Integration
via just Boot `@EnableAutoConfiguration`
2014-02-10 12:00:46 -05:00
Artem Bilan
2fd27e3a6c INT-3286: Add @EnableMessageHistory
JIRA: https://jira.springsource.org/browse/INT-3286

Introduce `@EnableMessageHistory` and `MessageHistoryRegistrar`.
Refactoring for `MessageHistoryParser` to use `MessageHistoryRegistrar` to follow with DRY
Add test for `@EnableMessageHistory`

INT-3286: Polishing

INT-3286: Enable several MHs with the same value

Previously the Framework allowed only one `<message-history>`
independent of their `tracked-components`.
With introduction of `@EnableMessageHistory` and `MessageHistoryRegistrar`
the `MessageHistoryConfigurer` is improved to allow
several `<message-history>` or `@EnableMessageHistory`
with the same set of `componentNamePatterns`.

INT-3286 Polishing + JMX + Docs

* Allows setComponentNamePatterns and/or setComponentNamePatternsSet to
  be used as long as the settings are consistent.
* Handle the case where the `MHC` was configured as a bean (no managed set exists)
* Add support for changing the component name patterns over JMX + test case
* Docs

INT-3286 More Polishing

* Change bean name to `messageHistoryConfigurer`
* Move constant to `ICU`
* Export the MBean by the `IMBE`
2014-02-10 08:51:13 -05:00
Artem Bilan
ea080e8a9b INT-3284: Add 'spring.factories' Infrastructure
JIRA: https://jira.springsource.org/browse/INT-3284

* Introduce `IntegrationConfigurationBeanFactoryPostProcessor`, `IntegrationConfigurationInitializer`
* Apply `IntegrationConfigurationInitializer` and 'spring.factories' for HTTP and Security modules

INT-3284: Address PR's comments

JIRA: https://jira.springsource.org/browse/INT-3287

* Fix package tangle (INT-3287)
* Apply `IntegrationConfigurationInitializer` for `MBeanExporterHelper`
* Previously, there was a separate `ChannelSecurityInterceptorBeanPostProcessor`
for each `ChannelSecurityInterceptor` whereas now, there is one `ChannelSecurityInterceptorBeanPostProcessor`
that processes all interceptors

INT-3284 Refactoring around config package tangle
2014-02-06 11:58:23 -05:00
Gary Russell
b59fe444cf Polish MixedDispatcherConfigurationScenarioTests
Assert the latches countdown instead of using an overall
Junit timeout.

Failures: https://build.springsource.org/browse/INT-B40X-JOB1-78
2014-02-04 17:12:45 -05:00
Artem Bilan
4ae5152eff INT-3250: Add @EnableIntegration Infrastructure
JIRA: https://jira.springsource.org/browse/INT-3250

* The main purpose of this change to move all infrastructure bean definitions
from `AbstractIntegrationNamespaceHandler` to a new `IntegrationRegistrar`.
* `IntegrationRegistrar` is invoked by the standard `@Configuration` process and also directly from `AbstractIntegrationNamespaceHandler`.
* Provide some refactoring for consistency.
* Add AnnotationContext tests

INT-3250: Polishing

* Remove `@EnableIntegration#defaultPublisherChannel`
* Revert `#jsonPath` & `#xpath` registration logic
* Fix for DEBUG message on each parse

JIRA: https://jira.springsource.org/browse/INT-3258

INT-3250 Fix JavaDocs & IDEA+Gradle srcDirs issue

INT-3250: Revert `build.gradle` changes

INT-3250 Polishing

* Remove commented out code
* Add javadoc to IntegrationRegistrar.registerBeanDefinitions()
* Fix javadoc links to other Spring projects (and JVM, JEE)
* Add reference documentation and what's new
2014-02-04 16:30:03 -05:00
Artem Bilan
7e32b17a10 INT-3005: Add throwExceptionOnLateReply Property
JIRA: https://jira.springsource.org/browse/INT-3005

* `GenericMessagingTemplate` has `throwExceptionOnLateReply` property.
This change provides a global `messagingTemplate.throwExceptionOnLateReply` property
to allow change default `false` to `true` using `spring.integration.properties`

* Refactor `spring.integration.properties` keys to be consistent with other Spring properties - adde prefix `spring.integraton.`

INT-3005: Add test for `lateReply`

INT-3279: Fix classes tangle
2014-01-29 11:52:48 -05:00
Artem Bilan
2b888b7a76 INT-1897: Refactoring for ChannelInterceptors
JIRA: https://jira.springsource.org/browse/INT-1897

INT-1897: Introduce `ChannelInterceptorAware`

Upgrade to SF 4.0.1

JIRA: https://jira.springsource.org/browse/INT-3255
2014-01-29 10:47:26 -05:00
Artem Bilan
062e7bc9d2 INT-3130: Add result-type to <o-to-j-transformer>
JIRA: https://jira.springsource.org/browse/INT-3130

* add `result-type` attribute to the `<object-to-json-transformer>`
based on enumeration values: `STRING`, `NODE`
* Provide implementations for methods to convert value to the node representation
* Refactoring according new generic option in the `JsonObjectMapper`
* Add tests and documentation

Need Migration Guide note according this refactoring

INT-3130: remove some deprecation and JavaDocs

Addressed PR comments

Doc Polishing
2014-01-28 13:05:14 -05:00
Gary Russell
5cb9f05a40 INT-3271 Revert MessageHandlingException Ctor Use
When `MHE` was moved to spring-messaging, 2 constructors were
dropped. INT-3246 worked around it but it had undesirable
side-effects. Constructors have been added back in
spring-messaging so this commit reverts to using those
constructors.

JIRA: https://jira.springsource.org/browse/INT-3271
2014-01-24 10:58:31 +02:00
Gary Russell
56ad69b3f6 INT-3276 Failing CI Tests
* Add test diagnostics
* Increase timers

JIRA: https://jira.springsource.org/browse/INT-3276
2014-01-23 13:18:23 -05:00
Gary Russell
7c7fc3fe2c INT-3276 Use a ThreadPool For Aggregator Stress
Stress tests previously created 36,000 threads.

JIRA: https://jira.springsource.org/browse/INT-3276
2014-01-23 12:52:29 -05:00
Artem Bilan
b817e98a44 INT-3249: property-placeholder for log-c-a Level
JIRA: https://jira.springsource.org/browse/INT-3249
2014-01-21 10:09:18 -05:00