Set up stored procedure name in `SimpleJdbcCall` before setting
up row mappers; previously the debug logg showed `[null]` for
the procedure name.
JIRA: https://jira.springsource.org/browse/INT-3265
JIRA: https://jira.springsource.org/browse/INT-3212
INT-3212 Fix Failing TCP Test
TcpNioConnections can deadlock when a fixed thread pool is being used.
The deadlock is detected after 60 seconds, but the test case failed
after 20 seconds - before the deadlock was detected.
Change the test to use a cached thread pool instead.
Also, increase concurrency by using threading in the test server
so each socket is handled on a separate thread.
Enchance connectionId to include both local and remote ports to
aid debugging.
Some minor formatting corrections.
JIRA: https://jira.springsource.org/browse/INT-3210
* Parse `Expression` parameters only once at creation phase
* There is still tiny case, when configured parameters don't have
provided parameter, in this case an `input` determines as JavaBean and the
`name` will be populated as bean property via SpEL.
INT-3210: Add params to maps and collections
* If configured parameters don't contain provide param,
parse his expressions and add to parameters of current
`ParameterSource` and enclosing `ParameterSourceFactory`
* Move JPA `ExpressionEvaluatingParameterSource` to inner class
of `ExpressionEvaluatingParameterSourceFactory`, similar to `ExpressionEvaluatingSqlParameterSourceFactory`
JIRA: https://jira.springsource.org/browse/INT-3181
INT-3181: Fix JdbcChannelMS#pollMessageFromGroup
* Add `doRemoveMessageFromGroup` and check its result.
If it is `false` then just return `null`, not polled `Message`
* Add `AbstractTxTimeoutMessageStoreTests#testInt3181ConcurrentPolling` test
and implement it for some DBs
* Make a note regarding MVCC as important in the Doc
Minor Polishing
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.
* 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
* Convert `row-mapper` attribute of stored procedure components
to bean reference
* Class name is also supported for backward compatibility
JIRA: https://jira.springsource.org/browse/INT-2739
`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
There were several "helper" classes where the context was initialized
in the constructor, before the BeanFactory was passed in.
Generally fixed by adding the BeanFactory to the constructor args.
Other cases where the container-managed bean instantiated a helper
and never passed in the BeanFactory.
Finally, a fix to ExpressionUtils where the caller had a BeanFactory
but the BF did not contain an EvaluationContext factory bean, the
BeanResolver was not set up. This is unlikely in a Spring Integration
application, but added for completeness.
INT-3115 Add a BeanFactory to Test Cases
Change the WARN log in ExpressionUtils to a fatal exception to detect
cases where an EvaluationContext was created without a BeanFactory.
While this was generally in test cases, it also exposed some cases
in code where the context was initialized without a BF.
polishing on merge
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
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
* 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
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.
Previously there was a concurrency race condition, where
`parameters` with `idCache` for poll Messages query had one state on building phase,
but had another one on execution phase.
* Introduce `ReentrantReadWriteLock` `idCacheLock` for operation around `idCache`
* Change `idCache` to simple `HashSet`, because thread-safety is guaranteed by `idCacheLock`
* Add a concurrency test-case, which failed before fix
JIRA: https://jira.springsource.org/browse/INT-2993
* 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
* Add Join to JDBC Query
* Add MySql-specific tests
* INT-2987 - MessageStore MySQL - Support Fractional Seconds
- Update MySql Connector version to 5.1.24
- Add DDL scripts for MySql versions 5.6.4 and higher
INT-2980 - Check also for Regions
* Add test
INT-2980/INT-2987 - Add Documentation
INT-2980 - Doc: Add info to What's New Section
* Upgrade Derby test dependencies to 10.9.1.0
* Due to test-failures switch from using the embedded-database namespace support for Derby to explicitly configured DataSource beans (DriverManagerDataSource)
For more details see: https://jira.springsource.org/browse/INT-2992
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.
For reference see: https://jira.springsource.org/browse/INT-2945
* ensure that for StoredProcedure Inbound Channel Adapter the *isFunction* property is set
* add test
INT-2945 - Code Review - Add Tests
Missing region column in some queries.
For reference see: https://jira.springsource.org/browse/INT-2912
INT-2912 - Code Review
* Eliminate Spring Application Context for Test
* Improve SQL Query
INT-2912 Polishing
Modified testVerifyMessageGroupCount to test size of each
group in each region.
* 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.
AbstractTransactionSynchronizingPollingEndpoint was introduced late in the 2.2 release process to avoid a breaking change to AbstractPollingEndpoint. For 3.0, its methods are now pulled-up into APE.
Further change:
* remove Deprecated Setter (PollerMetadata)
* fix failing test
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.
Fix JdbcMessageStoreChannelTests.testSendAndActivateWithRollback as well as others by changing poller interval.
Poller was polling too quickly, so even the slightest delay before assertion would result in another Message in the Service.messages thus the intermittent assertion error.
INT-2280 Polishing
Don't add retries to message list.
Fix removeMessageGroup logic to ensure it also executes
delete on the join table so there are no dangling
join rows.
Add defensive logic to the getMessageGroup method
to ensure it no longer throws an exception IF the scenario
fixed with the previous comment still re-appears
(and it can if MGS is not executed under TX).
* ban to use 'channel' and 'request-channel' attributes for 'outbound-channel-adapters' and 'outbound-gateways' when they are declared inside the `<chain>`
* fix usage of `<request-handler-advice-chain>` for components when they are declared inside the `<chain>`
* ban to use `<request-handler-advice-chain>` for 'outbound-channel-adapters' when they are declared inside the `<chain>` don't implement `AbstractReplyProducingMessageHandler`
* refactor `IntegrationNamespaceUtils` to use `BeanDefinition` instead of `BeanDefinitionBuilder` for 'advice-chain' parsing
* tests for new logic for 'channel' and 'request-channel' attributes within `<chain>`
* tests for new logic for `<request-handler-advice-chain>` within `<chain>`
* fix failed test on slow machine
* fix `SysLogTransformer` tests
For reference:
https://jira.springsource.org/browse/INT-2718https://jira.springsource.org/browse/INT-2721https://jira.springsource.org/browse/INT-2719
INT-2718 Polishing
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.
Add general capability to advise just the handleRequestMessage
part of an AbstractReplyProducingMessageHandler.
This is to advise just the immediate operation, and not the
entire downstream flow.
Uses include:
* outbound gateway post processing
* adding retry behavior using spring-retry
* adding circuit breaker functionality
Initial commit for review.
Also need to advise simple message handlers (such as file
etc) to allow them to post-process file operations
with payload.delete(), payload.renameTo(...) etc.
INT-2250 Add Circuit Breaker Advice
INT-343 Add Retry Advice
Stateless and Stateful retry using spring-retry. Stateless
means the RetryTemplate performs the retries internally.
Stateful means the exception is thrown (e.g. to JMS container)
and the retry state is maintained by spring-retry.
INT-2215, INT-343, INT-2250 Refactoring
Factor out common abstract Advice class.
INT-2214 Catch Evaluation Expression Exceptions
If an onSuccess expression evaluation fails, add an
option so the user can decide whether such an exception is
caught, or propagated to the caller.
INT-2214 etc PR Review Polishing
INT-2214 etc Namespace Core, File, FTP
Add <request-handler-advice-chain/> to outbound endpoints.
INT-2214 etc. More Namespace Support
amqp, event, gemfire, groovy, http, ip, jdbc, jms, jmx, jpa, mail, rmi, sftp, twitter, ws, xmpp
INT-2214 etc Polishing
PR Review
INT-2214 etc Polishing
Don't catch Throwable.
Move Advice classes to handler.advice package.
Remove M3 disposition-* attributes on File/(S)FTP inbound adapters.
Add <pseudo-transactional/> and <transaction-synchronization/> elements
to <poller/>.
These elements provide the following attributes:
* on-success-expression
* on-success-result-channel
* on-failure-expression
* on-failure-result-channel
* send-timeout
<transaction-synchronization/> synchronizes these expression evaluations
with the transaction, such that they are executed immediately after
the commit/rollback.
<psuedo-transactional/> is used for a non-transactional poller.
When an <advice-chain/> is provided to the poller, <psuedo-transactional/>
and <transaction-synchronization/> are synonyms; and the behavior is
dictated by whether or not the <advice-chain/> contains a transaction
advice. It is recommended that <pseudo-transactional/> is used when the
<advice-chain/> does not have a txAdvice, and <transaction-synchronization/>
when it does, but the framework does not enforce this.
The expressions have the original (polled) message as the #root variable.
In addition, a BeanResolver is provided, allowing expressions such as
'@someBean.handleSuccess(payload)'.
MessageSources may also implement PseudoTransactionalMessageSource. This
has a number of methods allowing more flexibility in transactional and
non-transactional environents. For example, for backwards compatibility.
the mail-inbound-channel-adapter deletes its polled message after the
receive() rather than after the polled message is sent (when running in
a non-transactional poller). However, when running in a transactional
poller, the delete is done after the transaction commits (but not when
it rolls back).
In addition, MessageSources that implement this interface can optionally
provide an arbitrary object to the success/failure expressions in a
variable named '#resource'.
INT-2685 Polishing
PR Review Comments
Add tests for non-tx PseudoTransactionalMessageSource
* Add *disposition-expression* to the inbound file adapter. This allows for operations such as *payload.delete()*, *payload.renameTo()* after the file is processed.
* The result of executing the expression (if any) is sent to the disposition-result-channel.