* MessageGroupStore <-> MessageGroupCallback
- Change callback to be an inner interface of the MGS.
* INT-2829 Fix Class Tangle in IP Module
- 3 way tangle between TcpSender, TcpConnection, TcpMessageMapper
- Clean up interfaces (remove setters); add top-level support classes for TcpConnection, TcpConnectionInterceptor.
* INT-2829 Remove TCP Package Tangle
- tcp.connection <-> tcp.connection.support
- Remove ...connection.support package - move classes to ...connection.
delivery-mode was deprecated (in favor of delivery-persistent)
in 2.0. Remove attribute from schema and parser.
Unfortunately, the setter on the gateway was never deprecated
so there is a possibility someone is using it programmatically,
with no knowledge that it is going away.
Deprecated the setter.
Also, added schema documentation for several attributes where
no documentation was provided.
* add XSD element for nested router type
* add tests on the matter
* polishing for RouterParserTests
JIRA: https://jira.springsource.org/browse/INT-2893
INT-2893: Polishing
INT-2893: after rebasing to 3.0
XSD changes reverted from 2.2 and moved to 3.0
INT-2893 Polishing
Factor out common elements; fixing missing documentation for
`expression` within a `router` within a `chain`.
Currently supports destination and destination name.
* Add support for replyDestinationExpression.
* Add Docs for JMS Outbound Gateway Attributes.
* Change method name for consistency.
AbstractTransactionSynchronizingPollingEndpoint was introduced late in the 2.2 release process to avoid a breaking change to AbstractPollingEndpoint. For 3.0, its methods are now pulled-up into APE.
Further change:
* remove Deprecated Setter (PollerMetadata)
* fix failing test
Copy schemas, cleanup whitespace, update spring.schemas files,
update version in AbstractIntegrationNamespaceHandler.
For each schema compared the 2.2 version with the 3.0 version
(diff -w), ensuring the only difference is the import of
3.0 schemas (where appropriate) instead of 2.2.
The AbstractRequestHandlerAdvice uses an internal wrapper for
Throwable, in a similar fashion to the TransactionInterceptor.
Exceptions are unwrapped properly when exiting the invoke method so
callers are unaware of the wrapping.
The technique is used to avoid user errors (for example catching OOM
Errors and not propagating). User code (subclasses) only catch
Exceptions.
However, in the case of the ExpressionEvaluatingRequestHandlerAdvice,
the exception is included in any ErrorMessage sent to a failureChannel.
User code should not have to navigate these internal exceptions within
the cause tree.
Add a method to the abstract class unwrapExceptionIfNecessary, which
will unwrap the root cause exception if possible.
Add a method to the abstract class unwrapThrowableIfNecessary, which
will unwrap the root cause Throwable if possible.
Update tests to reduce the cause() traversals to reflect the
ThrowableHolderExceptions are no longer in the tree.
Add a test to verify a Throwable (such as an OOM) is properly
propagated.
Add a test to verify that when the root cause is a Throwable (and not
an Exception), the ErrorMessage sent to the failureChannel does not include
the ThrowableHolderException.
qualified inner class @links (when merging)
2.2.0 changed ObjectToJsonTransformr to add content-type to
simplify AMQP applications.
However, in a JMS environment, the DefaultJmsHeaderMapper attempted
to map (and failed) to map the header, emitting a warning log entry.
JMS does not allow '-' in property names.
Add code such that:
1. If the ObjectToJsonTransformer is configured to use a
content-type of an empty String (after trimming), suppress the
addition of the header to the output message. For consistency, if
the inbound message already has a content type header, and the transformer
is configured with an empty String, remove the header.
2. Change the DefaultJmsHeaderMapper to map the MessageHeaders.CONTENT_TYPE
header (content-type) to/from a JMS compliant property name (content_type).
INT-2874 PR Comments
Move constant to JmsHeaderMapper interface and rename.
Fix failing test (explicit set content-type to "").
INT-2874 Documentation Updates
Add docbook and schema documentation clarifying the behavior
of the transformer with respect to setting the `content-type`
header.
INT-2874 Polishing - Remove Header Removal
After further discussion, we decided to not remove an
existing header, if 'content-type' is set to "".
This is because there was no way to handle the case of
NOT adding a header when none present, while retaining a
header if it was already present.
added test for empty content-type attrib and no existing header (while merging)
Previously TcpNioConnection used a pair of Piped(In|Out)putStreams
to pass data from the read event to the deserializer.
However, it is possible to get a 'Broken Pipe' exception if the
last thread that wrote to the pipe terminates.
Replace the use of this pair of streams with an inner class
ChannelInputStream, which provides the same functionality, but
with no dependency on threading.
Uses a BlockingQueue to store read buffers which are consumed by
the message assembler thread (read from the InputStream in the
Deserializer). To avoid OOM conditions, the queue is limited to
5 "unread" buffers; and a timeout will occur if the reader
doesn't consume some data to free up space in the queue.
When an exception occurred while obtaining a connection,
the root cause was lost.
In addition, a MessageMappingException was thrown instead
of a MessageHandlingException.
- Deprecate getConnection() in favor of obtainConnection()
- Capture the underlying exception as the cause of a MessageHandlingException
- Add test case
fixed @link (when merging)
removed @return with no args (when merging)
A connection used by a gateway may timeout prematurely.
Previously, the socket read timeout simply controlled when
a socket would be closed after the timeout occurred.
Consider a connection with so-timeout set to 10 seconds; the
application initializes at T+0 and the first message is sent,
with the server responding immediately; the timeout clock starts.
Next, a message is sent at T+5 to a service that takes 6 seconds
to respond. The connection will timeout at T+10 before the
response is received; the socket is closed and client does not
receive the response.
The solution is to wait 2 timeout cycles *IF* a message has
been sent within the current timeout.
Maintain a timer for the last send() operation. When a socket
timeout occurs, examine the last sent time; if within the
timeout, defer the close until the next timeout.
We cannot simply rely on the last send time because, when
using collaborating adapters, continuous sends (with no replies)
would defer the close indefinitely. Hence, the second test looking
to see if we have not had a successful read for the last 2 timeouts.
NIO does not directly support socket timeouts (because there is no
thread hanging on the read); instead, the timeout logic is
performed on the selector thread.
Rename DefaultTimeoutTests to ConnectionTimeoutTests.
Add tests (for both Socket and NIO connections) to assert the correct
operation when a send is performed within a timeout, as well as
when the server takes > 2x the timeout to respond.
INT-2860 Fix Typo in Exception Message
Error sending meeeage.
removed invalid comment from test (while merging)
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.
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.