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
The SimplePool maintains an 'allocated' set, for the sole reason
of preventing a "foreign" (non-managed) object being returned.
When a pool item is detected as stale, it is removed from the pool
but remains in the 'allocated' set.
Add a test to verify the allocated size is reduced when a stale
item is popped from the pool.
Add a FileTransferringMessageHandler test (where the problem was
discovered).
Fix a test in TCP to expect a close().
Polishing
Do not allow returning null items to just release a permit - it
cannot remove the item from allocated. Clients must return the
stale item to the pool so it can be refreshed on the next get.
Only used by the TCP caching CF when returning a connection when
the factory is not running; but should not be allowed.
Also, protect against double release - not currently an issue with
existing users of SimplePool, but should be protected against. Could
cause the permit count to exceed the pool size.
Add inUse Set to the pool so we can detect attempts to release an
item that has already been released.
Previously, the `<delayer>` provided a `delay-header-name` attribute.
In complex cases there was need to precede it with `<header-enricher>`.
* Add support for an 'expression' attribute and sub-element
* Deprecate `delay-header-name`
* Make `DelayHandler.DelayedMessageWrapper` *public* to allow access for Messages in the Store
* Add tests
* Add 'What's new' section
* Polishing Delayer's doc regarding new abilities
JIRA: https://jira.springsource.org/browse/INT-2243, https://jira.springsource.org/browse/INT-3049
INT-2243: ban delay-header-name with expression
INT-2243 Polishing
INT-2243: fall-back to default on Eval Exception
INT-2243: DelayedMessageWrapper refactoring
* Make `DelayedMessageWrapper` Spring Data Mongo mapping compatible.
In terms of Spring Data - add Persistence Constructor
INT-2243 add 'ignore-expression-failures' support
* Add `ignore-expression-failures` to the `<delayer>`
* Add tests for `ignore-expression-failures`
* Add a note to the RM
* Describe SpEL side-effects for `DelayHandler`
Doc Polishing
Allow configuration of request handler advice chain using
- ServiceActivator
- Filter
- Splitter
- Transformer
annotations.
Also, with splitter, allow setting discardWithinAdvice (See
INT-2938).
INT-2994 Polishing: PR Comments
- Change adviceChain attribute to an array
- Use a boolean for the discardWithinAdvice attribute
INT-2994 Handler Advice Doc Polishing
Add a paragraph about Advice Order.
* Add `requires-reply` attribute for all adapters outbound gateways as `true` by default
* WS-outbound-gateway is still without it, because it has its own specific attribute `ignore-empty-responses`
* Make `requires-reply` as `false` by default for `jdbc:stored-proc-outbound-gateway` inasmuch as `jdbc:stored-proc-outbound-adapter`
doesn't have ability to configure `returning-resultset`
* add parser tests for `requires-reply`
JIRA: https://jira.springsource.org/browse/INT-2822
INT-2822 'requires-reply' for ws:outbound-gateway
Default false.
INT-2822: Polishing after rebase
INT-2822: deprecate 'ignore-empty-responses'
* Add 'requires-reply' section into What's New
INT-2822: remove 'ignore-empty-responses' from RM
INT-2822: Polishing after rebase
INT-2822: Rebased and polished
INT-2822: Rebased and polished
Add WARN within deprecated `AbstractWebServiceOutboundGateway#setIgnoreEmptyResponses`
Revert 'ignore-empty-responses'; Doc Polishing
TCP streams have no standard message structure. Therefore, the
TCP implementation previously only transferred the message
payload.
If someone wanted to convey header information, they would have
to write their own wrapper and/or use Java serialization for
the entire message.
This change provides a strategy to allow users to determine
which headers are transferred, and how.
A MessageConvertingMessageMapper is now provided that invokes
any MessageConverter. A MapMessageConverter is provided that
converts the payload, and selected heades to a Map with two
entries ("payload") and ("headers").
A MapJsonSerializer is provided that converts a Map to/from
JSON. Jackson can't delimit multiple objects in a stream
so another serializer is required to encode/decode structure.
A ByteArrayLfSerializer is used by default, inserting a
linefeed between JSON objects.
The combination of these elements now allows header
information to be transferred over TCP. Of course, users
can implment their own (de)serializer to format the
bits on the wire exactly as needed by their application.
INT-1807 Polishing
Add a test that uses a Map MessageConverter with a
Java (de)serializer.
INT-1807: Polishing
INT-1807: Rebased and polished
Change `MapJsonSerializer` to use `JsonObjectMapper` abstraction
Doc Polishing
Use `com.eaio.uuid` by default and document how to replace
the default strategy.
Provide JDK and a simple incrementing incrementing implementation.
Add code to detect multiple contexts in the same classloaded using
the same strategy.
Add code to detect multiple IdGenerator beans and emit a WARN
instead of DEBUG, which is the case for no beans.
INT-3007 introduced a warning log when advising a non-message handler
class. However, the log was also emitted when other methods on a
real MessageHandler were invoked.
Suppress the message in these cases and improve the log by
including the concrete class for the method rather than the
interface on which the method is declared.
Allow an application to be informed of problems on the IMAP idle
thread by emitting an event containing the exception.
Introduce IntegrationApplicationEvent hierarchy for all
events emitted by SI components.
INT-3099 Polishing (PR Comments)
Separate TCP events into discrete subclasses.
INT-3030 Polishing; Docs, Tests
Add test cases for error channel support.
Dynamically discover available RMI port.
Add What's New and `<important/>` to reference.
INT-3094 Fix JSON Package Tangle
Move JSON 'discovery' classes to .support.json (used by
.json and .transformer - ObjectToMapTransformer)
INT-3094 Fix JSON Class Tangle
Separate factory methods to avoid class tangle.
Remove tight tangle between parser and mapper.
INT-3094 Fix Core Package Tangle
Move NamedComponent from .context to .support.context
(Used by .history, and .context references .store which references
.history through .util.)
INT-3094: fix 'support.json' package class-cycle
INT-3094 Polishing - PR Comments
Remove parser provider and make parsers public.
`<service-activator>` has had an attribute `requires-reply`,
but it wasn't available within `chain`.
Introduce new XSD type `serviceActivatorType`
and use it for root `<service-activator>` element and within `<chain>` as well.
JIRA: https://jira.springsource.org/browse/INT-3108
Provide an option to determine whether or not the discard
(and exception throwing if configured) occurs within the
advice chain (default), or after it completes.
INT-2938 Filter Discard Advice Option - Schema
Schema, parser, tests for option on filter element.
INT-2938 Polishing - PR Comments + Doc
INT-2938 Add to "What's New"
INT-2938 Polishing - Javadoc Typo
while merging: simplified to use boolean var only
https://jira.springsource.org/browse/INT-2951
Provide the context id in the 'Dispatcher has no Subscribers'
message.
Ease debugging when more than one context in an application.
INT-2951 Polishing
PR Comments - add quotes to context Id in log message.
Polishing
INT-2951 Polishing
Change IOS to have a simple getApplicationContextId() and
add a method getFullChannelName() to AbstractMessageChannel.
* Introduce XSD 'id' attribute for all `<chain>` sub-components
* Register `<chain>` sub-components as Beans with names based on `<chain>` 'id'
* Generate aliases for sub-components based on element 'id'
* Add `<chain>` parser test to check sub-components as Beans within `BeanFactory`
* Ignore `NestedChainParserTests` as abnormal and confused for SI-configs
* Now `<chain>` sub-components are trackable by `MessageHistory`
* Now `<chain>` sub-components are eligible for JMX export
* Polishing some failed tests
https://jira.springsource.org/browse/INT-2755https://jira.springsource.org/browse/INT-2321
INT-2755: Register as Beans only if 'id' provided
INT-2755: Set 'componentName' for handlers with 'id'
When components within `<chain>` are configured with an 'id' attribute
the 'componentName' of the handler is constructed as:
chainHandler.componentName + '.' + handler.componentName.
Otherwise it is as was before.
INT-2755: Polishing
INT-2755: changes according PR's comments
* Add INFO about preference of `id` attribute for `<chain>` in the `ChainParser`
* Change `<chain>`'s sub-components `id` generation algorithm
* Configure `<chain>`'s sub-component `componentName` in the `ChainParser` instead of in the `MessageHandlerChain`
* Add `componentName` property to the `JpaOutboundGatewayFactoryBean`
* Add a note to the Reference Manual
INT-2755: Localize duplicate 'id' within chain
INT-2755: remove child beans aliasing
* Polishing tests
* Polishing docs
INT-2755 Polishing: Handle Nested Chain Bean Names
Previously named beans within a nested chain did not get unique
bean names.
INT-2755: Polishing nested chains
Doc Polishing
https://jira.springsource.org/browse/INT-3004
Previously, reply messages were silently ignored if the request thread
times out or caught an exception, or had already handled a reply.
Add a WARN log if the client times out or catches an exception,
or has already received a reply.
Optionally make these fatal; at this time, we are not exposing
this boolean on the namespaces see INT-3005.
Polishing - PR Comments
INT-3004 Polishing
Change MessagingTemplate property to throwExceptionOnLateReply.
Previously, the `ApplicationEventListeningMessageProducer` accepted
all `ApplicationEvent`'s and than filtered them.
This caused some `ApplicationEventMulticaster.retrieverCache` overhead.
* Improve `ApplicationEventListeningMessageProducer` to `implements SmartApplicationListener`.
This allows filtering earlier on first the appropriate `ApplicationEvent`
using `ApplicationEventListeningMessageProducer#supportsEventType`
and caching the `ApplicationListener` only for that `ApplicationEvent`.
* Re-register `ApplicationEventListeningMessageProducer` in the `ApplicationEventMulticaster`
when `ApplicationEventListeningMessageProducer#setEventTypes` is invoked
to clear the `ApplicationEventMulticaster.retrieverCache`.
* Move `org.springframework.integration.gemfire.inbound.SpelMessageProducerSupport` to core `ExpressionMessageProducerSupport`.
* Add test for the new logic int `ApplicationEventListeningMessageProducer` and its behavior with respect to the `ApplicationEventMulticaster.retrieverCache`.
JIRA: https://jira.springsource.org/browse/INT-2935
INT-2935: EMPS JavaDoc & AELMP ReadWriteLock
INT-2935: AELMP#eventTypes changing 'barrier'
INT-2935: avoid 'eventTypes' mutation afterwards
INT-2935: Polishing according PR comments
INT-2935: Fix NPE in the `setEventTypes`
Minor Polishing
Polish java docs/comments
Remove compiler warnings
Previously, when a MessageHandlerAdvice is applied to something
other than a MessageHandler, the advice was silently skipped.
Add a WARN log message that warns that the advice is not applied.
Add a test case that ensure the log is emitted when the
advice is applied to a Poller.
Compatibility with SF 3.2.2
Previously the filter returned a Collections.singletonList() when
a match is found.
Spring 3.2.2 attempts to sort the results of MethodFilter.filter()
which fails because the list is immutable.
Continue to return Collections.emptyList() with no match; this
does not cause the sort to fail.
Several tests in MethodInvokingMessageProcessorTests reproduce this
problem with Spring 3.2.2.
Add a test to confirm the Collections.emptyList() does not cause
any problems.
modified per Artem's comments and added pub-sub to support inbound taps
Modified tap to use provided wiretap on inbound channels. Tap on outbound not supported
Changes to support conditional shared channel creation and the ability to share a registered channel for inbound() and outbound()
TestUtils exists in both s-i-test and in src/test... in
s-i-core.
Gradle import caused the file module to use the one in
core that was missing a method.
We should look at a better solution but for now, this
commit syncs the two versions.
Also polished to fix white space violations.
Add Jackson 2 support while retaining backward compatibility as much as possible.
Introduce a new abstraction for JSON conversion.
JIRA: https://jira.springsource.org/browse/INT-2831
INT-2831: Polishing
* remove `JsonObjectMapperFactoryBean`
* add @Deprecated constructors to `ObjectToJsonTransformer` and `JsonToObjectTransformer`
Polishing
Docs, compiler warnings.
INT-2964 - JavaDoc: <emphasis> should be <em>
INT-2964 - JavaDoc: <p/> should be <p>
INT-2964 - JavaDoc polishing
* <li></li> should be wrapped in <ul></ul>
* wrap code snippets in {@code myCode()}
* change <code>false</false> to <code>false</code>
INT-2964 - Polish - Fix more JavaDoc errors
* Mockito-all dependency causes JavaDoc error. Change dependency to Mockito-Core.
- Don't evaluate expression if the log level is not enabled
- Add mutually exclusive assertions (already protected by the parser
but not for programmatic configuration).
INT-2944 Document <logging-channel-adapter/>
Add reference sub-chapter.
INT-2939 Polishing - PR Comments
- remove unnecessary cast.
- add setter for level changes.
Polishing
* Change setter to use enum.
* Add getter for current level.
* Rename method to 'createLogMessage'.
The fix for INT-2650 (to avoid unnecessary array copying) was
too general in that it also prevented types in collections and
maps from being converted.
Add tests to illustrate that such payloads are not converted.
Change code to only short circuit the conversion process if
the payload is a primitive array.
An existing test ensures that arrays are not copied.
Add more tests to complete coverage - discovered another
bug - the early exit after using a property editor to convert
to a String was never taken - it was testing against the
Class of the TypeConverter instead of the Type. If the
target type is a String, we don't need to perform
conversion after the property editor has done its
conversion.
Fix MessageHistory test (was testing MessageHeaders).
`charset` for `<object-to-string-transformer>` was placed in the common `inputOutputChannelGroup` attributeGroup.
`charset` wasn't available within `<chain>`.
* Move 'charset' from `inputOutputChannelGroup` to the new `specialized-transformer-charset-aware-type` complexType
* Add test for 'charset' within `<chain>`
JIRA: https://jira.springsource.org/browse/INT-2958
Groups changed within the same millisecond that they
were selected for reaping can cause aggregators to
emit duplicate messages.
Use the re-fetched group (used to see if the timetamp
changed) instead of the group passed in to forceClose
(the group might have changed since it was selected as
eligible for reaping).
We still retain the last modified check because it
might have been expired using timeoutOnIdle.
AbstractMessageRouter.getRequiredConversionService() and
IntegrationObjectSupport.getConversionService() try to initialize the
conversion service and may be called from multiple threads. There is
a race condition where this could end up in an uninitialized conversion service
causing NPEs in subsequent method calls.
To solve this issue, the conversion service is initialized with
double-checked locking.
For further details see https://jira.springsource.org/browse/INT-2931
INT-2931 Polishing - Add Test Case
Add a test case that reliably reproduces the issue and verifies
the fix.
* Convert byte[] and char[] to String rather than simply using toString().
* Allow the charset to be configured for byte[] payloads.
* Add tests.
* Add reference documentation updates.
When referencing a <gateway/> from a <service-activator/>, a debug
log is written with a full stack trace.
This is because all methods on the proxy are considered candidates,
but one method (addAdvice) has multiple parameters and can't be
used to process a message.
Add code to detect a proxy that has no target object; if the Proxy
only has one interface, then use that as the targetClass.
During initialization, it is possible for type conversion to fail because a second thread accesses a partially built list of PropertyEditors. This is because getDefaultEditor(Class) is not thread-safe.
* Add a test with mocks and spies to verify concurrent access to the method occurs before the fix, and not after the fix.
* Synchronize the call to getDefaultEditor(), when called from canConvert() and convertValue().
* Only synchronize the call until we have invoked the method at least once.
Operations on QueueChannel (clear, getQueueSize etc) are not available
when the IntegrationMBeanExporter is configured because they
are not declared on the PollableChannel interface.
Add an additional interface QueueChannelOperations.
The proxy proxies all interfaces so users can cast the
proxy to QueueChannelOperations to use its methods.
Previously, `AggregatingMessageHandler#setExpireGroupsUponCompletion` had additional logic
for removing complete MessageGroups. It could produce some overhead on application start-up with big persistent `MessageStore`.
This logic played a role to remove empty groups from a `MessageStore`.
Since `AbstractCorrelatingMessageHandler#forceComplete` has an ability to to remove empty groups too,
this logic became redundant.
So, to clean `MessageStore` from empty complete groups, it's sufficient to use a `MessageGroupStoreReaper`.
* Remove logic iterating over the `MessageStore` from `AggregatingMessageHandler#setExpireGroupsUponCompletion`
* Polishing `AggregatorSupportedUseCasesTests.java` to use `store.expireMessageGroups(0)`
* Introduce `empty-group-min-timeout` xml-attribute, populating `AbstractCorrelatingMessageHandler#minimumTimeoutForEmptyGroups`
* Add parser tests for `empty-group-min-timeout` attribute
JIRA: https://jira.springsource.org/browse/INT-2899
INT-2899: Documentation about changes of ACMH
* rename new XSD-attribute to `empty-group-min-timeout`
* add to Reference Manual description about `empty-group-min-timeout`
* add 'What's new' for `empty-group-min-timeout`
* add 2.2-3.0 Migration Guide note
INT-2899 Doc Polishing
In the parent-child environment configuration that relies on class names may produce
a `ClassNotFoundException`.
* remove usage of `ClassLoader` in the `MapToObjectTransformerParser` and allow to use the `ConversionService` from application context
* remove deprecation from `MapToObjectTransformer`
* refactor `MapToObjectTransformer` to use `IntegrationObjectSupport#getConversionService()`
* remove fallback to the `beanFactory#getConversionService()` in the `ExpressionUtils`
JIRA: https://jira.springsource.org/browse/INT-2888
INT-2928: Do Not Fallback to BF's ConversionService
* Polishing according PR's comments
* Important note about `conversionService` & `integrationConversionService` beans
* Link a JIRA about elimination of `BeanFactory`'s `ConversionService` usage
* Add a note to the 2.2-3.0 Migration Guide
JIRA: https://jira.springsource.org/browse/INT-2928
INT-2888 Doc Polishing
* MessageGroupStore <-> MessageGroupCallback
- Change callback to be an inner interface of the MGS.
* INT-2829 Fix Class Tangle in IP Module
- 3 way tangle between TcpSender, TcpConnection, TcpMessageMapper
- Clean up interfaces (remove setters); add top-level support classes for TcpConnection, TcpConnectionInterceptor.
* INT-2829 Remove TCP Package Tangle
- tcp.connection <-> tcp.connection.support
- Remove ...connection.support package - move classes to ...connection.
* add XSD element for nested router type
* add tests on the matter
* polishing for RouterParserTests
JIRA: https://jira.springsource.org/browse/INT-2893
INT-2893: Polishing
INT-2893: after rebasing to 3.0
XSD changes reverted from 2.2 and moved to 3.0
INT-2893 Polishing
Factor out common elements; fixing missing documentation for
`expression` within a `router` within a `chain`.