JIRA: https://jira.spring.io/browse/INT-3895
* `@Ignore` `DelayerUsageTests.testDelayWithCustomScheduler()` as very weak test. (We can consider it to remove at all: doesn't test anything from our side)
* Add `LogAdjustingTestSupport` diagnostic to the `OutboundGatewayFunctionTests`
Tentative commit to see more logs from Travis
Additional diagnostics
More STOMP Diagnostics
JIRA: https://jira.spring.io/browse/INT-3896
Routers created by the `RouterFactoryBean` were not suppressed from being exported
by the context exporter when an `IMBE` is present.
Move the suppression logic to `postProcessAfterInitialization()` so the annotation on
the bean created by the factory bean is detected. The annotation is not detected on
the factory bean itself in `postProcessBeforeInitialization()`.
MessagingTemplate had no timeout and could hang the build.
OnlyOneTrigger could fire before the message is sent; increase
the poller receive timeout so the poller thread blocks until the message is sent.
JIRA: https://jira.spring.io/browse/INT-3831
- Add `@IntegrationManagedResource`
- Suppress exporting as an endpoint
Fix `outputChannel` issue for anonymous `MessagingGatewaySupport`
INT-3831: Pure JavaConfig Test
INT-3831: Polishing
Check output channel name for anonymous message source metrics.
Don't use getter on MGS to avoid early channel resolution.
INT-3831: Fix Test - Avoid Second MBeanServer
Reference the `MBSFB` in the context rather than create a new `MBeanServer`.
Polishing
JIRA: https://jira.spring.io/browse/INT-3853
Previously the placeholder definitions for the Messaging Annotation weren't be resolved
if we use `<context:property-placeholder>` instead of `@PropertySource`.
Fix `MessagingAnnotationPostProcessor` and its "kindergarten" to use
`beanFactory.resolveEmbeddedValue()` instead of `environment.resolvePlaceholders()`.
JIRA: https://jira.spring.io/browse/INT-3852
Custom object names in `@IntegrationManagedResource` were ignored.
Some EIP objects were wrapped with their `Lifecycle` in order to expose
a single MBean with all attributes and operations.
This process "hid" the annotation so the object namer failed to detect the
presence of a custom object name or the other attributes.
Also, update the `@IntegrationManagedResource` to use the Spring 4.2 `@AliasFor` annotation.
INT-3852: Polishing
Polishing - Test with Proxy
JIRA: https://jira.spring.io/browse/INT-2541
The `IntegrationMBeanExporter` doesn't register any `@ManagedResource` automatically.
Its `autoDetection` is disabled by default.
Hence such a components like `AbstractMessageGroupStore`
or `WireTap` aren't exposed to the JMX by the `IntegrationMBeanExporter`.
From other side `MBeanExporterHelper` aims to help to avoid duplicate exposing if
an `MBeanExporter` is presented in the CTX.
But `MBeanExporterHelper` did that unconditionally just for the whole `org.springframework.integration` package.
Therefore components which aren't EIP ones aren't exposed to the JMX at all.
* Fix `MBeanExporterHelper` to deal for exclusion based on the `@IntegrationManagedResource` annotation.
* Remove `@IntegrationManagedResource` from those components which aren't EIP.
* Make some polishing in the JMX tests.
JIRA: https://jira.spring.io/browse/INT-3820
Some Proxy may be based on the specif non-user classes and advised with
the provided end-user interfaces.
The best sample is `@Repository` from Spring Data projects.
In this case the `MessagingMethodInvokerHelper` just missed the user interfaces
to consider for the candidate methods or thrown an `Exception` like `NoSuchMethodError`.
* Add `((Advised) targetObject).getProxiedInterfaces()` for the scanning algorithm
* Move the `UniqueMethodFilter` to the internal `Set<Method>` to allow iteration
and filtering for methods from the `targetClass` as well as from all those user interfaces
* Add Spring JPA repository test-case
* Polishing form some time-weak tests
Revert MessagingMethodInvokerHelper
INT-3820: Simple Proxy Interface Method Matching
No-risk solution for INT-3820.
Instead of considering all interfaces on the proxy, only look at proxy interfaces
for a single matching method name if we find no candidate or fallback methods.
Consider the complete solution for 4.3.
Add `Message<?>` method distinguishing
Part 1 - eliminate references from support to other packages
Part 2 - handler to aggregator/router
- move BarrierMH to aggregator
- Fix ScatterGather references
Part 3 - move TrackableComponent
- to support.management
Part 4 - class tangles
- TcpConnectionServerExceptionEvent
- RecipientListRouterManagement
INT-3799: Polishing
JIRA: https://jira.spring.io/browse/INT-2166
* Introduce `ThreadStatePropagationChannelInterceptor` based on the `ExecutorChannelInterceptor`
* Add `SecurityContextPropagationChannelInterceptor`,`SecurityContextCleanupChannelInterceptor`
* Introduce `AbstractExecutorChannel` to utilize `ExecutorChannelInterceptor` logic
* Introduce `MessageHandlingTaskDecorator` to avoid package tangle from `dispatcher` and `channel`
* Introduce `SecurityContextCleanupAdvice` for those cases when we don't get deal with `MessageChannel`s already, but want to have proper way to cleanup `SecurityContext`
* Make `GlobalChannelInterceptorProcessor` as `SmartInitializingSingleton` to avoid `phase` conflicts.
* Fix `MessagingAnnotationPostProcessor` to use `beanFactory.initializeBean(endpoint, endpointBeanName);` instead of manual `start()` invocation bypassing the `phase` logic, hence having a bug, when endpoints have been started very early
* Optimise `AbstractPollableChannel` to use `size` field from `ChannelInterceptorList` instead of `size()` from `Collection<?>`
* Fix `AnnotatedEndpointActivationTests` extracting separate component for annotation configuration instead of using test class directly. This caused very late Messaging Annotations process on that class
* Fix typo in the `spring-integration-jdbc-4.2.xsd`
* Remove some `SOUT`s throughout the project
TODO Docs
PR Comments:
* Remove redundant `AbstractExecutorChannel#executorInterceptors` and make logic based on the `super.interceptors`
* Fix wrong imports order
* JavaDocs for `ThreadStatePropagationChannelInterceptor`
* Docs for `SecurityContext` propagation
INT-3593: Fix FTP PartialSuccess Tests
JIRA: https://jira.spring.io/browse/INT-3593
Sort the files for the MPUT tests.
INT-2166: Add SecurityContext Propagation
JIRA: https://jira.spring.io/browse/INT-2166
* Introduce `ThreadStatePropagationChannelInterceptor` based on the `ExecutorChannelInterceptor`
* Add `SecurityContextPropagationChannelInterceptor`,`SecurityContextCleanupChannelInterceptor`
* Introduce `AbstractExecutorChannel` to utilize `ExecutorChannelInterceptor` logic
* Introduce `MessageHandlingTaskDecorator` to avoid package tangle from `dispatcher` and `channel`
* Introduce `SecurityContextCleanupAdvice` for those cases when we don't get deal with `MessageChannel`s already, but want to have proper way to cleanup `SecurityContext`
* Make `GlobalChannelInterceptorProcessor` as `SmartInitializingSingleton` to avoid `phase` conflicts.
* Fix `MessagingAnnotationPostProcessor` to use `beanFactory.initializeBean(endpoint, endpointBeanName);` instead of manual `start()` invocation bypassing the `phase` logic, hence having a bug, when endpoints have been started very early
* Optimise `AbstractPollableChannel` to use `size` field from `ChannelInterceptorList` instead of `size()` from `Collection<?>`
* Fix `AnnotatedEndpointActivationTests` extracting separate component for annotation configuration instead of using test class directly. This caused very late Messaging Annotations process on that class
* Fix typo in the `spring-integration-jdbc-4.2.xsd`
* Remove some `SOUT`s throughout the project
TODO Docs
PR Comments:
* Remove redundant `AbstractExecutorChannel#executorInterceptors` and make logic based on the `super.interceptors`
* Fix wrong imports order
* JavaDocs for `ThreadStatePropagationChannelInterceptor`
* Docs for `SecurityContext` propagation
Doc Polishing
Address PR comments
Address PR comments
* Extract `ExecutorChannelInterceptor` logic in the `PollingConsumer`
to have an ability to invoke `afterMessageHandled()` on the TaskScheduler's Thread
for example for the `SecurityContext` clean up
* Get rid of all that redundant "clean up" stuff
* Docs polishing
Fix `NPE` in the `PollingConsumer`
Introduce `ExecutorChannelInterceptorAware` to avoid iterators on each message
Polishing; Docs, Sonar
JIRA: https://jira.spring.io/browse/INT-3786
* Increase `receiveTimeout` for several `QueueChannel` and `CountDownLatch` based tests
* Fix `FileSplitterTests` for Windows compatibility - `UTF-8` for bytes conversion
* Make some STOMP tests as `LongRunning`
The next fixing phase
JIRA: https://jira.spring.io/browse/INT-3765
The `beanFactory.getBeanNamesForType(Class<?> aClass)`
has eager `FactoryBean` loading logic and using it from the `BeanPostProcessor`
may cause an issue with late-binding beans like auto-created `MessageChannel`.
The change that code to the
```
beanFactory.getBeanNamesForType(IntegrationMBeanExporter.class, false, false)
```
to bypass `FactoryBean`s eager initialization.
All other similar usage throughout the project are OK, because they are already outside of any `BPP`
**Cherry-pick to 4.1.x and 4.0.x**
JIRA: https://jira.spring.io/browse/INT-3755
JIRA: https://jira.spring.io/browse/INT-3756
Previously JMX was required to enable capturing message counts and statistics.
This is now a separate operation from JMX and can be enabled independently.
For backwards compatibility, enabling JMX will automatically enable statistics
(unless separately configured).
INT-3755: Polishing; PR Comments
Doc Polishing
JavaDocs polishing
JIRA: https://jira.spring.io/browse/INT-3759
Add `IntegrationManagementConfigurer` to globally set the default.
This will be documented/expanded when JIRAs 3755/3756 are implemented.
Polishing; PR Comments
Test Polishing
JIRA: https://jira.spring.io/browse/INT-3752
JIRA: https://jira.spring.io/browse/INT-3754
The statistics are based on this count so, for example the
`meanSendDuration` reflects the mean of total duration from the first send to
the last in each batch.
Also change the linked lists to `Deque`s.
Also remove `isTraceEnabled()` calls - too expensive in high volume environments.
Polishing
Assign the count to a local variable so the mod (%) operation is short
circuited rather than short circuiting the call to isFullStatsEnabled().
INT-3752: Fix Aggregating Metrics
Previously, the duration was for the first message in each sample.
We need to capture the total elapsed time for the sample and use it
for the duration calculation.
Add 'newCount' to the context so the after... method can calculate
the duration at the end of the sample.
The start field does not need to be volatile because its updates
are synchronized.
INT-3752: Fix Javadocs
JIRA: https://jira.spring.io/browse/INT-3704
Some NoSQLs (e.g. Hazelcast) provide a distributed implementations for the `ConcurrentMap`,
so add `SimpleMetadataStore(ConcurrentMap<String, String> metadata)` to allow ot inject any `ConcurrentMap` implementation.
Demonstrate the support for Hazelcast in the `IdempotentReceiverIntegrationTests`
**Cherry-pick to 4.1.x**
JIRA: https://jira.spring.io/browse/INT-3672
Previously the `IdempotentReceiverInterceptor` has been applied only for the `MessageHandler`s which were registered with `.handler` suffix.
Rework `IdempotentReceiverAutoProxyCreatorInitializer` and `IdempotentReceiverAutoProxyCreator` to get deal with **direct** `MessageHandler`s
which can be resulted from `@Bean` methods.
Use the `MessageHandler` real bean name instead of `endpoint pattern` in that case
**Cherry-pick to 4.1.x**
JIRA: https://jira.spring.io/browse/INT-3664
Since all metrics are already direct for the integration components, we don't do any proxying from `IntegrationMBeanExporter`,
and even any other adjustments during BPP phases. Hence this stuff is already redundant for `IntegrationMBeanExporter`.
In addition this change fix the `early access to the BeanFactory from BPP` issue.
INT-3664: Address PR comments
Doc Polish
INT-3664: Polishing according the SF changes to the `PostProcessorRegistrationDelegate$BeanPostProcessorChecker`
JIRA: https://jira.spring.io/browse/INT-3651
- Add documentation for the new JMX environment
- Add the ability to customize the default metrics implementations
- Fix LifecycleMessageHandlerMetrics to get a custom `MessageHandlerMetrics`
- Add an escape to the bean pattern matcher to handle beans starting with `!`
INT-3651: More Docs/Polishing
* JavaDocs polishing
* Change `jmx.xml` to describe `public void stopActiveComponents(long howLong)` not that removed with `boolean force`
JIRA: https://jira.spring.io/browse/INT-3641
Instead of maintaining a moving average on each event, store the events
for offline analysis.
Retain 5*window samples - this means that the earlies retained sample
contributes just 0.5% to the sum. E.g. with a window of 10, the earliest
sample is 0.9**50 (0.005).
Also, defer the conversion from nanoseconds to milliseconds to the
retrieval side.
Experimentation shows this increases perfomance by approximately 2x.
Sending 1B messages to nullChannel.
With Proxy: 1.2M/sec
Afer proxy removed: 2.4M/sec
With this change: 5.3M/sec
INT-3641: Polishing - PR Comments
JavaDocs polishing
JIRA: https://jira.spring.io/browse/INT-3653
Also switch to using `System.nanoTime()` for deltas.
INT-3653: Polishing; PR Comments
INT-3653: Polishing
* Fix `NullChannel` for the generic type
* Add `Assert.notNull` for metrics setters and for the result of `MetricsFactory`
* Fix compile and JavaDocs warnings
JIRA: https://jira.spring.io/browse/INT-3637
- Message Sources
- Message Handlers
Polishing; Final Review and PR Comments
- avoid second call to System.currentTimeMillis()
- fix elapsed time in handler metrics
- expose TrackableComponent when available
INT-3637: Add @IntergrationManagedResource
Prevents beans (channels, etc), which were previously picked
up via a proxy, from being exported by a standard context
MBeanExporter.
I looked at completely eliminating the MBeanExporterHelper,
which suppresses o.s.integration beans from being exported by
a standard MBeanExporter when there is an IMBE present, but I feel
this is too much of a breaking change. There are a number of
standard beans (such as WireTap) that are @ManagedResources and
these would disappear for users that don't have an IMBE.
That said, such beans previously disappear completely when there
*is* an IMBE so now they are now annotated with both so that
they are exported by at most one of the exporters.
Polishing; Use MBE.addExludedBean instead of DFA
INT-3639: JMX (AMQP/JMS) Channel Stats
JIRA: https://jira.spring.io/browse/INT-3639
Module channels inherit `ChannelSendMetrics`; add
`PollableChannelManagement` for polled channels.
INT-3638: JMX Initial Stats/Counts Settings
JIRA: https://jira.spring.io/browse/INT-3638
Add the ability to specify the initial settings for
'enableStats' and 'enableCounts' for MBeans that
support those statistics.
Polishing; PR Comments; Add Handler Metrics Test
Also found a problem using an inner MessageSource bean in an
inbound-channel-adapter - a BeanComponentDefinition was returned
instead of a BeanDefinition.
Add @DirtiesContext to JMX Tests
The new MonitorTests failed with InstanceAlreadyExistsException for the
errorChannel.
Add @DirtiesContext to all tests using the Spring test runner to avoid caching any
contexts after the test class completes.
INT-3637: JMX Support Negated Name Match Patterns
Note: with negated matches, order matters.
Polishing for `MonitorTests`
Fix `EnableIntegrationMBeanExport` JavaDocs
JIRA: https://jira.spring.io/browse/INT-3636
- Add `enableStats()` managed operation
- Delegate to a channel metrics object instead of using a proxy
INT-3636: Polishing; PR Comments
Change field name in `MBeanExporterHelper`.
INT-3636: Polishing
JIRA: https://jira.spring.io/browse/INT-3626
Remove Direct Array Usages.
With the increased use of java configuration and DSL, it
is no longer safe to directly use array arguments.
(Except in simple wrapper objects).
Avoid (or mark //NOSONAR) catch Throwable.
Remove unused field.
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-3565
Cast to `IntegrationObjectSupport` fails if the handler is
already proxied in `AbstractSimpleMessageHandlerFactoryBean`.
INT-3565 Polishing
- Fix test.
- enhance test to show that directly bound message handler beans are not advised if already proxied.
JIRA: https://jira.spring.io/browse/INT-3551
* Rename `MetadataKeyStrategy` -> `MetadataEntryStrategy`
* Add `valueStrategy` to the `MetadataStoreSelector`
* Add `value-strategy` and `value-expression` to the `<idempotent-receiver>`
INT-3551: Add `@IR` support on service methods
Rework `MetadataKeyStrategy` just to the `MessageProcessor`
Fix Docs
Minor Doc Polishing.
JIRA: https://jira.spring.io/browse/INT-2426
INT-2426: pushed `final` modifier fix for Java 6 compatibility
INT-2426: Rework logic to the `MetadataStore`
INT-2426: `IdempotentReceiver` -> `IdempotentReceiverInterceptor`
* Move `Idempotent Filtering` logic to the `IdempotentReceiverInterceptor`, which should be applied as a regular
AOP `Advice` to the `MessageHandler#handleMessage`
* Provide an xml component `<idempotent-receiver>`
* Introduce `IdempotentReceiverAutoProxyCreator` to get deal with `IdempotentReceiverInterceptor` and `MessageHandler`s.
The `Proxying` logic is based on the mapping between interceptor and `consumer endpoint` `ids`
* Introduce `MetadataStoreSelector` along side with `MetadataKeyStrategy` and `ExpressionMetadataKeyStrategy` implementation
INT-2426: Introduce `IdempotentReceiver` annotation
Add `IdempotentReceiverIntegrationTests` in the JMX module to be sure that all proxying works well.
INT-2426: Polishing according PR comments
* Rename `IdempotentReceiverAutoProxyCreatorInitializer`
* Add support for several `IRI` for the one `MH`
* Polishing JavaDocs
INT-2426: Add `What's New` note
Doc Polishing.
More Doc Polishing
Use Timestamp (hex) instead of Id for Value
Facilitate cleanup.
JIRA: https://jira.spring.io/browse/INT-275
In addition fix the `Lifecycle` issue in the `ServiceActivatorAnnotationPostProcessor`
Add Namespace support, Addition tests
and fix some typos in the XSD
INT-275: Fix failed tests
INT-275: Fix for `replyChannel` Header
Add `sync` reply test-case
INT-275: Make `ScatterGatherHandler` sync
Fix some `MessageHandler`s from `SmartLifecycle`
INT-275: Fix `ScatterGatherHandler.handleRequestMessage` logic
INT-275: Fix `ScatterGatherHandler` JMX proxying issues
* Make `AbstractCorrelatingMessageHandler.getMessageStore()` as `public`
* Move `ScatterGatherHandlerIntegrationTests` to the JMX module to be sure that `ScatterGatherHandler`
works well with `@EnableIntegrationMBeanExport`
* Add xml config sample how to use an internal gatherer's `MessageStore` in the `MessageGroupStoreReaper`
* Add `What's New` notice
JIRA: https://jira.spring.io/browse/INT-3455
Do not stop schedulers and executors - allows mid-flow
QueueChannels to be drained.
Stop all inbound MessageProducers (that are not OrderlyShutdownCapable).
INT-3455 Polishing; PR Comments
Change deprecate method usage to the new version
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()`