SpringSource/spring-integration — pull request #815 by artembilan (2013-06-05 15:08:36+00:00)
Title: INT-2993: JCMStore: fix 'idCache' race condition

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