INT-2798 Rename Redis Store Adapters
Polishing

Renaming and Repackaging.

INT-2798 Add More Tests

Add more tests for Store Outbound Adapter.

INT-2798 Polishing

More tests - zset increment/overwrite with Map payload.
           - use different value for simple overwrite.
INT-2821 Find Existing Mails if No RECENT Support

Previously, if an IMAP server supports IDLE, but not
RECENT, no existing messages were retrieved until a new
message arrived.

INT-2821 Polishing - Fix Race Condition

Use searchForMessages() when server doesn't support RECENT.

Simply skipping the first idle() doesn't work
because receive() closes the folder, there was a race condition
where a new message could arrive between the previous receive()
and folder.open() in waitForMessages().

Updated mock test so that first call to waitForMessages() finds
messages and does not idle(), and subsequent calls does not
find messages and goes to idle().

Also tested in the debugger against gmail which (at the time of
writing) does not support RECENT.
INT-2820 Shutdown Default Idle Executor

The default executor for sending messages from the IMAP IDLE
channel adapter is a single threaded thread pool.

If the default executor is used (no executor injected), shut
it down when the adapter is stopped.

INT-2820 Polishing

If using the default sendingTaskExecutor, create a new one
when restarted.

Add test to restart adapter after stop.

INT-2820 Polishing

Review comments; protect for null sendingTaskExecutor.
INT-2827 Fix Amqp Gateway Tests

Use a unique channel for each gateway in
AmqpOutboundGatewayParserTests.
INT-2815 Refactor AbstractPollingEndpoint

Recent changes to APE were sub-optimal because the subclasses
had to call back into the parent abstract class.

Deprecate doPoll() on APE.

Introduce a temporary intermediate abstract class that supports
transaction synchronization.

This class will be deprecated in 3.0.0 when its methods will
be pulled up into APE.

INT-2815 Polishing

Make ATSPE package visibility.

Add helpers to enable early migration to 3.0 structure.

INT-2815 Polishing

Fix javadoc to emphasize that doPoll() will no longer
be overridable in 3.0.

Rename doReceive() to receiveMessage() to match more closely
with handleMessage().

INT-2815 Polishing

Fix message in UnsupportedOperationException.
INT-2674 - Add JdbcChannelMessageStore
INT-2674 - Added slow/failing JDBC Message Store Tests

INT-2674 - Code Review Changes

INT-2674 - Add support for HSQL

INT-2674 - Add documentation
* Refactor Test Cases
* Code Review Changes

INT-2674 - Code Review Changes

INT-2674 - Code Review Changes

INT-2674 - Renamed classes

INT-2674 - Code Review Changes
INT-2686 MessageGroupQueue Optimization

INT-2826 - Minimize calls to MessageGroupQueue.size() when infinite capacity
For reference see: https://jira.springsource.org/browse/INT-2826

INT-2826 - Code Review Changes
INT-2828 Remove Package Tangle

* Remove Class Tangle in JPA
* tcp.connection
* tcp.connection.support
* Add Comment to MessageGroupCallback
  - Comment that it is moving into MGS in 3.0.
  - Convert DOS newlines to Unix.

For reference see: https://jira.springsource.org/browse/INT-2828
[artifactory-release] Release version 2.2.0.RC3
[artifactory-release] Next development version
INT-2839 Fix TCP Caching Connections with Gateways

Using the CachingClientConnectionFactory with a gateway
doesn't work. The Listener (gateway) was not being set up
properly by the wrapper. Instead, the actualListener in the
wrapped connection was set to null. This caused the connection
to "close" itself (return to the pool) immediately after the send.

In addition, even with the actualListener set up to properly
reference the gateway, it still wouldn't work because the
gateway can't correlate the reply (the cached connectionId is
prefixed with "cached:" so the gateway can't find the reply.

Further, when onMessage() returned, it caused the reader loop
to end.

Fixes:

1. Properly set up the cached connection with the real listener
so that ultimately the underlying connection sees there is an
actualListener and so doesn't close itself after the send.
2. Override getListener() on the cached connection to return the
real listener.
3. Override onMessage() in order to fix up the connection id in
the message, and return true (intercepted) so the connection doesn't
close itself (terminate the reader thread).
4. close() (return to the pool) after invoking the gateway's
onMessage().
5. Add test cases to verify proper operation including an assertion
that the pooled connection is reused.

This is made a little more complex by the tangle between
connections and connection interceptors; mainly because single-use
connections close themselves after use. This will be addressed in
3.0 (INT-2829) making connection interceptors simpler.
INT-2839 Fix Test Race Condition

A secondary part of the new gateway test was to ensure we
reused the cached connection. However, there was a race condition
in that the connection may not yet have been returned to the pool
by the reader thread that received the response.
INT-2840 - Fix build failure against Spring 3.0.7
For reference see: https://jira.springsource.org/browse/INT-2840
INT-2841 - Fix broken links
INT-2837 Fix Accept Hdr for Serializable Response

When the expected-response-type was Serializable,
no Accept: header was added.

The SerializingHttpMessageConverter overrides
canRead() from the superclass.

The superclass method allows null in the mediaType
parameter to return true. RestTemplate.AcceptHeaderRequestCallback
calls canRead() with null in the mediaType, preventing
the Accept header from being completed.

Remove the overridden method.

INT-2837 Disable Java Serialization over Http

Previously, Java serialization was enabled by default by
adding the SerializingHttpMessageConverter to the converter
lists (inbound and outbound endpoints). However, there was
a problem in that the Accept header was not set properly on
outbound requests.

Correcting the header could cause other side effects, such as
existing JSON applications using Java serialization instead.

It was felt that it would be safest to disable Java serialization
by default, while retaining the ability to use Java serialization
by explicitly configuring the message converter.

Update tests to deal with the fact the converter is not
configured by default.

INT-2837 Fix Schema Version in Test

Inadvertently added a spring 3.1 schema version.
INT-2832/2833 Aggregator Fix and Documentation

Expire empty groups.

Due to indentation changes, the code changes look more extensive
than they are. In effect the if (group.size() > 0) test is moved
to a narrower scope and the remove(group) is now performed if the
group is empty.

Document expire-groups-upon-completion.

INT-2832 Doc Polishing

PR Review + punctuation.

INT-2833 Add Delay For Expiring Empty Groups

minimumTimeoutForEmptyGroups
INT-2833 Fix Test Race Condition

Empty message group expiry used a < test instead of <=. This caused
the group in the test to be not deleted when it was expected to be.
INT-2843 - Document that with 2.2 Java serialization over HTTP is not enabled by default
INT-2842 - Doc: Re-order 'What's New in 2.2' section

For reference see:

* https://jira.springsource.org/browse/INT-2842
* https://jira.springsource.org/browse/INT-2843
[artifactory-release] Release version 2.2.0.RELEASE
[artifactory-release] Next development version