JIRA: https://jira.spring.io/browse/INT-4498
* Use `FileCopyUtils` instead of `StreamUtils` in test-cases when we deal
with `InputStream` s and files resources.
* Fix reflection-based tests with AOP to use an `ArrayList` access
instead of `LinkedList` since an optimization in SF:
6d6aa72e8f
**Cherry-pick to 5.0.x and 4.3.x**
* Destroy RmiInboundGateway.RmiServiceExporter
The internal instance `RmiServiceExporter` of the `RmiInboundGateway`
has to be destroyed together with the outer instance to unbind `service`
from the RMI registry
* Perform some polishing for the `RmiInboundGateway` and optimize
a `AbstractInboundGatewayParser` for late channels binding
* * Polishing some tests
* Expose getters for channels on the `MessagingGatewaySupport`
* Fix RMI tests to use random port
JIRA: https://jira.spring.io/browse/INT-4409
The `SoapMessage` may come as a `payload` and be already with the
`soapAction` header.
Right now it is overridden independently of the value from the headers.
* Do not override `soapAction` in the `SoapMessage` if header doesn't
have value
* INT-4376: Upgage to Log4J 2
JIRA: https://jira.spring.io/browse/INT-4376
* Deprecate Log4J 1.x components in favor of newly added
a `Log4j2LevelAdjuster` JUnit `@Rule`
* Update all the logging configuration to Log4J 2
* Polishing after testing
Fixes: spring-projects/spring-integration#2071
* Clean up `build.gradle` for redundant excludes
* Add `javax.mail` dependency to WS module to avoid WARN about missed providers
* Refactoring for the XMPP module according changes in the latest Smack
* Polishing for the `BackToBackAdapterTests` to avoid extra wait for `null`
on the channel and some race conditions when client is closed during by the
`stop()` during publishing
Polishing `UriVariableTests` according the latest S-WS B-S
Revert excludes removal
JIRA: https://jira.spring.io/browse/INT-4260
MPEH: Populate the `ErrorMessage.originalMessage`,
if available and not the same as the `failedMessage`.
Polishing - rename exception to `MessagingExceptionWrapper`;
make `MPEH` a subclass of `ErrorMessagePublisher`
PR Comments
Polishing - PR Comments
JIRA: https://jira.spring.io/browse/INT-1800
The Simple WebService Inbound and Outbound Gateways can operate with `WebServiceMessage`s directly.
This allows to create those messages manually and add attachments to them.
Or, on the other hand, process incoming messages with attachments manually.
For this purpose the `SimpleWebServiceOutboundGateway` is supplied with new `extractPayload` property.
Also the `UnmarshallingTransformer` can now process `MimeMessage` as payload to unmarshal it into object graph with attachments if that
JIRA: https://jira.spring.io/browse/INT-2655
There might be some use-cases when end-user expect more control over sending/receiving messages via `WebServiceTemplate`.
It would be better to delegate (un)marshalling logic to the `WebServiceTemplate.marshalSendAndReceive()` directly.
Fix Checkstyle violations
Polishing
JIRA: https://jira.spring.io/browse/INT-4089
Right now `DefaultSoapHeaderMapper` can map only `String` user-defined headers and only to the `SAOP:Header` attributes.
* Add functionality to map `Source` user-defined headers as sub-elements of the `SAOP:Header`
Polishing
JIRA: https://jira.spring.io/browse/INT-3561
To allow any possible custom properties on the `WebServiceTemplate` it would be better just to have an injection for the rather than try to pursue exposing for all `WebServiceTemplate` setters
JIRA: https://jira.spring.io/browse/INT-4206
* Fix unnecessary dependency resolution in BOM module
* Fix `MessagingMethodInvokerHelper` to handle `$MockitoMock$` generated classed which isn't CGLib `Proxies` any more
* Provide fixes for test classes according upgrade to Mockito `2.5`
* Fix Ceckstyle do not allow static imports for deprecated Mockito classes
JIRA: https://jira.spring.io/browse/INT-3770,
https://jira.spring.io/browse/INT-4107
Having `TransactionHandleMessageAdvice` we can start TX from any `MessageHandler.handleMessage()`
* Add `<transactional>` alongside with the `<request-handler-advice-chain>` for those components which produce reply
* Merge `<transactional>` and `<request-handler-advice-chain>` configuration to a single `ManagedList`
* Rework JPA `<transactional>` in favor of common solution
* Some polishing and refactoring
AbstractPollingEndpoint: avoid `new ArrayList` if we don't have `receiveOnlyAdvice`s
Polishing - PR Comments and Closeable Warnings
Eclipse emits bogus warnings with exceptions in lambdas.
Even though the lambda might run on another thread, elipse thinks it could
cause the context to not be closed.
SPR-14854: MessageChannel is now a @FunctionalInterface
* Additional Lambda polishing and some code style fixes
* Upgrade to Checkstyle `7.1`
* Relax `RequireThis` rule a bit. Right now it does the effort only in case of overlapping. See https://github.com/checkstyle/checkstyle/issues/2362 for more info
* Enable some annotation rules and provide fixes for violations
* Enable `tabs indents` rule. This was the biggest fix in this PR
* Resolve `TODO` in the `MessagingMethodInvokerHelper` and fix tests to meet `IllegalStateException` now
Remain Checkstyle version `6.16.1` and reinstate `RequireThis` rule
The latest Checkstyle has a bug with local scope variables if they have the same names as property.
Revert some literals splitting
Fix some line length exceeding and code style
checkstyle EmptyBlock
checkstyle fixRightCurly Script
checkstyle EmptyStatement
checkstyle RightCurly
checkstyle TailingWhite
checkstyle NeedBraces
Fix the line separator in the `fixRightCurly.gradle`
fixes
fixModifiers after fixFinal
Revert CachingSessionFactory
Class is spied in tests.
checkstyle - Import Rules
checkstyle InterfaceIsType
checkstyle InnerTypeLast
checkstyle OneStatementPerLine
CovariantEquals
OneTopLevelClass
* Revert `'\n'` -> `System.lineSeparator()` in the Gradle scripts to meet Git `autocrlf = true` on Windows
* Fix timing issue with the `LastModifiedFileListFilterTests`, when the `age = 1` might not be enough for the file object when we have some delay before checking
* `gradlew clean check -x test --parallel --continue` - to collect reports
* `gradlew fixThis --parallel` - to fix all possible vulnerabilities. With `-Dfile.encoding=UTF-8` on Windows
Since the `RequireThisCheck` doesn't see parents for anonymous classes (e.g. `Runnable` callback), its report doesn't contains the outer class name with `this.`,
therefore we still have to fix those cases manually.
Thanks to the wrong `replacer` just with `this.` we have uncompilable code enough easy to find problems.
Not so easy to fix for good readability though...
* Upgrade to Grade 2.12
* Upgrade to SonarQube native plugin
The fix contains at about 300 files. So, will be done on merge.
Fix `fixThis.gradle` according PR comments
Apply `fixThis` and also `fixModifiers` for test classes.
Fix some `this.` inner issues manually.
Make code polishing for long lines after `fixThis`
Fix conflicts and vulnerabilities after the rebase
JIRA: https://jira.spring.io/browse/INT-3933
Previously the HTTP and WS Inbound Endpoint haven't handled the `stopped` state properly.
* Add `lifecycle` parsing to the `HttpInboundEndpointParser`
* Handle `!isRunning()` state and throw an appropriate `503 Service Unavailable` HTTP response
* Expose `lifecycle` options for the `<int-ws:inbound-gateway>`
* Introduce `ServiceUnavailableException` `WebServiceException` to indicate `stopped` state for the WS Inbound Endpoint
* Fix tests for the new logic
INT-3933: PR comments: `OrderlyShutdownCapable` for `AbstractWebServiceInboundGateway`
JIRA: https://jira.spring.io/browse/INT-3928
The `@EnableWS` provides the `DelegatingWsConfiguration` which registers only `DefaultMethodEndpointAdapter`
overriding the default strategies including required for the SI `MessageEndpoint` implementations `MessageEndpointAdapter`.
That prevents the normal behavior for the SI gateways.
Implement `IntegrationConfigurationInitializer` for the WS module and register `MessageEndpointAdapter` bean for SI WS support.
JIRA: https://jira.spring.io/browse/INT-799
Some test classes (e.g. `TestUtils`) were duplicated in core to avoid cyclic
dependency.
Now that core messaging has been moved to spring-messaging, it is possible
to remove the dependencies on `spring-integration-core` from `spring-integration-test`.
A few minor test cases have been moved to `spring-integration-core`.
The simple polishing to the `build.gradle` and `ServiceActivatorOnMockitoMockTests`
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-2466
Current reference documentation says that: "If the incoming web service
message is a SOAP message the SOAP Action header will be added to the
headers of the Message that is forwarded onto the request channel."
However, `DefaultSoapHeaderMapper` was actually missing to do that.
Polishing
This commit updates the version of Spring Web Services to
2.2.1.RELEASE. The fix for SWS-892 means that in the event of an
interceptor failing to handle a request, the request is no longer
sent. The interceptor in UriVariableTests has been updated to return
true, indicating that the request has been handled and should be
sent.
Conflicts:
build.gradle
spring-integration-ws/src/test/java/org/springframework/integration/ws/config/UriVariableTests.java
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-3516
* Add `Optional<>` support for `@Header` in the `MessagingMethodInvokerHelper`
* Add `Optional<>` test-case
* Change `sourceCompatibility` for test to the Java 8
INT-3516: Revert SF version to 4.1.1
Add Docs on the matter
Fix WS Tests; Revert StubJavaMailSender
This commit updates AbstractHeaderMapper in a number of ways:
* The 'userDefinedHeaderPrefix' property has been removed as some
advanced tests revealed that the feature is actually broken right
now and there is no easy way to fix it. A new richer hook point
that indicates if the property comes from the target object or the
standard MessageHeaders has been added.
* A HeaderMatcher interface has been introduced to replace the
lengthy checks in shouldMapHeader. Several implementations
of that interface are provided
* An additional pattern has been added that maps any header that is
*not* a standard header. It uses the standardHeaderPrefix property
for that purpose
* A number of protected method that were only used to create the
instance have been removed in favour of a non default constructor.
Subclasses should provide those *static* values in their own default
constructor.
* The list of transient headers can now be customized. Transient
headers are headers that should never be mapped. The standard
ErrorChannel and ReplyChannel headers have also been removed from
the default transient headers list as they no longer need to be
transient
header-mapper: Polishing
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**
JIRA: https://jira.spring.io/browse/INT-3383
The family of Message.(set|get)Properties methods has been factored out
of Smack as an extra extension. Use JivePropertiesManager as replacement.
It is no longer necessary to supress Smack path warnings.
Delete custom smack-config.xml, as all it did was disabling
certain (important) SASL mechanisms. Also remove the unit test that
verified this.
Some unit tests mock ChatManager and Chat for no reason, delete
those lines.
XMPPConnection.getHost() and .getPort() are only valid after the
connection got established, due the fact that those information is
often only available after a DNS SRV lookup was performed. Remove the
lines in unit tests that verified their value.
Remove the truststorePath example in documentation, since Smack 4.0 no
longer provides support for providing a custom truststore. Instead
ConnectionConfiguration in Smack 4.0 allows to set a custom SSLContext
(which then again can provide a TrustManager that uses a custom
truststore).