JIRA: https://jira.spring.io/browse/INT-3642
Currently, `removeMessageFromGroup` rebuilds the group on every removal.
In every case where this method is used in the framework, the result is not used.
Add `removeMessagesFromGroup` that removes a collection of messages and returns no result.
INT-3642: Polishing - PR Comments
INT-3642: Polishing and Fix Group Metadata Size
JIRA: https://jira.spring.io/browse/INT-3661
Previously there were a lot of noise from the `PostProcessorRegistrationDelegate$BeanPostProcessorChecker` for early access for beans.
That may produce some side-effects when some of `BeanFactoryPostProcessor`s won't adjust those beans.
The issue is based on two facts:
1. Loading beans from `BPP`, e.g. `IntegrationEvaluationContextAwareBeanPostProcessor` (or `ChannelSecurityInterceptorBeanPostProcessor` - https://jira.spring.io/browse/INT-3663)
2. Loading beans from `setBeanFactory()/setApplicationContext()` container methods
* Move all code from `setBeanFactory()` with access to the `BeanFactory` (e.g. `this.messageBuilderFactory = IntegrationUtils.getMessageBuilderFactory(this.beanFactory);`)
to some other lazy-load methods like `getMessageBuilderFactory()`
* Fix parser tests to remove `messageBuilderFactory` tests since there is no activity for target components to lazy-load them
* Polish some test according the new lazy-load logic
* Rework `IntegrationEvaluationContextAwareBeanPostProcessor` to the `SmartInitializingSingleton` and make it `Ordered`
* Populate `beanFactory` for the internal instance of `connectionFactory` in the `TcpSyslogReceivingChannelAdapter`
* Populate `beanFactory` for the internal `UnicastReceivingChannelAdapter` in the `UdpSyslogReceivingChannelAdapter`
* Add `log.info` that `UdpSyslogReceivingChannelAdapter` overrides `outputChannel` for the provided `UnicastReceivingChannelAdapter`
* Change the internal `MessageChannel` in the `UdpSyslogReceivingChannelAdapter` to the `FixedSubscriberChannel` for better performance
* Fix `AbstractExpressionEvaluator`
* Add JavaDocs for the `IntegrationEvaluationContextAware`
Fix `MongoDbMessageStoreClaimCheckIntegrationTests`
Addressing PR comments
JIRA: https://jira.spring.io/browse/INT-3632
- Use Map.entrySet()
- Double check locking only works when the field(s) are volatile
- Remove unnecessary instanceof tests
JIRA: https://jira.spring.io/browse/INT-3581
Move schemas to 4.2.
Add `selector-expression` to `<wire-tap/>`.
INT-3781: Fix What's New
Bump Namespace Version to 4.2
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
JIRA: https://jira.spring.io/browse/INT-3374
Move `getMessageBuilderFactory` from `IntegrationContexUtils`
to `IntegrationUtils`.
Change DOS Newlines to Unix
`AbstractMessageGroupStore`.
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.
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.
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.
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
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.
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
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.
Links to classes moved to `spring-messaging`.
Also `MessageHeaders` was inadvertently added back in by the
last merge.
JIRA: https://jira.springsource.org/browse/INT-3189
__NOTE: Merge to 4.0.0-WIP, not master__
Previously, `MetadataStore` couldn't be configured for Twitter Adapters
- only a global one could be used.
The `metadataKey` was generated automatically with a 'difficult' value.
* Register all `MessageSource` for `SourcePollingChannelAdapter`
as beans with id based on adapter id and prefix '.source' (INT-3147)
* Polishing parser to get rid of explicit `MessageSource` beans. (INT-3147)
* Make Feed and Twitter adapters `id` attribute as required -
now it presents a `metadataKey` for `MetadataStore` (INT-3147)
* Add to Twitter adapters a reference attribute for `MetadataStore` (INT-3173)
* Add Twitter adapters `poll-skip-period` attribute (INT-3167)
* Add and implement `MetadataStore#remove` (INT-1941)
* Make `MetadataStore` as `@ManagedResource` (INT-1941)
* Polishing tests
JIRAs:
https://jira.springsource.org/browse/INT-3147https://jira.springsource.org/browse/INT-3167https://jira.springsource.org/browse/INT-3173https://jira.springsource.org/browse/INT-1941
INT-3147: Polishing and fixes
* add domain suffix to `metadataKey`
* change contract of `MetadataStore.remove`
* remove timeout window from `AbstractTwitterMessageSource`
* polishing and fix `SearchReceivingMessageSourceWithRedisTests`
INT-3147: Rebasing and polishing
INT-3147: fix 'metadata' package tangle
INT-3147 Doc Polishing
* Remove `@Ignore` from `MongoDbMessageStoreTests#testInt3153SequenceDetails()`
* Revert generic for `SessionFactory` field in `SftpServerOutboundTests`
This commit updates Spring Integration to depend upon Spring 4, making
use of the message types that have moved from Spring Integration into
Spring's new spring-messaging module.
The default message converter no longer supports conversion of a
message that is null, throwing an IllegalArgumentException if an
attempt is made to convert null. Furthermore, GenericMessagingTemplate
does not support sending null, again throwing an
IllegalArgumentException. Previously, MessagingTemplate had no-oped an
attempt to send null.
ConcurrentAggregatorTests and AggregatorTests both had a single test
that was specifically testing the behaviour of an aggregator that
returns null for its message. These tests have been removed.
CorrelatingMessageHandlerTests have been updated to specify some
additional behaviour for its mocks so that null messages are not
returned.
These are the only functional changes that have been made. All other
changes are simply for moving to the repackaged and/or renamed types.
In the move to being part of core Spring, a number of constants and
header accessor methods have moved from MessageHeaders to
MessageHeaderAccessor. This commit continues this pattern for
the enterprise integration headers that are specific to Spring
Integration. A new class, EiMessageHeaderAccessor, has been created.
This class provides constants and methods for working with SI-specific
headers. The main code and tests have been updated to use this new
class.
The general idea is to use Spring-MVC as much as possible.
* Introduce `RequestMapping`, `IntegrationRequestMappingHandlerMapping`
* Introduce XSD nested element `<request-mapping>` for HTTP Inbound Endpoints
* Introduce `inboundCommonAttributes` XSD attributeGroup for HTTP Inbound Endpoints
* Introduce `IntegrationNamespaceUtils#createExpressionDefIfAttributeDefined` & `IntegrationNamespaceUtils#createDirectChannel`
* Remove deprecated `name` attribute
* Remove `UriPathHandlerMapping` as superseded by `IntegrationRequestMappingHandlerMapping`
* Add documentation for `<request-mapping>`
- Add description to Reference Manual about `<request-mapping>`
* Add documentation to section 'What's new'
* Add additional test for `<request-mapping>`
JIRA: https://jira.springsource.org/browse/INT-2312, https://jira.springsource.org/browse/INT-2619
Additional changes:
* INT-2528 Remove deprecations in HTTP module
- JIRA: https://jira.springsource.org/browse/INT-2528
* Add Jackson 2 support for HTTP-inbound
* Using Jackson 2 HttpMessageConverter if Jackson 2 is available in classpath
* Make `RequestMapping` public
* Introduce `HttpContextUtils` and move `HANDLER_MAPPING_BEAN_NAME` to it
* Revert and deprecate public API
* Improve JavaDocs
* Improve Reference Manual
Thanks also to Biju Kunjummen for his incorporated commit.
* Add XSD attributeGroup `smartLifeCycleAttributeGroup`
* Use it for all adapters tags
* Refactoring `AbstractChannelAdapterParser` hierarchy
* Refactoring some `MessageHandler`'s that should not have `autoStartup` & `phase`.
It is the responsibility of `AbstrctEndpoint`
* Polishing some tests according new logic
JIRA: https://jira.springsource.org/browse/INT-2998
INT-2998: Polishing
Polishing
- Reformat schemas where indentation changed
- Add SLC to the UDP inbound adapter
`DelayerHandlerRescheduleIntegrationTests` fail sometimes
on asserts. Looks like `context.destroy()` works very slow
and `<delayer>` manages to send delayed Messages
JIRA: https://jira.springsource.org/browse/INT-3138
The `DelayHandler.DelayedMessageWrapper` works correctly, as designed by INT-3049.
However `DelayHandler.DelayedMessageWrapper` contains `Message` as a property
and `GenericMessage` can't be reconstructed automatically.
So, added new `DBObjectToGenericMessageConverter` to read `GenericMessage` for
`DelayHandler.DelayedMessageWrapper#original` property.
JIRA: https://jira.springsource.org/browse/INT-3070
Cherry-picked 2.2.x
INT-3070: PR comments
INT-3070: Remove `assert` for common state
Allow modification of context property accessors and
functions.
Polishing
- Fix tests to ensure the EvaluationContextFactoryBean is
available when necessary.
Polishing - Use Utility for ALL EvaluationContexts
Add Test Showing Custom Function
See SpelTransformerIntegrationTests-context.xml
Polishing
Polishing -fix Remote Sync
Polishing - Emit WARN if No BeanFactory
Polishing - Do Not Override ConversionService
Kludge to Prevent Warning When No BeanFactory
Expressions for method invoking in the MessagingMethodInvokerHelper
don't need a BeanFactory - suppress the warning.
Polishing - PR Comments - Invert Boolean
Add new query so the same message found in pollMessageFromGroup is the
one which gets deleted.
See jira for more details: https://jira.springsource.org/browse/INT-3087
INT-3087 Polishing
Use an atomic method in pollMessageFromGroup to pop the first message.
Add test cases for pollMessageFromGroup and removeMessageFromGroup
where the same message exists in multiple groups.
Copy schemas, cleanup whitespace, update spring.schemas files,
update version in AbstractIntegrationNamespaceHandler.
For each schema compared the 2.2 version with the 3.0 version
(diff -w), ensuring the only difference is the import of
3.0 schemas (where appropriate) instead of 2.2.
Added pseudo-tx support for Mail inbound adapters
For polling adapters no changes have been made other then returning a javax.mail.Message instead of its copy so
post-tx dispositions could be performed on it.
For Imap IDLE adapter changes are simiar to the once present in SPCA where TX synchronization logic was added to ImapIdleChannelAdapter
Couple of things to note:
First IDLE receives an array of messages while Polling task receives one message which means i need to sendMessage in the Polling task in the separate thread, so for maintaining single thread semantics we have now it uses single thread executor to send Messages
Renamed MSRH to TransactionalResourceHolder since we no longer use 'source' anywhere and in the case of IDLE there is no MessageSource. Its is truly a holder of attributes we want to make available for use (e.g., SpEL)
INT-1819 Polishing
- Change TransactionalResourceHolder to IntegrationResourceHolder
- Make messageSource available as an attribute
- Allow configuration of Executor for ImapIdle adapter
- Add parser test for TX ImapIdle adapter
- Fix bundlor config for mail
- Remove top level <transactional/> element that was added to core
- Restore 'legacy' mail attributes in TX, and add schema doc
INT-1819 Mail TX Reference Docs
Add reference documentation for mail transaction support.
INT-1819 Remove 'public abstract' from interface
Modifiers are not needed on an interface.
Remove the need for pseudo-transactional element
INT-2727 PseudoTX
Add PseudoTransactionalTransactionManager
INT-2727
addressed PR comments
cherry picked previous code for mail module to eliminate breaking change
INT-2727
initial refactoring pseudo-tx support to use common configuration
INT-2727
finalizing pseudo-tx synchronization support
INT-2727 polishing
INT-2727 polishing based on PR comments
INT-2727 addressed PR comments
INT-2727 polishing
INT-2727 Remove PseudoTransactionalMessageSource
Instead of getResource, bind the resource holder before
receive() and then add attributes to the holder.
INT-2727 polishing
INT-2727 Polishing
Remove bind of #resource; add beforeCommit() test;
add TransactionTemplate tests.