Files
spring-integration/spring-integration-core/src
Gary Russell e053932c5c INT-2592 Fix Memory Leak in SimpleMessageStore
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
2012-06-01 13:09:43 -04:00
..