https://jira.springsource.org/browse/INT-2961
onInit() relied on subclasses calling super.onInit() to apply the
advice chain and add the BeanFactory to the MessagingTemplate.
At least one extension (smpp) failed to do this, disabling these features.
Make onInit() final and call doInit() for subclass initialization (no-op in ARPMH).
INT-2961 Polishing
- do not increase visibility of doInit in subclasses.
- remove final modifiers from doInit so user subclasses can participate in initialization if needed.
https://jira.springsource.org/browse/INT-2629
Strategy for mapping gateway methods to map method arguments
to a message.
Default strategy works as today, but pluggable using attribute
'mapper' on <gateway/>.
A custom mapper should implement InboundMessageMapper<MethodArgsHolder>
where the MethodArgsHolder contains the Method object and the argument
values.
When using a custom mapper, the mapper is entirely responsible for
creating the Message - therefore 'payload-expression' attributes
and <header/> elements are not allowed.
INT-2629 Polishing - Javadocs
INT-2629 Polishing
- Introduce MethodArgsMessageMapper - higher level API for custom mapper.
INT-2629: Polishing docs
Previously, there was a `synchronized` block in the `GroovyScriptExecutingMessageProcessor`
to achieve thread-safety around script variables.
In addition, the parsing and executing logic was delegated to `GroovyScriptFactory`, who, in turn,
has its own `synchronized` around script parsing.
This causes a bottleneck in a messaging architecture.
* Introduce `GroovyScriptExecutor implements ScriptExecutor`
to encapsulate Groovy parsing and executing logic
* synchronize via `ReentrantLock` only when script resource `isModified()`
JIRA: https://jira.springsource.org/browse/INT-3166
INT-3166: Fixes and Polishing
INT-3166: add synchronized double check
INT-3166: Remove `GroovyScriptExecutor`
Polishing tests and logic around exceptions
Fix up some white space issues in Groovy*Tests
* Ensure close connections after tests
* Remove `Thread.sleep` where it is possible
JIRA: https://jira.springsource.org/browse/INT-3113
INT-3113: Improve `RedisAvailableRule`
* Upgrade to Spring-Data-Redis-1.1.0
* Change Redis port to default one - 6379
Polish - add smart delay to SubscribableRedisChannelTests.pubSubChannelTest
https://jira.springsource.org/browse/INT-3069
Provide a mechanism to specify headers and payload-expression that can
be applied to all methods in the gateway.
- Headers defined as 'default' are globally applied to all gateway methods.
- Also supports 'default-payload-expression'.
- Headers defined on a specific method override the global settings.
- An `@Header` in the interface is overridden by a specific <header/> for that method (current behavior)
- An `@Header` in the interface is NOT overridden by a <default-header/>
- Add 3 new SpEL variables:
-- #methodName (synonym for #method - deprecated)
-- #methodString (a string representation of the method showing return type and arg types)
-- #methodObject (the Method object)
<int:gateway id="sampleGateway"
service-interface="org.springframework.integration.gateway.GatewayInterfaceTests.Bar"
default-request-channel="requestChannelBaz">
<int:default-header name="name" expression="#methodName"/>
<int:default-header name="string" expression="#methodString"/>
<int:default-header name="object" expression="#methodObject"/>
<int:method name="baz">
<int:header name="name" value="overrideGlobal"/>
</int:method>
</int:gateway>
INT-3069 Polishing - PR Comments
- Remove extra 'method' variables, just provide `gatewayMethod`.
- Parser improvements
- Schema now enforces default-header elements to precede method elements
- Doc polishing
When recursing, the returned filenames are relative to
the top level directory.
INT-3172 (S)FTP - Add Recursion to MGET Command
https://jira.springsource.org/browse/INT-3172
INT-3172 Polishing
- PR Comments
- Add Tests for SFTP (tested with Mock and real SSH)
- Enhance test to ensure subdir is in 3rd file retrieved
- Exclude "special" directories ('.' and '..') from recursion
INT-3172 Make FtpServerRule Safe For Concurrency
Previously the port was static.
- Make the port an instance variable
- Channel the `@ ClassRule` to a `@ Rule`
- Register an appropriate DefaultFtpSessionFactory bean declaration
INT-3172 Polishing; Docs
- Rename FtpServerRule to TestFtpServer
- Remove restriction on filters for MGET
- Add test for filtered MGET
- Reference docs, what's new
INT-3172 More Polish
- Fix type in reference
- Fix error message now that filter is allowed with MGET
- Remove test for filter with MGET (now valid)
INT-3172: Fix tests and typos
INT-3172: this.remoteFileSeparator for recursion
* Add `local-directory-expression` to (S)FTP Outbound Gateways
* Add `FtpServerRule` to Apache Mina embedded FtpServer
* Add tests for (M)GET and `local-directory-expression`:
FTP tests uses `FtpServerRule`, SFTP tests need testing on real SFTP server
JIRA: https://jira.springsource.org/browse/INT-2866
INT-2866: Documentation
INT-2866 Polishing
- Remove leading /
- Change \ to / in invalid test
- Clean up after sftp
Tested with real SSH.
INT-2866 Polishing - Add Mock SFTP Test
Run with -Dspring-profiles-active=realSSH to run with a real SSH server.
Assumes ftptest/ftptest account on localhost with the following directory tree in the user's root...
$ tree sftpSource/
sftpSource/
├── sftpSource1.txt
├── sftpSource2.txt
└── subSftpSource
└── subSftpSource1.txt
INT-2866: Polishing
INT-2866: change `remotePath` to `remoteDirectory`
Doc Polishing.
byte[] and String payloads were written to a temporary file.
If the same message is transferred to two different destinations
concurrently, one of the adapters could remove the temporary
file while the other was using it.
Don't use a temporary file for these payloads, simply use the
payload byte[] [or a String.getBytes()] as the InputStream
passed to the Session.write() method.
Polishing
Polishing - Add WARN For Missing File
+ Test
JIRA: https://jira.springsource.org/browse/INT-3091
Previously, there was no logic to check, if a JSR223 script
was modified should be refreshed from the external resource.
* Fix `RefreshableResourceScriptSource` to take care of refreshing
on call `isModified()`
* Add `scriptSource.isModified()` before getting script text
* Introduce `ScriptSourceFactoryBean` to avoid I/O operations, when
there is need to refresh script resource - `refreshDelay < 0`
JIRA: https://jira.springsource.org/browse/INT-3164
INT-3164: change the refresh mutation logic
Remove factory bean - no longer needed.
Previously, when an exception occurred on a send, the
connection was not forcibly closed. When using a
CachingClientConnectionFactory, this prevented the connection
(albeit stale) from being returned to the cache.
Perform a forced (physical) close whenever a send fails.
Add test cases for both Net and NIO implementations, using
a CCCF, to verify the connection is returned to the pool so
the closed state can be detected on the next retrieval, causing
a refresh.
Also, change the synchronization in the NIO send to
synchronize on the socketChannel, not the mapper (which is
shared).
JIRA: https://jira.springsource.org/browse/INT-3163
From SPR 3.2.x the 'the path mapping' is **required** for `Controller`,
But with SI it is OK, because we can configure HTTP Inbound Endpoint via `HttpRequestHandlerServlet`.
So, add check if `requestMapping.getPathPatterns()` has values and don't register HTTP Inbound Endpoint
as `HandlerMethod` and just rely on user choice.
JIRA: https://jira.springsource.org/browse/INT-2312
INT-2312b: Polishing
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 to `LongRunningIntegrationTest` ability to read `System.properties`
Note, ENV property 'RUN_LONG_INTEGRATION_TESTS' has a preference in case of value `true`
* Add Gradle task `testAll`
* Upgrade to Gradle 1.7
* Improve build performance by adding 'inputs'/'outputs' to some tasks
JIRA: https://jira.springsource.org/browse/INT-3155
Polishing
Remove inputs/outputs.
Polish RouterConcurrencyTest.
Use the Spring Framework stylesheet for javadocs.
Fix 3 missing package-info files.
(Aside: remove cache-sessions from 2 @Ignored test case configuration files).
Add a `@Rule` to skip long-runing tests during normal builds.
Add the rule to long-running tests in gemfire, ip, jms, jmx.
Add an environment variable `RUN_LONG_INTEGRATION_TESTS`; when set
to true, all tests are run.
Set the environment variable to true on all nightly builds.
Build now runs in 13 minutes on my 3 year old laptop.
Add the ability to inject the class name of the xslt transformer
implementation.
https://jira.springsource.org/browse/INT-2768
-add @author to java docs
-updat copywrite year to current year
add new test and check for class name that it exists.
-fix xslt payload transformer and test for unknown class name, will
now default to the jre default transformer.
INT-3142: A flag to retain default converters when the user has customized messageconverters for HttpRequestHandlingController, HttpInboundGateway
* Introduced a new flag in the base class of HttpRequHttpRequestHandlingController, HttpInboundGateway - registerDefaultConverters
* Introduced a new attribute "register-default-converters" for inbound-channel-adapter and inbound-gateway to indicate if the default HttpMessageConverter's need to be registered
* Http namespace parser related changes to set the new flag
* Added additional tests to test the flag and the namespace parser related changes
Changes per feedback from Artem - additional javadoc comments, cleaned up tests
Updated: Setting the register-default-converters by default to false now, for backward compatibility reasons
Changed adapter name per feedback from Artem
Changed adapter name per feedback from Artem
Changed attribute name from register-default-converters to merge-with-default-converters
INT-3142: Atomic operation for messageConverters
'What's New' polishing
Polishing
Fix a few comments, error messages, docs, whitespace.
* Add <spel-property-accessors> to configure a list of beans
that implement `org.springframework.expression.PropertyAccessor`
* Add `SpelPropertyAccessorRegistrar` to manage a list of PropertyAccessors
for Integration infrastructure
* Refactoring for `SpelFunctionRegistrar` and `IntegrationEvaluationContextFactoryBean`
to fix the issue when there is no `SpelFunctionRegistrar`(`SpelPropertyAccessorRegistrar`)
in the child AC, but there is one in the parent.
Previously the inheritance did't work for that reason.
* Now parent/child logic moved to `IntegrationEvaluationContextFactoryBean`
* Add documentation
JIRA: https://jira.springsource.org/browse/INT-3133
INT-3133: Rebasing, polishing and documentation
INT-3133: PropertyAccessors override support
* `@Ignore` `SOLingerTests#finReceivedNioLinger()` test
INT-3133: Change JavaDoc link to 3.0.0.RC1
Polishing
- Remove duplicate check - last bean def wins
- Doc Polishing
https://jira.springsource.org/browse/INT-3146
Incompatibility of using socket timeouts with a caching client
connection factory.
When a socket option timeout (soTimeout) is set on a TCP connection
and the timeout occurs, the socket is closed.
When a connection is intercepted, the close is performed through
the interceptor (for example to allow a closing handshake before the
physical close).
However, the caching client connection factory is implemented
using an interceptor, which returns the underlying connection to
the cache pool (for reuse). In the case of a TcpNetConnection,
the reader thread has terminated meaning that, the next time the connection
is used, no reply will ever be received.
The work-around (when using a gateway) is to use the 'remote-timeout'
attribute instead of relying on the soTimeout. There is no
work around when using collaborating channel adapters with a Net
connection. Using NIO works because there is no reader thread
in that case, but the socket is never closed on a timeout.
Always physically close the connection whenever an exception occurs
even if the close was delegated to an interceptor.
Add test cases for Net and NIO implementations.
* 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
Previously, `RequestHandlerRetryAdvice` wrapped a Handler's (business) Exceptions in a
`MessagingException` on each retry within `RetryCallback#doWithRetry`
and before `RetryPolicy#canRetry`.
It made useless some retry framework out-of-the-box features like `BinaryExceptionClassifier`
* Push wrapping to `MessagingException` after `retryTemplate#execute`
* Polishing `ErrorMessageSendingRecoverer` regarding new logic
* Add `retryableExceptions` test
You can now properly specify Business exceptions with the retry policy to
perform conditional retry.
JIRA: https://jira.springsource.org/browse/INT-2943
Polishing
Only wrap Throwable in ThrowableHolderException if the Throwable
is not an Exception.
INT-2943: Polishing ErrorMessageSendingRecoverer
* Add `<script>` and `<expression>` to `<int:inbound-channel-adapter>`
* Refactoring for `DefaultInboundChannelAdapterParser`
* Introduce `ScriptExecutingMessageSource` to allow scripts' `MessageProcessor`
implementations work as a source for polling endpoint
JIRA: https://jira.springsource.org/browse/INT-2867
INT-2867: documentation
In addition the tests for Lifecycle attributes
Polishing
* #jsonPath function is registered automatically if the library is on the classpath
* Add otional dependency on `com.jayway.jsonpath:json-path` artifact
* Add `JsonPathUtils` class as a wrapper around `JsonPath`
* Add `#jsonPath` tests for: `<transformer>`, `<filter>`, `<splitter>`, `<router>`
JIRA: https://jira.springsource.org/browse/INT-3139
INT-3139: Further improvements
* Remove `SpelFunctionRegistrar`
* Introduce `SpelFunctionFactoryBean`
INT-3139: Polishing