Commit Graph

7448 Commits

Author SHA1 Message Date
Gunnar Hillert
d649a9f542 Merge pull request #810 from garyrussell/INT-3028
* garyrussell-INT-3028:
  INT-3028 Fix Tailing Factory Bean
2013-05-22 15:05:28 -04:00
Gary Russell
2857e7809c INT-3028 Fix Tailing Factory Bean
- Needs to implement SmartLifecycle and delegate to the adapter
 - Needs to implement ApplicationEventPublisherAware and configure the adapter
 - Don't set TaskExecutor if null
2013-05-22 14:19:43 -04:00
Gary Russell
2298809ac9 INT-2855 Fix commons-io Dependency
Even when using native tail, there is a dependency on
commons-io due to the factory bean.
2013-05-22 13:09:06 -04:00
Gunnar Hillert
3176cbaf34 Merge pull request #758 from garyrussell/INT-2951
* garyrussell-INT-2951:
  INT-2951 Add Context Id to Dispatcher has no Subs.
2013-05-22 12:58:45 -04:00
Gary Russell
b904fde5c0 INT-2951 Add Context Id to Dispatcher has no Subs.
https://jira.springsource.org/browse/INT-2951

Provide the context id in the 'Dispatcher has no Subscribers'
message.

Ease debugging when more than one context in an application.

INT-2951 Polishing

PR Comments - add quotes to context Id in log message.

Polishing

INT-2951 Polishing

Change IOS to have a simple getApplicationContextId() and
add a method getFullChannelName() to AbstractMessageChannel.
2013-05-22 12:57:20 -04:00
Mark Fisher
e255399415 Merge pull request #809 from garyrussell/INT-3026
* INT-3026: Header Enrichment Using Gateways
2013-05-21 15:07:46 -04:00
Gary Russell
fe3e4a26db INT-3026 Header Enrichment Using Gateways
Add link to wiki page to reference doc.
2013-05-21 14:53:47 -04:00
Gary Russell
fa9f747c37 Merge pull request #753 from srt/INT-2755
* INT-2755:
  INT-2755: Support 'id' For <chain> Child Elements
2013-05-21 12:29:31 -04:00
Artem Bilan
ecf15a9834 INT-2755: Support 'id' For <chain> Child Elements
* Introduce XSD 'id' attribute for all `<chain>` sub-components
* Register `<chain>` sub-components as Beans with names based on `<chain>` 'id'
* Generate aliases for sub-components based on element 'id'
* Add `<chain>` parser test to check sub-components as Beans within `BeanFactory`
* Ignore `NestedChainParserTests` as abnormal and confused for SI-configs
* Now `<chain>` sub-components are trackable by `MessageHistory`
* Now `<chain>` sub-components are eligible for JMX export
* Polishing some failed tests

https://jira.springsource.org/browse/INT-2755
https://jira.springsource.org/browse/INT-2321

INT-2755: Register as Beans only if 'id' provided

INT-2755: Set 'componentName' for handlers with 'id'

When components within `<chain>` are configured with an 'id' attribute
the 'componentName' of the handler is  constructed as:
chainHandler.componentName + '.' + handler.componentName.
Otherwise it is as was before.

INT-2755: Polishing

INT-2755: changes according PR's comments

* Add INFO about preference of `id` attribute for `<chain>` in the `ChainParser`
* Change `<chain>`'s sub-components `id` generation algorithm
* Configure `<chain>`'s sub-component `componentName` in the `ChainParser` instead of in the `MessageHandlerChain`
* Add `componentName` property to the `JpaOutboundGatewayFactoryBean`
* Add a note to the Reference Manual

INT-2755: Localize duplicate 'id' within chain

INT-2755: remove child beans aliasing

* Polishing tests
* Polishing docs

INT-2755 Polishing: Handle Nested Chain Bean Names

Previously named beans within a nested chain did not get unique
bean names.

INT-2755: Polishing nested chains

Doc Polishing
2013-05-21 12:26:27 -04:00
Gary Russell
ccf7492097 INT-2855 Fix Tail Test on Build Server
- Fix tail test
 - Fix 2 javadoc issues
2013-05-20 21:58:57 -04:00
Gary Russell
20d7c30fd0 Merge pull request #803 from srt/INT-3011
* INT-3011:
  INT-3011 Groovy Classloader and BeanFactory Fixes
2013-05-20 17:50:02 -04:00
Stefan Reuter
e890020a1b INT-3011 Groovy Classloader and BeanFactory Fixes
See: https://jira.springsource.org/browse/INT-3011

INT-3011 Pass BeanClassLoader and BeanFactory to GroovyScriptFactory

INT-3011 Move 'implements BeanFactoryAware, BeanClassLoaderAware'
to AbstractScriptExecutingMessageProcessor and GroovyControlBusFactory
2013-05-20 17:46:48 -04:00
Gunnar Hillert
1f9c6e39b6 Merge pull request #802 from garyrussell/INT-2855
* garyrussell-INT-2855:
  INT-2855 File Tailing Inbound Channel Adapter
2013-05-20 11:21:07 -04:00
Gary Russell
f2fef2a7e9 INT-2855 File Tailing Inbound Channel Adapter
Two implementations:

  - native 'tail' command (e.g. tail -F -n 0 /foo/bar)
  - Apache commons-io Tailer

Further changes:

 - Add documentation to section "what's new"
 - Add a JUnit @Rule so the OSDFTMP test doesn't fail on Windows
2013-05-20 11:16:00 -04:00
David Turanski
9721eac28b INT-2984 changed some LocalChannelRegistry methods to protected 2013-05-19 10:19:36 -04:00
David Turanski
68aa23710c INT-3013 Upgrade to Spring Data Gemfire 1.3.1 2013-05-14 15:45:27 -04:00
Gunnar Hillert
b06f3aaecb Merge pull request #804 from artembilan/INT-2783
* artembilan-INT-2783:
  INT-2783: Add BeanResolver to StoredProc params
2013-05-13 11:27:10 -04:00
Artem Bilan
a9d1beb7fa INT-2783: Add BeanResolver to StoredProc params
JIRA: https://jira.springsource.org/browse/INT-2783
2013-05-10 17:15:16 +03:00
Mark Fisher
0c4c0d9f17 Merge pull request #800 from garyrussell/INT-3004
* INT-3004: Detect Timeout in MessagingTemplate
2013-05-09 10:58:03 -04:00
Gary Russell
91f040f1c7 INT-3004 Detect Timeout in MessagingTemplate
https://jira.springsource.org/browse/INT-3004

Previously, reply messages were silently ignored if the request thread
times out or caught an exception, or had already handled a reply.

Add a WARN log if the client times out or catches an exception,
or has already received a reply.

Optionally make these fatal; at this time, we are not exposing
this boolean on the namespaces see INT-3005.

Polishing - PR Comments

INT-3004 Polishing

Change MessagingTemplate property to throwExceptionOnLateReply.
2013-05-09 10:54:26 -04:00
Gary Russell
698cb10fe4 Merge pull request #750 from artembilan/INT-2935
* INT-2935:
  INT-2935: Improve Event Inbound Adapter
2013-05-08 12:29:29 -04:00
Artem Bilan
116f4934c1 INT-2935: Improve Event Inbound Adapter
Previously, the `ApplicationEventListeningMessageProducer` accepted
all `ApplicationEvent`'s and than filtered them.
This caused some `ApplicationEventMulticaster.retrieverCache` overhead.

* Improve `ApplicationEventListeningMessageProducer` to `implements SmartApplicationListener`.

    This allows filtering earlier on first the appropriate `ApplicationEvent`
    using `ApplicationEventListeningMessageProducer#supportsEventType`
    and caching the `ApplicationListener` only for that `ApplicationEvent`.

* Re-register `ApplicationEventListeningMessageProducer` in the `ApplicationEventMulticaster`
    when  `ApplicationEventListeningMessageProducer#setEventTypes` is invoked
    to clear the `ApplicationEventMulticaster.retrieverCache`.

* Move `org.springframework.integration.gemfire.inbound.SpelMessageProducerSupport` to core `ExpressionMessageProducerSupport`.

* Add test for the new logic int `ApplicationEventListeningMessageProducer` and its behavior with respect to the `ApplicationEventMulticaster.retrieverCache`.

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

INT-2935: EMPS JavaDoc & AELMP ReadWriteLock

INT-2935: AELMP#eventTypes changing 'barrier'

INT-2935: avoid 'eventTypes' mutation afterwards

INT-2935: Polishing according PR comments

INT-2935: Fix NPE in the `setEventTypes`

Minor Polishing

   Polish java docs/comments
   Remove compiler warnings
2013-05-08 12:25:04 -04:00
Mark Fisher
515d78f8ee Merge pull request #801 from garyrussell/INT-3007
* INT-3007: Add WARN Log When Advice Skipped
2013-05-07 16:25:06 -04:00
Gary Russell
18e9754a66 INT-3007 Add WARN Log When Advice Skipped
Previously, when a MessageHandlerAdvice is applied to something
other than a MessageHandler, the advice was silently skipped.

Add a WARN log message that warns that the advice is not applied.

Add a test case that ensure the log is emitted when the
advice is applied to a Poller.
2013-05-07 14:20:37 -04:00
Mark Fisher
7ef3ee5f6e Merge pull request #799 from garyrussell/INT-3002
* INT-3002: Fix Content-Type Mapping
2013-05-07 13:26:01 -04:00
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