In Spring 3.1, DefaultResponseErrorHandler.getResponseBody() is
tolerant of a null InputStream on the response. With Spring 3.0
a null response causes an assertion exception.
The mock in the tests was not set up to return an InputStream
and so the test failed when building with Spring 3.0.
Configure the mock to return an empty InputStream.
Also added a text response to response.getStatusText().
Tested with Spring 3.0 and 3.1.
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
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.
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.
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.
* 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
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.
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.
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.
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.
Pull transaction synchronization code up from SPCA
to AbstractPollingEndpoint, providing support for
transaction synchronization in PollingConsumer.
Also, ensure headers are copied to any message generated by the
ExpressionEvaluatingTransactionSynchronizationProcessor.
INT-2799 Use StringRedisTemplate by default on both inbound
and outbound store adapters.
Use a RedisTemplate with String key serializers and JDK
value serializers on the outbound store adapter if
'extract-payload-elements' is false.
INT-2811 Remove the ability to configure serializers on the adapters.
Use an external RedisTemplate for customized serialization
strategies.
INT-2811 Polishing (Review)
Polishing and updated Reference Doc.
polishing
using setters instead of ctor args for key or keyExpression
INT-2811 Polishing
Improve message when handler not initialized.
Add test for storing a simple value in a map.
The final remote directory expression processor was being
used instead of the temporary directory expression processor.
Add a test to confirm the correct processors are used.
OSGI version ranges were incorrect for oxm because it moved
to core. This precluded use with Spring 3.1 with OSGI.
Update oxm version range to match other Spring core modules.
Also update maximum for Spring-WS to < 3.0.0 and minumum to 2.0.0.
Also fix bundlor version ranges for new JPA module.
1.1.3.RELEASE includes enhanced JsonMessageConverter to
support applications using the ObjectToJsonTransformer.
avoid warning in AmqpOutboundGatewayParserTests