Locks used to control access to a group of messages were
never removed from the collection.
Converted to use LockRegistry, which (by default) uses
a pool of reentrant locks, using the hashcode of the group id
as an index into the pool.
Given that the pool is fixed, there is nothing to remove, thus
avoiding the memory leak.
When used within AbstractCorrelatingMessageHandler, any
custom LockRegistry supplied will also be used by the message
store, thus allowing the user to increase or decrease the
size of the lock pool. The registry can not be changed
once the SimpleMessageGroup has been used.
Also, the ACMH had some protection to avoid setting the
LockRegistry more than once, but this did not protect
against the default lock registry being replaced after
it had been used. Added additional protection to avoid
this condition by setting lockRegistrySet to true in
onInit().
INT-2592 Polishing
PR Comments. Now, if a custom lock registry is required, it
must be supplied to both the ACMH and SMS.
INT-2592 polishing, fixed Javadoc in SMS
Handlers for consumer endpoints get a generated name
derived from the endpoint class name.
It is useful (for example for autowiring in tests)
to give the handlers a well-known name.
If the endpoint has an ID attribute, the handler
now gets a bean name of "<ID>.handler".
Added 'content-type' functionality to ObjectToJsonTransformer
Added 'content-type' attribute to object-to-json-transformer element
Added parser and usage tests to ensure propper overrides
(see Mark's last comment here https://github.com/SpringSource/spring-integration/pull/409)
Applied required changes to Amqp module to work with standard 'content-type' header
INT-2453 polish based on PR comments
INT-2453 polished test
INT-2453 polished parser
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
Fix a concurrency issue with the PriorityChannel by
introducing a private MessageWrapper; an implementation
of Message, to maintain the contract with the Comparator.
The MessageWrapper contains the original Message plus
an incremented sequence number, used as a tie-breaker,
to maintain FIFO semantics within priority.
Previously, the sequence number was added to, and removed
from, the headers of the original Message using a
DirectFieldAccessor.
This could cause concurrent modification
exceptions when it was removed.
INT-2508 polishing based on PR comments
INT-2508 Polish Whitespace
changed warning message to error in AbstractCorrelatingMessageHandlerParser when both beanRef and expression are present, re-enabled commented out test to verify the error
Pool based on algorithm used for spring-integration-file
CachingSessionFactory introduced by INT-2146. Refactored
that code to use the common SimplePool.
One difference to the previous implementation is the
ability to change the pool size dynamically.
If the size is reduced and more than the new size are
in use, items are closed as they are returned until
the pool size is as requested.
Initial commit.
Allow Pool Size Changes
Factor out Pool
Polishing
Pool Tests
Default forever
Javadocs, File
Polishing
INT-1871 PR Polishing
* Consistent/cleaner method names
* Track checkouts; reject release of 'foreign' objects.
* Add 'getAllocatedCount()'
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
Added bean resolver to ContentEnricher
INT-2451 Polishing - PR Review Comments
Disallow bean resolution in the name expression for content enricher
properties - the name expressions can only resolve to payload
properties. Value expressions can resolve to beans and bean properties.
Add initial support for Global lock registry. Fix race condition described in INT-2502.
INT-2502 addressed PR comments by @garyrussell
INT-2502 polishing
Ensure that 'expression*' attributes are parsed
by the AggregatorParser when 'ref' is used to
define the actual aggregator
INT-2396 polishing based on PR comments
INT-2396 changed parser error to warning
message as suggested by Mark.
Raised follow up JIRA for 2.2 to fix it back to error
Fix AbstractCorrelatingMessageHandler to ignore
Message Sequence information IF a custom release strategy is provided.
INT-2478 polishing based on PR comments.
Rename Test case.
PubSub channel subscriber accounting was incorrect; the counter
was not decremented when unsubscribing.
The handler count, reflecting the current number of subscriptions,
was maintained in the AbstractSubscribableChannel. The count really
belongs in the dispatcher and calls should be delegated to it, particularly
for a custom ASC, which might have a custom AbstractDispatcher.
However, it is possible (although perhaps rare) that someone
could implement a custom channel with a custom dispatcher that
is *not* a subclass of AbstractDispatcher.
Therefore, we now delegate to the dispatcher if we can, and
revert to a counter in the channel if we can't.
Also, the asymmetric accounting in this case is resolved; the
counter is decremented when a subscriber unsubscribes.
Polishing - factor out common code.
Add channel name to MessageDeliveryException
'Dispatcher has no subscribers'.
In a large integration flow, it can be difficult to track
down which subscribable channel has no subscribers.
This commit adds to the message text in the form
for channel someChannelName
to the exception message. For example:
"Dispatcher has no subscribers for channel myChannel."
Also
for amqp-channel someAmqpChannelName
for jms-channel someJMSChannelName
for redis-channel someJMSChannelName
INT-2431 Polishing
Make component type and name immutable once set to avoid
channels further down the stack frame claiming ownership.
INT-2431 Polishing
* PR Comments - use a new Exception type
* Add support for Redis
* Add WARN logs for AMQP/JMS pub-sub channels
INT-2431 Polishing
PR Comments: tighten up isPubSub field in AMQP-backed channel.
INT-2431 Polishing
Ensure channel name is not 'null' or empty string.
Fix PollerParser#configureAdviceChain for adding 'customBeanDefinition' into 'adviceChain' List.
PollerParserTests: adding <tx:advice> as customElement into poller's <advice-chain>.
Commit is mostly parser tidy-up. The crux of the fix is to add the
missing call to adviceChain.add().
1. MethodInvokingHeaderValueMessageProcessor => MessageProcessingHeaderValueMessageProcessor because now he uses MessageProcessor
2. polishing HeaderEnricherParserSupport
3. GroovyHeaderEnricherTests: add check to HeaderValueMessageProcessor for Groovy scripts.
4. build.gradle: add dependency to 'spring-integration-test' for 'spring-integration-groovy'.
ServiceActivatorFactoryBean#createMessageProcessingHandler: force 'processMessage' method-name parameter into constructor ServiceActivatingHandler for MessageProcessor
Test for check 'handlerMethods' in ServiceActivatingHandler's MethodInvokingMessageProcessor
Integration test for <service-activator> with invalid Groovy inline script
Some generated bean names (e.g. LoggingHandler) cause
warnings in STS:
(Warning "Referenced bean
'org.springframework.integration.handler.LoggingHandler#0' not found")
Fix is to register these beans as components so an event is fired.
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.
https://jira.springsource.org/browse/INT-2411
Namespace problem only; the default-output-channel was
not bound to the RecipientListRouter.
Workaround is to declare the router using <bean/> syntax.
* MessageChannel was moved from core to the base package.
* ChannelResolver moved from core to support.
* TcpConnectionInterceptorFactoryChain was incorrect.
Now <header-enricher> <reply-channel> & <error-channel> are 'referenceOrValueHeaderType'.
Added tests for 'value' & 'expression' attributes on <reply-channel> element.
modified implementation of MessageGroupQueue to use interruptible locks
Basically modeled it after LinkedBlockingQueue
changed to use ReadWriteLock
refactored MessageGroupQueue and added tests
changed MessageGroupQueue to use Condition
added messageGroupSize(groupId) method to MessageGroupStore and all the implementations
polishing based on Gary's comments
removed setStoreLock method in favor of additional constructors
polishing tests, decreased timeouts
made peek() thread safe
added logging