6433 Commits

Author SHA1 Message Date
Gary Russell
cc4352e0de INT-3061 Update Reference Copyright 2013-08-07 20:05:39 -04:00
Gary Russell
1ee38d60b7 INT-3059 Base for 2.1.7
Update to 2.1.7.BUILD-SNAPSHOT

Update bundlor version ranges
2013-06-10 18:58:37 +01:00
Spring Buildmaster
e59b8da6cd [artifactory-release] Next development version 2013-06-10 10:30:23 -07:00
Gary Russell
f6ba584175 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.
2013-06-10 17:58:10 +01:00
Mark Fisher
85e291a9ce Upgrade Spring Social Twitter to 1.0.5 2013-06-10 07:38:50 -04:00
Craig Walls
95df8e92e1 Update Spring Social Twitter version to 1.0.4
(Refactor) Use SearchParameters for searching Twitter

bundlor updates
2013-06-10 00:56:47 -04:00
Gary Russell
8f8ce7fb6e INT-2969 Update Bundlor Ranges for 2.1.6 2013-03-28 10:36:35 -04:00
Gary Russell
f2aebac223 INT-2955 Remove Tests with SF 3.1 Dependencies 2013-03-27 18:34:12 -04:00
Gary Russell
3f2c3e0c87 INT-2955 Fix Collection/Map Conversion
The fix for INT-2650 (to avoid unnecessary array copying) was
too general in that it also prevented types in collections and
maps from being converted.

Add tests to illustrate that such payloads are not converted.

Change code to only short circuit the conversion process if
the payload is a primitive array.

An existing test ensures that arrays are not copied.

Add more tests to complete coverage - discovered another
bug - the early exit after using a property editor to convert
to a String was never taken - it was testing against the
Class of the TypeConverter instead of the Type. If the
target type is a String, we don't need to perform
conversion after the property editor has done its
conversion.

Fix MessageHistory test (was testing MessageHeaders).
2013-03-27 18:02:16 -04:00
Gary Russell
d1a6594824 INT-2922 Fix TypeConverter Concurrency Issue
During initialization, it is possible for type conversion to fail because a second thread accesses a partially built list of PropertyEditors. This is because getDefaultEditor(Class) is not thread-safe.

* Add a test with mocks and spies to verify concurrent access to the method occurs before the fix, and not after the fix.
* Synchronize the call to getDefaultEditor(), when called from canConvert() and convertValue().
* Only synchronize the call until we have invoked the method at least once.
2013-03-27 18:02:16 -04:00
Gunnar Hillert
6c167339c7 Merge pull request #770 from garyrussell/INT-2959-21x
* garyrussell-INT-2959-21x:
  INT-2959 Correct Schema GW reply-timeout Doc.
2013-03-27 17:19:39 -04:00
Gary Russell
25fdbc66bf INT-2959 Correct Schema GW reply-timeout Doc.
Incorrectly indicated that an exception is thrown when
the gateway times out.
2013-03-22 11:16:01 -04:00
Spring Buildmaster
77f10dc7cc [artifactory-release] Next development version 2013-01-25 13:14:59 -08:00
Spring Buildmaster
8a9509c1fe [artifactory-release] Release version 2.1.5.RELEASE 2013-01-25 13:14:52 -08:00
Gary Russell
fbf87aa358 INT-2861/INT-2862 TCP Outbound Gateway Fixes
INT-2861

Close connection after 'remoteTimeout' because the
socket is dirty (may contain an in-flight reply).

Add test that demonstrates the problem and that it
is resolved.

INT-2862

Remove entries from pendingReplies (map of async responses
for which we are waiting).

Add an assertion to the above test to ensure cleanup.
2013-01-22 12:39:42 -05:00
Gary Russell
ea5865c33c INT-2889 Fix Concurrency Problem in Type Converter
In the BeanFactoryTypeConverter, when falling
back to a PropertyEditor (when the source is non-
String and the target is String), the setValue() and getAsText()
methods are used.

This is not thread-safe and one thread might get another's
converted value.

Synchronize the use of the PropertyEditor.

Add test, that reliably reproduces the problem, to verify the
fix.
2013-01-18 16:24:54 -05:00
Gary Russell
76130308f8 INT-2885 Remove DOS Newlines
MessageGroupStoreReaper
2013-01-16 13:34:40 -05:00
Artem Bilan
a0307364be INT-2878: MessageGroupStoreReaper's Lifecycle Fix
`MessageGroupStoreReaper` continues to expire `MessageGroups` via `scheduled-task`
when not `running`.

* Add check `isRunning()` to `run()` & `destroy()`
* Additional `MessageGroupStoreReaper` polishing
* Add test-case

JIRA: https://jira.springsource.org/browse/INT-2878

INT-2878: Polishing : PR Comments
2013-01-16 13:30:11 -05:00
Gary Russell
80db00c42c 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 16:27:29 -05:00
Gary Russell
59105ef8d1 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 18:51:06 -05:00
Gary Russell
bb75c06b0d INT-2814 Fix OSGI Versions for OXM/WS - Backport
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.
2012-11-09 15:13:16 -05:00
Gary Russell
87f7f8ead4 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:58:22 -05:00
michaljemala
3ee1cee4df INT-2801 Twitter: Fix Init. of Metadata Key
Key was not initialized unless authorized.
2012-11-08 15:35:45 -05:00
Mark Fisher
a50857fdc4 Merge pull request #656 from garyrussell/INT-2534
INT-2534 Fix Bundlor Versions for 2.1.5
2012-10-31 16:25:54 -04:00
Gary Russell
bea012c26a INT-2534 Fix Bundlor Versions for 2.1.5
2.1.4 Didn't update version range for S.I. modules.
2012-10-31 16:18:16 -04:00
Mark Fisher
fae9d1b005 updating gradle version to 1.2 and bundlor plugin to 1.2 (GA)
updated docbook plugin to version 0.1.6

adjustments for updated gradle wrapper
2012-10-31 16:13:50 -04:00
Spring Buildmaster
af76a9c9ac 2012-10-19 11:33:20 -07:00
Spring Buildmaster
78ce6ac3ec Release version 2.1.4.RELEASE 2012-10-19 11:33:13 -07:00
Gary Russell
79802e6249 INT-2751 Jdbc Message Store Group Id Issues
Jdbc Message Store always converts the correlation id
to a UUID string, even if it's already a String.

This causes reaper issues with the correlating message
handler because the reap occurs under
a different lock to normal group processing.

This change ensures the lock is properly mutually
exclusive.
2012-09-19 15:42:01 -04:00
Oleg Zhurakousky
a8cf253a69 INT-2749 add'long' cast to SftpFileInfo
Add cast to (long) to a return value of getMTime methood called in SftpFileInfo.getModified()
2012-09-19 19:07:12 +01:00
Gary Russell
8070df4fad INT-2751 Fix Reaper Race Condition
When the reaper runs, and finds a group that is in the
process of being completed, the reaper blocks on the
lock, but when the lock is released, goes ahead and
reaps the group.

Now, after obtaining the lock, the reaper checks to
see if the modified date changed and, if so, aborts
the reap of the group this time around.

Required adding lastModified accounting for SimpleMessageGroup
(accounting already exists for other message groups).

Test case reproduced the problem, demonstrating duplicate
output messages.

After the fix, it shows the reap was aborted in the debug
log.

INT-2751 Polishing

PR Comments
2012-09-18 09:53:43 -04:00
Oleg Zhurakousky
6200da2dd4 INT-2677 Upgrade JMS Module to use ActiveMQ 5.6.0 2012-07-18 13:35:24 -04:00
Oleg Zhurakousky
5f32629129 INT-2666-2.1.x Fix NPE in SimpleMessageStore
INT-2666-2.1.x polished test

Polishing
2012-07-12 17:58:09 -04:00
Gary Russell
26ee9ab953 INT-2652 Fix mget for FTP
FTP servers return full path from listNames() whereas SFTP
returns just the filename. mget logic assumed SFTP behavior.

Add a test to see if the filename already starts with the remote
directory and remove it before calling get() (which assumes just
the filename).

Includes an @Ignored test for FTP and SFTP that runs an mget
against a server.
2012-07-11 08:56:00 -04:00
Gary Russell
c5bd22d336 INT-2650 Don't Convert byte[]
Backport to 2.1.x

The problem reported by INT-2630 was more extensive. For example,
the unconditional parameter conversion causes arrays to be copied
unnecessarily.

The BeanFactoryTypeConverter now does a no-op conversion whenever
the source type is assignable to the target type.

This effectively reverts to the Spring 3.0 behavior, where this
assertion resulted in the argument not being added to the
argsRequiringConversion array.

Polishing

Add a couple more tests
2012-07-06 14:16:12 -04:00
Oleg Zhurakousky
928c93e77c Merge remote branch 'upstream/2.1.x' into 2.1.x 2012-07-06 14:14:01 -04:00
Spring Buildmaster
6e2f830531 [artifactory-release] Next development version 2012-07-02 10:40:57 -07:00
Spring Buildmaster
fbd895cb4c [artifactory-release] Release version 2.1.3.BUILD 2012-07-02 10:40:53 -07:00
Oleg Zhurakousky
65abf023bd INT-2610 Fix Gateway Mapping Issue
Fix the inability for mappings by convention to be overriden with payload expression
2012-07-02 12:51:04 -04:00
Oleg Zhurakousky
97b2d2a04e INT-2610
fixed the inability for convetional mappings to be overriden with payload expression
2012-07-02 12:37:47 -04:00
Gary Russell
d2a237ab2b INT-2643 Update OSGI Ranges 2.1.3 2012-07-02 10:44:09 -04:00
Gary Russell
3c950e49c4 INT-2635 Set Buffer Size for Piped Streams
Backport to 2.1.x

Improve performance.

For NIO sockets, a pair of PipedInput/OutputStreams are
used to transfer data from the reading thread to the
assembling thread.

The stream used the default buffer size (1024) which was
inefficient for large messages.

This change uses the underlying socket's receiveBufferSize
attribute to set the size of the piped stream, allowing
for more efficient data transfer.
2012-06-28 11:59:00 -04:00
Gary Russell
2bd02d06d6 INT-2630 MessageHeaders/History Conversion Issue
Backport (cherry-pick) to 2.1.x.

Spring-expression 3.1 unconditionally converts all arguments for
method calls; MessageHeaders and MessageHistory do not have
no-arg constructors and the MapToMapConverter always attempts
conversion, in case any elements require conversion.

We are exploring a Spring 3.1 change but, in the meantime, we
have a detour in BeanFactoryTypeConverter in that we
can skip conversion of these types.
2012-06-26 12:17:56 -04:00
Oleg Zhurakousky
5448810a57 INT-2594 added BF support to ExpressionEvaluatingCorrelationStrategy
INT-2594 addressed PR comments

INT-2594-21x polishing
2012-06-15 08:04:55 -04:00
Spring Buildmaster
90fe7c4226 2012-06-02 11:04:20 -07:00
Spring Buildmaster
db83c51d6e Release version 2.1.2.BUILD 2012-06-02 11:04:13 -07:00
Oleg Zhurakousky
bf916637d2 INT-2600 updated OSGI ranges 2012-06-01 15:05:10 -04:00
Gary Russell
6e64d4d210 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:21:47 -04:00
Gary Russell
27d41a6bbf Merge pull request #433 from olegz/INT-2508a-21x 2012-05-09 15:20:02 -04:00
Oleg Zhurakousky
10c8cba67f INT-2508 Priority Channel FIFO Backport
Fix a concurrency issue with the PriorityChannel by
introducing a private MessageWrapper; an implementation
of Message, to maintain the contract with the Comparator.

The MessageWrapper contains the original Message plus
an incremented sequence number, used as a tie-breaker,
to maintain FIFO semantics within priority.

Previously, the sequence number was added to, and removed
from, the headers of the original Message using a
DirectFieldAccessor.

This could cause concurrent modification
exceptions when it was removed.

INT-2508 polishing based on PR comments

INT-2508 Polish Whitespace
2012-05-09 15:18:55 -04:00