Commit Graph

6878 Commits

Author SHA1 Message Date
Artem Bilan
24bdd39790 INT-2846: ImapMailReceiverTests: fix OS newLine
* Add `trim()` to the actual value
* Remove '\n' from expected value
* Remove redundant Mocks

JIRA: https://jira.springsource.org/browse/INT-2846
2012-12-03 12:40:21 +02:00
Gary Russell
2d6239edd1 INT-2844 Fix Http Test If Building With Spring 3.0
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.
2012-12-01 14:08:57 -05:00
Spring Buildmaster
4f606d9c46 [artifactory-release] Next development version 2012-11-30 14:25:59 -08:00
Spring Buildmaster
d195747c4b [artifactory-release] Release version 2.2.0.RELEASE 2012-11-30 14:25:48 -08:00
Mark Fisher
675dc4cf60 Merge pull request #689 from ghillert/INT-2843
* INT-2843: Doc: with 2.2 Java serialization over HTTP not enabled by default

* INT-2842: Doc: Re-order 'What's New in 2.2' section
2012-11-30 16:19:59 -05:00
Gunnar Hillert
37ad09ab55 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
2012-11-30 16:05:30 -05:00
Gary Russell
3d0ffd2e7b 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.
2012-11-30 15:56:21 -05:00
Mark Fisher
120410f78c Merge pull request #683 from garyrussell/INT-2832-2833
* INT-2832-2833:
  INT-2832/2833 Aggregator Fix and Documentation
2012-11-30 15:38:57 -05:00
Gary Russell
3ea05576b3 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
2012-11-30 15:31:36 -05:00
Mark Fisher
84f4bea5e7 Merge pull request #685 from garyrussell/INT-2837a
* INT-2837a:
  INT-2837 Fix Accept Hdr for Serializable Response
2012-11-30 13:59:01 -05:00
Gary Russell
7ef66e2e3f 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.
2012-11-30 13:40:58 -05:00
Mark Fisher
4ce08ad6dc Merge pull request #688 from ghillert/INT-2841
* INT-2841: Fix broken links
2012-11-30 12:04:38 -05:00
Gunnar Hillert
a54312dc6f INT-2841 - Fix broken links 2012-11-30 12:03:12 -05:00
Mark Fisher
28fa4407b9 Merge pull request #687 from ghillert/INT-2840
* INT-2840: Fix build failure against Spring 3.0.7

For reference see: https://jira.springsource.org/browse/INT-2840
2012-11-30 11:56:55 -05:00
Gunnar Hillert
911ddc11af INT-2840 - Fix build failure against Spring 3.0.7
For reference see: https://jira.springsource.org/browse/INT-2840
2012-11-30 00:09:51 -05:00
Gary Russell
734eae72a7 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.
2012-11-29 21:30:52 -05:00
Mark Fisher
3d04e15fd3 Merge pull request #686 from garyrussell/INT-2839
* INT-2839: Fix TCP Caching Connections with Gateways
2012-11-29 21:06:39 -05:00
Gary Russell
32251bf6f2 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.
2012-11-29 15:17:24 -05:00
Spring Buildmaster
734c3308ff [artifactory-release] Next development version 2012-11-21 15:44:15 -08:00
Spring Buildmaster
f39251ff49 [artifactory-release] Release version 2.2.0.RC3 2012-11-21 15:44:07 -08:00
Gunnar Hillert
12375ec052 Merge pull request #682 from garyrussell/INT-2828
* garyrussell-INT-2828:
  INT-2828 Remove Package Tangle
2012-11-21 17:45:35 -05:00
Gary Russell
c4a4b59848 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
2012-11-21 17:44:02 -05:00
Gary Russell
9bed860838 Merge pull request #680 from ghillert/INT-2826 2012-11-21 09:29:01 -05:00
Gunnar Hillert
1709028d14 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
2012-11-21 09:25:23 -05:00
Gary Russell
de5082a25d Merge pull request #676 from ghillert/INT-2674 2012-11-21 09:24:16 -05:00
Gunnar Hillert
a5d7de848d 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
2012-11-21 09:22:20 -05:00
Mark Fisher
84cfb62592 Merge pull request #677 from garyrussell/INT-2815a
* INT-2815a: Refactor AbstractPollingEndpoint
2012-11-20 20:40:24 -05:00
Gary Russell
6f4800a904 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.
2012-11-20 19:54:21 -05:00
Mark Fisher
4822d9b209 Merge pull request #681 from garyrussell/INT-2827
* INT-2827: Fix Amqp Gateway Tests
2012-11-20 19:47:47 -05:00
Gary Russell
617cc4237c INT-2827 Fix Amqp Gateway Tests
Use a unique channel for each gateway in
AmqpOutboundGatewayParserTests.
2012-11-20 18:37:17 -05:00
Mark Fisher
ff039c3ea2 Merge pull request #679 from garyrussell/INT-2820
* INT-2820: Shutdown Default Idle Executor
2012-11-20 18:09:39 -05:00
Gary Russell
cb87246d47 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.
2012-11-20 18:01:01 -05:00
Mark Fisher
2461b3548d Merge pull request #678 from garyrussell/INT-2821
* INT-2821: Find Existing Mails if No RECENT Support
2012-11-20 17:02:57 -05:00
Gary Russell
aa6d4a4ac7 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.
2012-11-20 12:50:18 -05:00
Gary Russell
78394aa5dd Merge pull request #674 from markfisher/INT-2798 2012-11-19 15:40:39 -05:00
Mark Fisher
0e23d17526 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.
2012-11-19 15:38:21 -05:00
Gunnar Hillert
5b0b0d731f Merge pull request #675 from garyrussell/INT-2815
# By Gary Russell
* garyrussell-INT-2815:
  INT-2815 Support Tx Synch In Pollable Consumers
2012-11-14 01:45:52 -05:00
Gary Russell
bcce3277e5 INT-2815 Support Tx Synch In Pollable Consumers
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.
2012-11-14 01:19:47 -05:00
Gary Russell
5f2cc5a587 Merge pull request #673 from markfisher/INT-2811 2012-11-09 16:25:11 -05:00
Gary Russell
f501a6730e INT-2799/2811 Redis Store Adapter Changes
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.
2012-11-09 16:19:25 -05:00
Mark Fisher
3d93bb409e Merge pull request #672 from garyrussell/INT-2438
* INT-2438: Fix Temporary Remote Directory
2012-11-09 14:49:06 -05:00
Gary Russell
cc90ce92b0 INT-2438 Fix Temporary Remote Directory
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.
2012-11-09 14:47:49 -05:00
Mark Fisher
97caba30cc Merge pull request #670 from garyrussell/INT-2814
* INT-2814: Fix OSGI Versions for OXM/WS
2012-11-09 14:42:18 -05:00
Gary Russell
c09ac0b5a8 INT-2814 Fix OSGI Versions for OXM/WS
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.
2012-11-09 11:09:31 -05:00
Gary Russell
32ccfda5d5 Merge pull request #660 from michaljemala 2012-11-08 15:12:54 -05:00
michaljemala
1eb1301b1f INT-2801 Twitter: Fix Init. of Metadata Key
Key was not initialized unless authorized.
2012-11-08 15:10:25 -05:00
Gary Russell
2055e48111 Merge pull request #668 from markfisher/INT-2812 2012-11-07 15:51:18 -05:00
Mark Fisher
985374ca69 INT-1812 eliminated package cycles 2012-11-07 15:50:00 -05:00
Mark Fisher
a5b13dba44 Merge pull request #667 from garyrussell/INT-2792
* INT-2792: Update spring-amqp Version to 1.1.3
2012-11-07 09:17:08 -05:00
Gary Russell
959bb314e1 INT-2792 Update spring-amqp Version to 1.1.3
1.1.3.RELEASE includes enhanced JsonMessageConverter to
support applications using the ObjectToJsonTransformer.

avoid warning in AmqpOutboundGatewayParserTests
2012-11-07 09:15:33 -05:00