Previously, `MetadataStore` couldn't be configured for Twitter Adapters
- only a global one could be used.
The `metadataKey` was generated automatically with a 'difficult' value.
* Register all `MessageSource` for `SourcePollingChannelAdapter`
as beans with id based on adapter id and prefix '.source' (INT-3147)
* Polishing parser to get rid of explicit `MessageSource` beans. (INT-3147)
* Make Feed and Twitter adapters `id` attribute as required -
now it presents a `metadataKey` for `MetadataStore` (INT-3147)
* Add to Twitter adapters a reference attribute for `MetadataStore` (INT-3173)
* Add Twitter adapters `poll-skip-period` attribute (INT-3167)
* Add and implement `MetadataStore#remove` (INT-1941)
* Make `MetadataStore` as `@ManagedResource` (INT-1941)
* Polishing tests
JIRAs:
https://jira.springsource.org/browse/INT-3147https://jira.springsource.org/browse/INT-3167https://jira.springsource.org/browse/INT-3173https://jira.springsource.org/browse/INT-1941
INT-3147: Polishing and fixes
* add domain suffix to `metadataKey`
* change contract of `MetadataStore.remove`
* remove timeout window from `AbstractTwitterMessageSource`
* polishing and fix `SearchReceivingMessageSourceWithRedisTests`
INT-3147: Rebasing and polishing
INT-3147: fix 'metadata' package tangle
INT-3147 Doc Polishing
Allow customization of the generated ObjectName for the
Integration components.
JIRA: https://jira.springsource.org/browse/INT-2628
INT-2628 Polishing
- Address PR comments
- Rename `naming-strategy` to `object-naming-strategy` for consistency with `object-name-static-properties`
When declaring an IntegrationMBeanExporter, use an 'id' attribute
if you wish to obtain programmatic access to it (using injection
or referencing the BeanFactory.
JIRA: https://jira.springsource.org/browse/INT-3183
Also turn off debug logging for JMX test cases.
Previously, these tests examined specific stack frames to
verify the handler was directly invoked by the Dispatcher.
JIRA: https://jira.springsource.org/browse/INT-3188
Add a utility method to scan the stack trace instead to
verify that the Dispatcher frame exists before any
MessagingMethodInvokerHelper frame.
Previously, methods with primitive parameters were not matched
with primitive wrapper objects.
Check, if the argument is a primitive wrapper, that the paramer type
can be the equivalent primitive.
Add test case.
INT-3182 Polishing - PR Comments
Extract PrimitiveWrapper->Primitive map to ClassUtils.
JIRA: https://jira.springsource.org/browse/INT-3182
When a simple MessageHandler is referenced from a
`<service-activator/>`, it is wrapped in an anonymous
AbstractReplyProducingMessageHandler to facilitate proper handling of
the `<request-handler-advice-chain/>` and so that normal
'produced no reply` messages are logged.
Previously, this caused 2 MBeans to be exposed, one for tha actual
handler; one for the wrapper.
This added more stack frames between the dispatcher and the
handler (because 2 sets of statistics were captured).
The root cause was that the MBean exporter was not aware of the
relationship between these objects.
https://jira.springsource.org/browse/INT-3186
Add code to the IntegrationMBeanExporter to suppress adding
metrics to the wrapper.
This involves detecting that it is a wrapper and not exposing
it as an MBean and, when matching handlers with endpoints,
checking that the wrapped handler is the actual handler for the endpoint.
Update test to reflect the reduced number of stack frames between
the dispatcher and handler.
Also add tests to verify the detection of multiple references to
the same ARPMH.
INT-3186: `IntegrationMBeanExporter` optimization
When determining candidates for direct invocation, we need
to use the target of any existing proxy (such as JMX Metrics).
Copy ServiceActivatorDefaultFrameworkMethodTests to the JMX project
and adjust to work with JMX Proxies.
INT-3185: fix for AbstractSMHFBean#checkReuse
JIRA: https://jira.springsource.org/browse/INT-3185
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 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 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
Add an MBeanTreePollingMessageSource that produces a graph of simple objects representing the JMX tree (INT-3124).
The DefaultMBeanObjectConverter converts MBean objects into a graph of Lists, Maps and arrays or primitives.
Formatting tidy, per feedback.
Feedback incorporated: split setter/attributes, more tests, inner bean constructor, logging changes.
Overloaded setter methods with different parameter types are now named separately, the endpoint attributes reflect this and tests are added to reflect this.
An inner bean can be supplied to provide an alternative MBeanObjectConverter.
Log a warning instead of a more destructive UnsupportedOperationException where there's incomplete parsing in the DefaultMBeanObjectConverter and add a trace level for exception debugging.
Minor test change and doc/reference update
Added attribute filter interface as suggested. Three implementations are provided 'all', 'named only' and 'not named'
actually add notnamedfield filter (doh).
Polishing
Some handlers get a componentName, but not a beanName. For example
the TransformerFactoryBean may create a Transformer that's not
a bean, to wrap a POJO, or expression. The AbstractSimpleMessageHandlerFactoryBean
transfers the component name to the transformer but it has a null
beanName. It would not be appropriate for the FB to change the beanName.
The IntegrationMBeanExporter's fallback, when it can't find the handler
as part of a stand-alone endpoint, is to use the handler's toString().
IntegrationObjectSupport (IOS) toString delegates to Object.toString()
if there is no beanName.
IOS's getComponentName() falls back to the beanName if there is no
component name.
Change the IMBE to use the componentName as the first fallback and,
if null, fallback to the current fallback.
One side effect is that handlers that do have a bean name
will no longer have '.handler' at the end of their name; but this
is not really an issue because the MBean is designated as a
handler anyway (via the bean component of the ObjectName).
However, identifying chain components is new in 3.0 so this is
not really a breaking change.
* 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
Spring 3.2.3 registers MBean operations with parameter names
instead of the JVM default p1, p2 etc based on parameter position
in the method signature.
Since the OperationInvokingMessageHandler matched the supplied
arguments using the p1, p2 etc names, this prevented the control
bus from finding the target method.
Fall back to the old naming scheme based on parameter position
if a matching parameter is not found.
Add a test using a Map payload to supply the named arguments (p1, p2).
Add an ignored test that tests using named arguments (key, channelName).
Test with 3.1.4; remove Ignore and test with 3.2.3.
TODO: remove the Ignore annotation when SF 3.2.3 is the minimum.
* 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
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.
ExponentialMovingAverageRateTests are VERY sensitive to
timing, when running on a busy platform.
Add code to skip the assertions if we detect we are
running on a slow machine.
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.
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.
Permit the specification of an ObjectName pattern in
NotificationListeningMessageProducer.
Permit a collection of ObjectNames (patterns).
INT-2487 Polishing
Use varargs and a SpEL Reference instead of 2 setters.
Log an error if no MBeans matching pattern(s).
INT-2487 Polishing: PR Review Comments
Add patterns to ERROR log when no MBean(s) found.
Add doc to schema and reference.
Fix RecipientListRouterParser to extend
from AbstractRouterParser, thus eliminating
the problem described in INT-2626.
Previously, the router was a top level bean and, since
it is an @ManagedResource, the mbean exporter eagerly
instantiated it (and its Recipients) before the
ChannelInitializer ran.
Now, it is an anonymous inner bean inside a FB,
so the exporter no longer "finds" it,
thus deferring the Recipient instantiation
until the router itself is instantiated via its FB,
which will be after the C.I. runs.
This is all fine, with one caveat - previously the RLR
is made available as an MBean - now it is not,
unless you ALSO add the int-jmx:mbean-exporter.
However, the MBean is very basic, with no attributes and
a single operation 'setShouldTrack()', so the risk is
extremely low and the workaround is to add the
IntegrationMBeanExporter.
INT-2626 polished based on PR comments
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.
* Ensure that no deprecation warnings occur
* Spring Integration builds with all tests successfully for Spring 3.1.2.RELEASE and 3.0.7.RELEASE (Except Spring Integration HTTP)
For reference see: https://jira.springsource.org/browse/INT-2689
INT-2694 - Fix Http Test Failures with Spring 3.0
As part of INT-2689, fix Http Test Failures in the Spring Integration Http Module when using Spring 3.0.7.RELEASE
For reference see: https://jira.springsource.org/browse/INT-2694
JMX endpoints need a reference to an MBeanServer. The MBeanServer
is a sub-interface of MBeanServerConnection.
When connecting to a remote MBeanServer, the server is an
instanceof MBeanServerConnection, not MBeanServer.
Change the Endpoints to get a reference to an MBeanServerConnection.
Add IOException catch clauses where necessary.
* Add beginShutdown() and endShutdown() to OrderlyShutdownCapable
* JMS/AMQP stop listener containers
* TCP (server side)
** after beginShutdown() disallow new connections, drop (log) new messages
** after endShutdown() close server socket
* HTTP (server side)
** after beginShutdown() disallow any new requests (503 Service Unavailable)
* Docbook updates
** What's new section
** Orderly Shutdown section.
XSD refactoring: remove use="required" from 'request-channel' attribute of all 'outbound-gateways'
Tests for all 'outbound-gateways' inside the <chain>
Add re-init logic for nested chains
Add logic about nested element for AbstractChannelAdapterParser
Refactor of DefaultOutboundChannelAdapterParser
Test for non-last nested chain with some outbound-channel-adapter
Improve XSD for chain-type
Manual outbound-channel-adapter ability for chain
Integration tests for all outbound-channel-adapter within <chain>
Remove redundant 'return-value-required' attribute from <stored-proc-outbound-channel-adapter>
Add support 'expectReply' for FileWritingMessageHandler
INT-2275 polishing & refactor FileOutbound*Parser
HttpRequestExecutingMessageHandlerTests polishing
INT-2275: polishing JavaDoc
Initial commit - @ManagedOperation on IMBE
- can be invoked via JMX, <control-bus/>, or getting a reference to
the IMBE from the application context.
INT-2485 Updates After Review Comments (JIRA)
* Shutdown Schedulers first, and wait for them
* Add a force parameter, which overrides thread pool shutdown options
* Shutdown Sources/Channels after all thread pools have stopped
* Mark other components as OrderlyShutdownCapable (e.g. JMS/AMQP Listener containers) and shut them down first
* Wait for remaining time to allow for quiescence
Also
* remove TimeUnit parameter (not JMX-friendly); time limit is now always milliseconds
* If thread pools don't stop in time limit, force them down.
INT-2485 Handle Self-Destruction
Add shutdown-executor to IMBE.
When the shutdown was called on a Spring-Managed thread, the shutdown
was not clean because we timed out waiting for the current thread to
terminate. After that, we force terminated other components.
Now, by providing a dedicated Executor for the shutdown process, it
is used for the shutdown instead of the current thread. This Executor
is *not* shutdown.
It is not necessary to provide an Executor if the stopActiveComponents()
method is called on some other thread that is not involved in the
shutdown.
Also adds executor name to logs, when available.
INT-2485 Polishing
Fix MBean object name collision when running all tests.
INT-2485 Enable TCP Shutdown
Make TCP connection factories 'OrderlyShutdownCapable' so
they are stopped before schedulers/executors in order for
them to release any executor threads they are holding.
INT-2485 Polishing
Didn't need DirectFieldAccessor - scheduler and executor have
an accessor for the native ExecutorService.
Copyrights
INT-2485 Polishing
schemaLocation version.
INT-2485 PR Review Polishing
Add 2.2 versions of module schemas.
JMX is already covered by an existing pull request.
INT-2536 Schema Check
Bump version for schema check in
AbstractIntegrationNamespaceHandler.
INT-2536 Remove Schema Versions
Some test config files had 2.1 versioned schemas.
Channel creation logic for channels that are not explicitly defined but identified via an 'input-channel' attribute on the corresponding endpoint is now done by ChannelInitializer - an InitializingBean implementation.
This bean plays a role of pre-instantiator since it is instantiated and initialized as the very first bean of all SI beans using AbstractIntegrationNamespaceHandler
INT-2434-v3 polishing
INT-2434-v3 polishing, changed ChannelCreatingFactoryBean from BeanFactoryPostProcessor to BeanFactoryAware
INT-2434 polishing
fix the test
changed the default name of the CHANNEL_CREATOR_BEAN_NAME to a simple name
added additional test
changed ChannelCreatingFactoryBean from FactoryBean to InitializingBean and renamed it to ChannelInitializer
INT-2434 added test validating how automatic channel creation can be disabled
INT-2434 polished based on the latest PR comments
INT-2434-v3 polishing based on comments and discussions with @markfisher and @garyrussell. Added support for disabling aut-creatioin of channels
INT-2434-v3 polished based on @garyrussell last comments
INT-2434-v3 final polishing
JMX Tests failed due to InstanceAlreadyExistsException; name
collisions between MBeans registered in multiple tests.
Adds a domain to the new tests added to fix INT-2413 to
force unique MBean names.
When an AbstractMappingMessageRouter is included in an
ApplicationContext that also has an <int-jmx:mbean-exporter/>,
the @ManagedOperations (set and remove mapping) are no longer
visible to the <control-bus/>.
Adds these methods to a new interface MappingMessageRouterManagement,
thus making them available on the proxy that the MBean exporter
creates.
The AbstractChannelAdapterParser creates an implicit DirectChannel
if the adapter has no 'channel' attribute.
The Event, TCP, and UDP channel adapter parsers did not bind
this channel to the adapter and AC initialization failed with
'outputChannel is required'.
Further, the event schema marked the channel as being 'required',
precluding this feature.
INT-2407 Remove Channel use="required"
Parsers automatically generate the channel when none is provided.
- JMX
- JDBC
- SFTP
- Redis
- Feed
- XMPP
- Mail
- FTP
- HTTP
This is a significant update to the build system, including the changes
listed below. README.md has been updated with instructions on the most
important day-to-day commands.
- Eliminate buildSrc submodule
In favor of using the new bundlor and docbook-reference plugins. The
net effect is a large reduction in number of lines of build code.
Common docbook resources, stylesheets, etc are stored directly in the
docbook plugin.
This means that --recursive is no longer required when cloning and
there will never be a need to use `git submodule` commands. README
files have been updated to reflect.
Use of the new bundlor plugin also means the removal of template.mf
files from the source tree in favor of an inline approach. See
build.gradle for details. Bundlor 'import templates' are built up
programmatically and kept physically close to gradle dependency
declarations, leading to more convenience when changing these values
and hopefully fewer errors / version inconsistencies over time.
Certain tests depended on the presence of template.mf files, all of
which have recently been removed from the source tree in favor of the
new bundlor plugin which allows for inlining bundlor configuration
within the Gradle build script. These tests now create temp files
using the java.io.File API instead.
- Upgrade to Gradle 1.0-milestone-6
The m6 release is significantly faster when resolving dependencies
and has a number of valuable new features over the earlier m3
version. Review the release notes for Gradle 1.0-milestone-6 online
for full details.
- Switch to repo.springsource.org repository
Previously the project build declared as many repositories as
necessary to resolve all project dependencies.
Now depending on a single 'virtual repository' defined within the
SpringSource Artifactory instance at http://repo.springsource.org.
Currently, the virtual repository in use is 'libs-milestone', which
allows for the resolution of all "milestone-or-better" versions of
all S2 and third-party dependencies.
Should snapshot dependencies become required, this value may be
changed from 'libs-milestone' to 'libs-snapshot'. To build only
against GA releases, change the value to 'libs-release'.
- New build plan(s)
Spring Integration build plans have been updated to use the
Artifactory Bamboo plugin and publish to repo.springsource.org.
Build plans have names like 2.1.x to reflect the version under
development, not necessarily the name of the branch, as this may
change over time and across major releases.
- Improve release process
As mentioned above, Spring Integration will now use the Artifactory
Bamboo plugin to publish releases and also use Artifactory's support
for pushing builds directly into Maven Central via oss.sonatype.org.
Generate poms that contain all necessary fields for onboarding at
Maven central (scm, developers, organization, licenses, etc).
Generate -source and -javadoc poms to comply with Maven Central
onboarding rules (and for general good practice anyway).
Generation of PGP signatures, sha1 and md5 checksums are all handled
automatically by Artifactory. These are also requirements for
automated entry into Maven Central.
- Remove source-level pom generation
Automatic generation of Maven poms suitable for use in building
Spring Integration is no longer supported. Generation and
publication of poms for the purpose of dependency management remains
supported.
Sonar support has to date depended on these poms, but will be
switched over to use the Gradle Sonar plugin shortly.
- Eliminate docs subproject
Move docs/src to the root of the project and eliminate docs as a
formal subproject. This simplifies the build in a number of ways,
including removing the need for distinguishing between 'subprojects'
and 'javaprojects' as well as allowing users to build both 'api' and
'reference' docs without qualifying with a ':docs' prefix.
Also rename the src/info directory to src/dist to better reflect that
these files are packaged with the distribution. For example, the
readme.txt there is really the distribution readme, distinct from the
README.md at the root of the project which is for building from source,
etc.