Commit Graph

9623 Commits

Author SHA1 Message Date
Gary Russell
81bfaeb8a9 INT-3002 Fix Content-Type Mapping
https://jira.springsource.org/browse/INT-3002

The AMQP outbound endpoint behaves differently when configured
as a gateway compared to when it is configured an adapter.

With the adapter, the header mapper is invoked after the message
converter (via the MPP callback).

With the gateway, the mapper is invoked before the converter.

The SimpleMessageConverter unconditionally sets the content-type,
overriding any mapped content type.

Change the code to invoke the header mapper after the converter
to match the adapter logic.

Remove the TODO. The method now exists, but Using a MPP in the
gateway case does not provide access to headers on the reply.

Add test cases.
2013-05-07 13:24:57 -04:00
Mark Fisher
23856828a7 Merge pull request #794 from garyrussell/INT-2999
* INT-2999: Add BeanResolvers to AMQP OB Endpoints
2013-05-07 12:56:43 -04:00
Gary Russell
d5ce090d19 INT-2999 Add BeanResolvers to AMQP OB Endpoints
Expressions (routing key, exchange, correlation data) did
not resolve beans. Need to add the BeanFactory (if present)
to the MessageProcessors.

Add test case.
2013-05-07 12:55:40 -04:00
Mark Fisher
121b28f426 Merge pull request #762 from garyrussell/INT-2956
* INT-2956: Fix NIO With Custom Deserializers
2013-05-07 12:39:09 -04:00
Gary Russell
474a00509b INT-2956 Fix NIO With Custom Deserializers
The TcpNioConnection uses an internal InputStream.

The standard deserializers only use the read() method.

Custom Deserializers might use read(byte[]); the
internal InputStream did not override these methods, possibly
causing the deserializer to hang awaiting data, when none
was coming.

Override these methods, with the appropriate semantics
from the super class...

- Block until at least one byte arrives.
- Return early if no data is available after at least one byte arrives.
- Return -1 if closed when no data arrived.
- Return the number of bytes actually read.

Polishing - PR Comments remove read(byte[]) because it doesn't do
anything different to the superclass method.
2013-05-07 12:36:22 -04:00
Mark Fisher
3eab287e95 Merge pull request #792 from garyrussell/INT-2972
* INT-2972: FixedMethodFilter - Return Mutable List
2013-05-07 10:42:43 -04:00
Gary Russell
3c31c38053 INT-2972 FixedMethodFilter - Return Mutable List
Compatibility with SF 3.2.2

Previously the filter returned a Collections.singletonList() when
a match is found.

Spring 3.2.2 attempts to sort the results of MethodFilter.filter()
which fails because the list is immutable.

Continue to return Collections.emptyList() with no match; this
does not cause the sort to fail.

Several tests in MethodInvokingMessageProcessorTests reproduce this
problem with Spring 3.2.2.

Add a test to confirm the Collections.emptyList() does not cause
any problems.
2013-05-07 10:35:48 -04:00
Mark Fisher
fd9dc75550 Merge pull request #797 from garyrussell/INT-2903
* INT-2903: Fix Timing Problem in TCP Timeout Tests
2013-05-07 10:32:31 -04:00
Gary Russell
b654044fd2 INT-2903 Fix Timing Problem in TCP Timeout Tests
Use latches and the new CLOSE event instead of arbitrary waits for
sockets to close.

Factor out common test code into setup methods.

removed system.out
2013-05-07 10:30:40 -04:00
Mark Fisher
e24efc89b3 Merge pull request #795 from dturanski/XD-33
* XD-33 - Implemented Local Channel Registry
2013-05-01 17:31:19 -04:00
David Turanski
e5919799ce XD-33 - Implemented Local Channel Registry
modified per Artem's comments and added pub-sub to support inbound taps

Modified tap to use provided wiretap on inbound channels. Tap on outbound not supported

Changes to support conditional shared channel creation and the ability to share a registered channel for inbound() and outbound()
2013-05-01 17:29:10 -04:00
Gary Russell
8b164fef1c Merge pull request #778 from kdvolder/master
* TestUtils:
  Fix compile error in STS/Eclipse.
2013-05-01 17:16:09 -04:00
Kris De Volder
bcb626f0ed Fix compile error in STS/Eclipse.
TestUtils exists in both s-i-test and in src/test... in
s-i-core.

Gradle import caused the file module to use the one in
core that was missing a method.

We should look at a better solution but for now, this
commit syncs the two versions.

Also polished to fix white space violations.
2013-05-01 17:16:01 -04:00
Gunnar Hillert
3dbf1158cc Merge pull request #796 from garyrussell/INT-2976
* garyrussell-INT-2976:
  INT-2976 Update JavaMail to 1.4.7
2013-05-01 16:43:00 -04:00
Gary Russell
445e043d31 INT-2976 Update JavaMail to 1.4.7 2013-05-01 16:40:17 -04:00
Gunnar Hillert
9bee4b3ff2 Merge pull request #798 from garyrussell/INT-3001
* garyrussell-INT-3001:
  INT-3001 Field Order in SyslogToMapTransformer
2013-05-01 16:35:22 -04:00
Gary Russell
e27cd56451 INT-3001 Field Order in SyslogToMapTransformer
Use a LinkedHashMap instead of HashMap so iterators
retain the original field order.
2013-05-01 16:05:01 -04:00
Gary Russell
5d1759cf42 Merge pull request #755 from artembilan/INT-2455
* INT-2455:
  INT-2455: Support HTTP Outbound 'encode-uri' Flag
2013-04-30 11:53:01 -04:00
Artem Bilan
bb77f508ec INT-2455: Support HTTP Outbound 'encode-uri' Flag
The `<http:outbound-channel-adapter>` and `<http:outbound-gateway>` now provide
an `encode-uri` option that controls whether the request uri is encoded
(default `true`).

It can be useful in some scenarios with a non standard URL, e.g. RabbitMQ REST API:
'http://foo.RabbitMQ.com/api/queues/%2f/bar.queue' where we must not
encode the '%'.

https://jira.springsource.org/browse/INT-2455

INT-2455: Polishing based on PR comments

INT-2455: 'encode-uri' in the Reference Manual
2013-04-30 11:48:53 -04:00
Gary Russell
ab9b6fb1dd Merge pull request #774 from artembilan/INT-2831
* INT-2831:
  INT-2831: Add Jackson 2 support
2013-04-30 09:38:15 -04:00
Artem Bilan
a103e43c6a INT-2831: Add Jackson 2 support
Add Jackson 2 support while retaining backward compatibility as much as possible.

Introduce a new abstraction for JSON conversion.

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

INT-2831: Polishing

* remove `JsonObjectMapperFactoryBean`
* add @Deprecated constructors to `ObjectToJsonTransformer` and `JsonToObjectTransformer`

Polishing

Docs, compiler warnings.
2013-04-30 09:33:19 -04:00
Gunnar Hillert
486e0bee3c Merge pull request #784 from garyrussell/INT-2991
* garyrussell-INT-2991:
  INT-2991 Filtered Messages Marked SEEN
2013-04-29 10:37:53 -04:00
Gary Russell
c03ecebf19 INT-2991 Filtered Messages Marked SEEN
Missing else clause caused filtered email messages to
still be marked as SEEN. Also marked un-filtered messages
twice if a filter was present.

Add else; add tests.
2013-04-29 10:34:06 -04:00
Gunnar Hillert
0b5cabf22c Merge pull request #793 from garyrussell/INT-2620
* garyrussell-INT-2620:
  INT-2620 Fix Race Condition in Failover Tests
2013-04-29 10:29:56 -04:00
Gary Russell
bf4005a92c INT-2620 Fix Race Condition in Failover Tests
Sporadic test failures (fairly consistently on Mac).

Problem was some tests sent a message to a client socket before the
close notification had been received.

Wait for client connection to close rather than waiting for the
server to stop.

Also, with NIO, close the channel on accept exception.

Also improve debugging by including a log of new connections
including the id.
2013-04-28 23:29:03 -04:00
Gunnar Hillert
7d6b5850f5 Merge pull request #790 from garyrussell/INT-2982a
* garyrussell-INT-2982a:
  INT-2982 Fix Hard-Coded Ports in Syslog Tests
2013-04-26 00:23:04 -04:00
Gary Russell
920190931e INT-2982 Fix Hard-Coded Ports in Syslog Tests
Use the port finder to find an available port; using
hard-coded ports can cause issues with concurrent builds.

One test found a port in the XML but was still hard-coded
in the test itself rather than retrieving the port from
the adapter.

Also, stop the adapters when tests complete.
2013-04-26 00:22:08 -04:00
Gary Russell
5e7aa59f73 Merge pull request #781 from ghillert/INT-2980 2013-04-24 11:23:43 -04:00
Gunnar Hillert
88165c8881 INT-2980 Jdbc Message Store: Polling Wrong Message
* Add Join to JDBC Query
* Add MySql-specific tests
* INT-2987 - MessageStore MySQL - Support Fractional Seconds
  - Update MySql Connector version to 5.1.24
  - Add DDL scripts for MySql versions 5.6.4 and higher

INT-2980 - Check also for Regions

* Add test

INT-2980/INT-2987 - Add Documentation

INT-2980 - Doc: Add info to What's New Section
2013-04-24 11:21:21 -04:00
Gunnar Hillert
749896b812 Merge pull request #789 from garyrussell/INT-2892
* garyrussell-INT-2892:
  INT-2892 Add 'local-filter' to (S)FTP Adapters
2013-04-24 00:13:15 -04:00
Gary Russell
14a7953ff6 INT-2892 Add 'local-filter' to (S)FTP Adapters
Allow the replacement of the default AcceptOnceFileListFilter.
2013-04-24 00:11:28 -04:00
Gunnar Hillert
e6753efd50 Merge pull request #780 from garyrussell/INT-2982
* garyrussell-INT-2982:
  INT-2982 Add Syslog Inbound Channel Adapter
2013-04-23 23:39:07 -04:00
Gary Russell
7908655883 INT-2982 Add Syslog Inbound Channel Adapter
* Supports UDP/TCP syslog messages.
* See docbook patch for more information.

For reference see: https://jira.springsource.org/browse/INT-2982
2013-04-23 23:36:36 -04:00
Gunnar Hillert
2c5b9eb977 Merge pull request #788 from garyrussell/INT-2996
* garyrussell-INT-2996:
  INT-2996 Fix Class and Package Cycles
2013-04-19 09:56:41 -04:00
Gary Russell
00cb16ec21 INT-2996 Fix Class and Package Cycles
INT-2996 Fix Package Cycle

Move interface ...store.MetadataStore to ...store.metadata.

INT-2996 Fix Class Tangle

TcpConnectionEvent incorrectly referenced the
concrete TcpConnectionSupport instead of TcpConnection.
2013-04-16 19:10:48 -04:00
Gunnar Hillert
b50410923f Merge pull request #779 from garyrussell/INT-2981
* garyrussell-INT-2981:
  INT-2981 - Add Rename (mv) to (S)FTP Gateway
2013-04-16 16:32:35 -04:00
Gary Russell
c224d445ac INT-2981 - Add Rename (mv) to (S)FTP Gateway
* (S)FTP Change Commands, Options to Enums
* INT-2981 Add Support For 'mv' To File/Remote/GW
* INT-2981 (S)FTP Namespace Support and Docs
* INT-2981 Create Remote Dirs if Needed
* INT-2981 Add 'mv' Command to What's New
* INT-2981 Polishing - PR Comments
* Add javadocs to enums.
* Polish schemas to use an enumerated type for available gateway commands
2013-04-16 16:26:29 -04:00
Gary Russell
2e2986d354 Merge pull request #787 from ghillert/INT-2992 2013-04-16 16:19:35 -04:00
Gunnar Hillert
8d05c27a94 INT-2992 - Upgrade Derby Test Dependencies
* Upgrade Derby test dependencies to 10.9.1.0
* Due to test-failures switch from using the embedded-database namespace support for Derby to explicitly configured DataSource beans (DriverManagerDataSource)

For more details see: https://jira.springsource.org/browse/INT-2992
2013-04-16 14:24:33 -04:00
Gary Russell
768d7ff713 Merge pull request #786 from ghillert/INT-2964 2013-04-15 17:17:32 -04:00
Gunnar Hillert
05062aa0b2 INT-2964 Various JavaDoc Fixes
INT-2964 - JavaDoc: <emphasis> should be <em>

INT-2964 - JavaDoc: <p/> should be <p>

INT-2964 - JavaDoc polishing

* <li></li> should be wrapped in <ul></ul>
* wrap code snippets in {@code myCode()}
* change <code>false</false> to <code>false</code>

INT-2964 - Polish - Fix more JavaDoc errors

* Mockito-all dependency causes JavaDoc error. Change dependency to Mockito-Core.
2013-04-15 17:11:38 -04:00
Gary Russell
4c348d3785 Merge pull request #785 from ghillert/INT-2985 2013-04-15 15:59:15 -04:00
Gunnar Hillert
51149184e8 INT-2985 - Upgrade to Gradle 1.5 2013-04-11 16:02:24 -04:00
Gunnar Hillert
7e8035acd2 Merge pull request #783 from sobychacko/INT-2926
* sobychacko-INT-2926:
  INT-2926:Remove deprecation warnings in CacheServerProcess in the gemfire module
2013-04-11 12:19:12 -04:00
Soby Chacko
b3e6630ced INT-2926:Remove deprecation warnings in CacheServerProcess in the gemfire module 2013-04-11 12:13:17 -04:00
Gunnar Hillert
fe7c311f9c Merge pull request #782 from garyrussell/INT-2989
* garyrussell-INT-2989:
  INT-2989 Increase JMS Test Timeouts
2013-04-10 17:46:36 -04:00
Gary Russell
52db954eff INT-2989 Increase JMS Test Timeouts
The default 5 second timeout is insufficient in some cases
for the larger volume tests. In most cases, increase to
10 seconds; in some cases to 30 seconds.

Also, add code to keep the ActiveMQ VMTransport running for
the entire test class (by keeping a connection open).

Avoids cycling the broker, which can cause other issues.

Also close the context in a finally block in PipeLineJmsTests.

Clean up some whitespace violations in config files.

This, together with the try/finally block makes the commit
look bigger than it really is; suggest using 'git log -p -b'
to review.

Increase overall test timeout for PipelineNamedReplyQueuesJmsTests.
2013-04-10 17:38:48 -04:00
Gary Russell
3e5a3a2b3d Merge pull request #769 from artembilan/INT-2720 2013-04-10 10:41:57 -04:00
Artem Bilan
6b7ae6ceed INT-2720: UriTemplate Support for S-WS Transports
Remove deprecation in the WS module

JIRA: https://jira.springsource.org/browse/INT-2720
      https://jira.springsource.org/browse/INT-2530

INT-2720: Polishing after rebase

INT-2720: Add a note to the Reference Manual

Polishing <authorgroup> to avoid extra whitespace before name

INT-2720: Pr comments & polishing

* Revert removed public API
* Revert tabs in What's new
* Change real URL to fake to allow for tests to work off-line
* Add smackx dependency to avoid error messages in logs
2013-04-10 09:54:34 -04:00
Gary Russell
7d99a9a07a Merge pull request #776 from artembilan/INT-2971 2013-04-09 10:02:31 -04:00