Commit Graph

1782 Commits

Author SHA1 Message Date
Gary Russell
ea4763faa9 INT-4095: Support Limiting (S)FTP Files Fetched
JIRA: https://jira.spring.io/browse/INT-4095

Limit the number of remote files fetched on each poll (when it is necessary to fetch files).

Polishing - PR Comments

Polishing - Decouple MaxFetchSize from Poller

Polishing - PR Comments

Schemas and Docs

More Polishing

* Polishing according PR comments
2016-08-26 13:36:14 -04:00
Artem Bilan
76bb3ada32 Ignore Exponential Moving Average Tests
https://build.spring.io/browse/INT-SI43X-6/

Since Exponential Moving Average algorithm is fully based on the time in between events, it is very difficult to reach the stable tests.
All of them used to fail from time to time on the slow CI server.

Mark all Exponential Moving Average Tests with `@Ignore`.

The manual testing is required in case of some changes.

**Cherry-pick to 4.3.x**
2016-08-23 11:43:15 -04:00
Gary Russell
9f40d896a2 INT-4092: Add errorChannel Header with Void Return
JIRA: https://jira.spring.io/browse/INT-4092

Polishing

Polishing

Polish of Polishing
2016-08-22 18:10:30 -04:00
Artem Bilan
52904c7106 INT-4099: Fix closableResource typo
JIRA: https://jira.spring.io/browse/INT-4099

The `IntegrationMessageHeaderAccessor.CLOSEABLE_RESOURCE` value has a typo

* Fix the typo in the `IntegrationMessageHeaderAccessor.CLOSEABLE_RESOURCE` constant value
* Fix the same type in the (s)ftp.adoc
2016-08-22 15:38:07 -04:00
Gary Russell
ea5bbe83e5 INT-4062: Reject Exec. Channel Early Subscription
JIRA: https://jira.spring.io/browse/INT-4062

Only Enforce When an Executor is Provided

With `ExecutorChannel` and `PublishSubscribeChannel` (when an executor is provided),
any early subscription is lost because the dispatcher is replaced.

checkstyle
2016-08-19 17:08:07 -04:00
Gareth Chapman
3742899cb1 INT-4069: Use AnnotatedElementUtils
JIRA: https://jira.spring.io/browse/INT-4069

Finding annotations with AnnotatedElementUtils allows us to use
explicit annotation attribute overrides specified by the @AliasFor
annotation.
2016-08-19 16:29:53 -04:00
Gary Russell
04a42f54be Rename Schemas to 5.0
Fix Schema Imports

spring.schemas
2016-08-18 14:40:38 -04:00
Artem Bilan
d6045aa48b Fix Checkstyle violations 2016-08-18 14:32:46 -04:00
Artem Bilan
6ccad0daa8 Upgrades and fixes for compatibility 2016-08-18 12:42:06 -04:00
Artem Bilan
11151efc8c Upgrade to SF-5.0 and Reactor-3.0 2016-08-17 16:23:21 -04:00
Artem Bilan
8a577de83f Make AbstractMessageHandler as Subscriber
* Upgrade to the latest Reactor-2.5.0
* Fix all `Promise` and `Streams` mentioning to the `Mono` and `Flux`
* Add `ReactiveEndpoint.SubscribableChannelPublisherAdapter` to adapt `SubscribableChannel` into a `Publisher` for Reactive downstream
2016-08-17 16:23:04 -04:00
Artem Bilan
abb8b0152c Fixes according the latest Reactor 2016-08-17 16:23:04 -04:00
Artem Bilan
1ae05c325f Upgrade to the latest Reactor 2016-08-17 16:23:04 -04:00
Artem Bilan
e6af887972 Upgrade to Rector-2.5 2016-08-17 16:23:04 -04:00
Artem Bilan
3eae0239bf SI-5.0: ReactiveMessageChannel & ReactiveEndpoint
* Add `ReactiveMessageChannel` implementation based on the provided `Processor<?>` for internal dispatching logic.
Implement the `Publisher<?>` contract to allow downstream `Subscriber<?>`
* Add `ReactiveEndpoint` implementation to deal with the `ReactiveMessageChannel` through the Reactive Streams contract.
* Add appropriate `ReactiveEndpoint` building logic to the `ConsumerEndpointFactoryBean` and `AbstractMethodAnnotationPostProcessor`
* Rework Gateway to use `Publisher<?>` contract instead of `Promise` implementation.
2016-08-17 16:23:03 -04:00
Artem Bilan
014ed83967 Fix SF-4.3.3 Compatibility
https://build.spring.io/browse/INT-B43-JOB1-274
2016-08-10 19:28:46 -04:00
Gary Russell
d0008c368e INT-4085: Access ARPMH from RequestHandlerAdvice
JIRA: https://jira.spring.io/browse/INT-4085

Polishing - PR Comments
2016-08-09 09:54:41 -04:00
Artem Bilan
5d19f380a9 INT-4078: Don't copy headers in the Resequencer
JIRA: https://jira.spring.io/browse/INT-4078

Even if it doesn't hurt to `copyHeadersIfAbsent()`, when it just adds a new headers and doesn't override existing like sequence details,
it doesn't sound reasonable for `Resequencer` to modify the message before and after its resequence logic.

* Change `shouldCopyRequestHeaders()` to `false` for `ResequencingMessageHandler`
2016-07-26 11:52:43 -04:00
Artem Bilan
d9f9f9e3ca INT-4064: Simplify IdempotentReInt Java Config
JIRA: https://jira.spring.io/browse/INT-4064

We configure `IdempotentReceiver` via `<int:idempotent-receiver>` component or `@IdempotentReceiver` annotation.
In case of regular Java config, e.g. direct `ConsumerEndpointFactoryBean` usage or Java DSL,
it isn't possible to configure `idempotentReceiverInterceptor` enough easy

* Introduce `if...else` logic into `ConsumerEndpointFactoryBean` to proxy `MessageHandler`,
if `adviceChain` contains an newly-introduced `HandleMessageAdvice`.
And do that independently if `MessageHandler` is `AbstractReplyProducingMessageHandler`
* Make `idempotentReceiverInterceptor extends HandleMessageAdvice`
* Skip `HandleMessageAdvice` in the `AbstractReplyProducingMessageHandler`
* Add advice applying logic into the `AbstractMethodAnnotationPostProcessor` as well

Introduce `HandleMessageAdvice` marker interceptor to cover the case when an `Advice` can be advices as well.
Remove unused `setAdviceChainIfPresent()` method in the `AbstractMethodAnnotationPostProcessor`

Document `HandleMessageAdvice`

Increase wait latch timeouts in the `LockRegistryLeaderInitiatorTests`

Doc Polishing
2016-07-22 13:56:41 -04:00
Artem Bilan
5716315e88 INT-4070: Fix @Gateway for Message Receive Style
JIRA: https://jira.spring.io/browse/INT-4070

The `MessagingGatewaySupport.receive()` is fully based on the `this.messagingTemplate.receiveAndConvert(replyChannel, null);`
which really just extracts `payload` from the `Message` via default `MessageConverter`.
Therefore `@Gateway` code, which expects to poll exactly `Message<?>` from the flow, is invalid at runtime with `ClassCastException`

* Expose `MessagingGatewaySupport.messagingTemplate` property as `protected` to give access for inheritors and siblings
* In the `GatewayProxyFactoryBean` use `messagingTemplate` and `replyChannel` directly from the `MethodInvocationGateway`
to invoke raw `gateway.messagingTemplate.receive(replyChannel)` bypassing any conversion and to avoid breaking changes.
* Proof the solution with `GatewayProxyFactoryBean.testReceiveMessage()`

**Consider to cherry-pick (backport) down to 3.0.x**

Add `messagingGateway.convertReceiveMessage` global property to let revert to previous behavior

* Make `messagingGateway.convertReceiveMessage=true` by default

* Mock `BeanFactory` in the `GatewayProxyFactoryBeanTests.testReceiveMessage()`
to be sure that `messagingGateway.convertReceiveMessage=false` works as expected

* Add `testReceiveMessageConvert()` to demonstrate `ClassCastException`

Rebase and make `convertReceiveMessage` integration property as `false` by default

Introduce `MessagingGatewaySupport.receiveMessage()` and use it from the `GatewayProxyFactoryBean`
2016-07-22 12:04:02 -04:00
Artem Bilan
999644a530 INT-4072 Fix applySequence with State Propagation
JIRA: https://jira.spring.io/browse/INT-4072

When `publishSubscribeChannel` is with `applySequence = true`, a `messageToSend` is overridden with `sequenceDetails` using `MessageBuilder`, therefore a new fresh `Message`.
In case of state propagation, e.g. `SecurityContextPropagationChannelInterceptor`, we just lost the state from the `ThreadStatePropagationChannelInterceptor.MessageWithThreadState` because of new `Message<?>`

* Add into `BroadcastingDispatcher` the logic to delegate `pushSequenceDetails` into `MessageWithThreadState` directly do not lose the `state`
* Make `ThreadStatePropagationChannelInterceptor` as `MessageBuilderFactory`-aware and use it to rebuild an `original` `Message<?>` in the `MessageWithThreadState` to populate `SequenceDetails`

**Cherry-pick to 4.2.x**

Provide an explicit order for `publishSubscribeChannel` subscribers

Fixes GH-1847 (https://github.com/spring-projects/spring-integration/issues/1847)

Fix mutation in the `ThreadStatePropagationChannelInterceptor`

Since `BroadcastingDispatcher` invokes `pushSequenceDetails` for each subscribed handler,
make `MessageWithThreadState` as immutable and return a new instance via `cloneWithSequenceDetails()` method with particular `sequenceDetails`.
Previous mutable solution ended up with the issue of concurrent modification.

* Introduce `CloneableMessage` abstraction to let any custom `Message` to return `MessageBuilder` with desired context.
* Introduce `DelegatingMessageBuilder` as an extension of the `MessageBuilder` to let custom `CloneableMessage` to return desired customization.
* Add into `MessageBuilder#fromMessage()` `if` for the `CloneableMessage`
* Add into `MutableMessageBuilder` a `warn` about `CloneableMessage`
* Revert changes in the `BroadcastingDispatcher` in favor of `CloneableMessage` in the `MessageBuilder`
* Redo `ThreadStatePropagationChannelInterceptor#MessageWithThreadState` logic to be based on the `CloneableMessage` and `DelegatingMessageBuilder` extension.

Introduce `MessageDecorator` contract

Remove `CloneableMessage` aspect and everything around
`MessageWithThreadState` is now `MessageDecorator` and `BroadcastingDispatcher` check if incoming `message` is `MessageDecorator` and performs its `decorateMessage` after `builder`
2016-07-21 11:04:47 -04:00
Artem Bilan
ecf9554fd0 INT-4074 Late channel resolution for GatewayProxy
JIRA: https://jira.spring.io/browse/INT-4074

If the `@ServiceActivator` component is processed first the application will start.
However, if another component that relies on the channel creation goes first it'll fail as the bean for the channel does not exist.

* Add `name` setters for all channels in the `GatewayProxyFactoryBean` to allow late channel resolution in the target `MethodInvocationGateway`
* Change `MessagingGatewayRegistrar` to populate channel properties as names not bean references

**Cherry-pick to 4.2.x**
2016-07-20 09:38:08 -04:00
Artem Bilan
2cb5a0704a INT-4013: <ref bean> for channel-interceptor
JIRA: https://jira.spring.io/browse/INT-4013

Previously we couldn't define a config as :
````xml
<int:channel-interceptor pattern="input*">
      <ref bean="sampleInterceptor" />
</int:channel-interceptor>
````

* Fix `GlobalChannelInterceptorParser` to distinguish `BeanDefinitionParserDelegate.REF_ELEMENT` child elements
and extract an appropriate `BeanReference`
* Modify `GlobalChannelInterceptorTests-context.xml` to prove the fix and meet JIRA requirements
2016-07-11 06:44:06 -04:00
Artem Bilan
a7dc7c3912 INT-4057: Router: don't use convert for Class key
JIRA: https://jira.spring.io/browse/INT-4057

When general router `channelKey` returns just a `Class<?>` result, we end up with the
`unsupported return type for router [class java.lang.Class]` and forced to to call its `getName()` in the target application code before returning to router.

* Change the `AbstractMappingMessageRouter` logic to treat `Class<?>` as a special String-aware case, use its `getName()` and don't go to the `ConversionService`
* Increase receive timeout for replies in the `TcpInboundGatewayTests`
2016-07-11 06:36:21 -04:00
Artem Bilan
9db2eb9868 Fix timeouts in the InnerGatewayWithChainTests
https://build.spring.io/browse/INT-B43-246
2016-07-01 19:34:25 -04:00
Artem Bilan
24278cc8c5 Gemfire: some fixes and optimization for tests
See https://build.spring.io/browse/INT-AT42SIO-199/

In some places we start `Cache` but doesn't close/destroy it in the end.
That sometimes causes conflicts with the already started GemFire from other tests or wrong state around `BeanFactoryLocator`

* Ensure `Cache` destroy in the end of each test
* In addition destroy `Region` as well to avoid unexpected race conditions, too
* Plus optimize some tests to start `Cache` and `Region` only once per test class, not for each test method

From here I can say that it even would be better to start `Cache`, and therefore whole GemFire, only once per entire Gemfire module test suite.
But that is fully different story.

Remove `forkEvery` from Gemfire module

Allow get a performance improvement for the build.

The `gradlew clean :spring-integration-gemfire:testAll` with existing state is like:
```
Total time: 3 mins 41.375 secs
```
With this fix and without `forkEvery`:
```
Total time: 1 mins 42.699 secs
```
So, 2 min saved time!

Plus fix timeouts in the `PayloadSerializingTransformerParserTests`
2016-07-01 19:16:35 -04:00
Artem Bilan
cfa00c5707 INT-1463 Fix PriorityChannel#getRemainingCapacity
JIRA: https://jira.spring.io/browse/INT-1463

An existing `QueueChannel#getRemainingCapacity()` is based on the `BlockingQueue#getRemainingCapacity()` which is always `Integer.MAX_VALUE`
and doesn't reflect reality for provided `capacity`

* Fix `PriorityChannel` to return `upperBound.availablePermits()` for `getRemainingCapacity()`
* Add test for `PriorityChannel` on the matter
* Also increase `reply-timeout` for `<int-redis:queue-outbound-gateway>` in `RedisQueueGatewayIntegrationTests-context.xml` from 1 sec to 10 secs
2016-07-01 11:11:09 -04:00
Artem Bilan
266b4d46ad INT-4055: Fix New SonarQube Violations
JIRA: https://jira.spring.io/browse/INT-4055

Further fixes for Sonar report

Fix more errors from Sonar

Fix unused `import`
2016-06-27 11:13:50 -04:00
Dave Syer
1752204eb6 INT-4058: Add leader initiator for lock registry
JIRA: https://jira.spring.io/browse/INT-4058

If you hold the lock, you are the leader. This simple idea gets you
a long way if there is no "native" leader initiator. E.g. you
can use this with a RDBMS with JdbcLockRegistry.

Add some docs on leader election under "endpoints"

Make thread name for leader initiator unique

In case there are multiple instances in the same context we would
like to be able to spot them in the logs.

INT-4058: Polishing

* Code refactoring in the `LockRegistryLeaderInitiator`: SI use 120 line length
* Add `Assert.notNull()` for required properties
* Add `this.lock.unlock()` and `Thread.sleep(LockRegistryLeaderInitiator.this.busyWaitMillis)` into the `catch` block to let distributed elections to work.
Otherwise there is a big chance that we will acquire the lock and become a leader again just after `yield()`
* Change `LockContext.toString()` to use simple `String` concatenation which is optimized by compiler to the `StringBuilder`.
That let to have some better micro-performance compared with with extra `Formatter` object in case of `String.format()`
* Add `JdbcLockRegistryLeaderInitiatorTests`

* Fix `yield()` logic based on the `Future.cancel(true)`.
Since one `FutureTask.cancel(true)` makes it as `INTERRUPTED` any subsequent `yield()` does not make any effect, therefore our infinite selector loop isn't interrupted one more time.
* Reschedule the `LeaderSelector` in the `yield()` after cancel(true).
* Rework `catch` in the selector loop just to the `InterruptedException` and `return null;` to stop looping and let reschedule the selector.
* Add one more `onRevoked` logic into the `final` of the selector loop to notify that we have lost leadership during `stop()`
* Improve `JdbcLockRegistryLeaderInitiatorTests` to ensure that several `yield()` on the same initiator work well.
* Add `What's New` note.
2016-06-22 15:43:12 -04:00
Artem Bilan
fe5ff04489 INT-4054: Eliminate usage of slf4j
JIRA: https://jira.spring.io/browse/INT-4054
Fixes GH-1833 (https://github.com/spring-projects/spring-integration/issues/1833)

The `DefaultCandidate` pulled requirement for the `slf4j` dependency via its `Logger` and `LoggerFactory` usage.

* Change `slf4j` to the standard Commons Logging
* Exclude `slf4j` transitive dependencies from `optional` direct dependencies like `reactor` and `json-path`
* Since they are `optional` it is safe to exclude their transitives to force our source code to be free from unexpected dependencies.
Anyway they don't appear in the target application as a SI transitives and end-user is forced to pull them manually to switch on the desired features.
If there is need in the `slf4j` for target application, it must be pulled manually as well.

**Cherry-pick to 4.2.x**
2016-06-14 15:22:36 -04:00
Artem Bilan
cabe507e0e INT-4051: Add PublisherAnnBPP when @EnableInt
JIRA: https://jira.spring.io/browse/INT-4051

Previously we can process `@Publisher` annotations only with the `<int:annotation-config>` or with an explicit `@EnablePublisher("")`

* Fix `PublisherRegistrar` to relax from the fact if we have `@EnablePublisher` or not and register `PublisherAnnotationBeanPostProcessor` without `defaultChannelName`
2016-06-09 21:23:44 -04:00
Gary Russell
d521031a7d INT-4049: FileSplitter: JSON File Markers
JIRA: https://jira.spring.io/browse/INT-4049

INT-4049: Json FileMarker Namespace Support

* Address PR comments
2016-06-08 22:07:55 -04:00
Gary Russell
2650aef173 INT-4045: Fix NPE in ObjectToJsonTransformer
JIRA: https://jira.spring.io/browse/INT-4045

Handle the situation when the first element of a container type (or map)
is null; set the generic type of the container to `Object`.

Also, clarify how the compatibility between the transformer and Spring AMQP
message converter is achieved.
2016-06-06 11:35:23 -04:00
Gary Russell
c54d95b1aa More File Cleanup - Core 2016-06-05 10:12:18 -04:00
Gary Russell
e16f084628 File Cleanup - Core 2016-06-04 10:40:57 -04:00
Gary Russell
a30809be38 INT-4042: Support Known Router Channels in Graph
JIRA: https://jira.spring.io/browse/INT-4042

```
...
  }, {
    "nodeId" : 24,
    "name" : "integrationGraphServerTests.Config.router.router",
    "stats" : {
       ...
      }
    },
    "componentType" : "router",
    "output" : "discards",
    "input" : "four",
    "routes" : [ "barChannel", "bazChannel" ],
    "errors" : "myErrors"
  }, {
...
    "from" : 3,
    "to" : 24,
    "type" : "input"
  }, {
    "from" : 24,
    "to" : 7,
    "type" : "output"
  }, {
    "from" : 24,
    "to" : 2,
    "type" : "error"
  }, {
    "from" : 24,
    "to" : 5,
    "type" : "route"
  }, {
    "from" : 24,
    "to" : 6,
    "type" : "route"
...
```

Add Graph Support for RecipientListRouter

The RLR is not an AMMR; it's the only router outside of that class hierarchy.

Polishing

Add Dynamically Routed-to Channels to Graph

Add ExpressionBased and Expose Expression in Graph

Polishing

Add getExpressionString() to IOS

Add ExpressionCapable; Set Primary Expression

Polishing - PR Comments

Router/Expression Docs

* Simple Java Docs polishing
2016-06-03 18:36:43 -04:00
Gary Russell
dae1a01003 INT-4043: Fix ExecutorChannel with datatypes Attr.
JIRA: https://jira.spring.io/browse/INT-4043

The `ExecutorChannel` overrides `onInit()` but fails to call the super
which is where the message converter for datatype conversion is set up.

Also, when Jackson is not on the class path and there are no converters in the
context, the default integration conversion service is not registered.

The `DefaultDatatypeChannelMessageConverter` overwites its default conversion
service with this bean, unconditionally - setting it to null in this case.

Check for a null conversion service before replacing the default.

* Polishing according PR comments
2016-06-03 14:32:59 -04:00
Gary Russell
e4d2484db6 INT-4037: Graph: Add Link Type To LinkNode
JIRA: https://jira.spring.io/browse/INT-4037

Provide type information in `LinkNode`s, input, output, error, discard.

This might be rendered as:

```
              +---(discard)
              |
         +----o----+
         |         |
         |         |
         |         |
(input)--o         o---(output)
         |         |
         |         |
         |         |
         +----o----+
              |
              +---(error)
```

  "links" : [ {
    "from" : 10,
    "to" : 9,
    "type" : "output"
  }, {
    "from" : 10,
    "to" : 1,
    "type" : "error"
  } ]

Document `link.type` in the `graph.adoc`
2016-05-26 13:35:41 -04:00
Gary Russell
d414383eac INT-4034: Channel Metrics Javadocs
JIRA: https://jira.spring.io/browse/INT-4034

Incorrectly showed time since last send was seconds instead of milliseconds.
2016-05-26 11:48:02 -04:00
Gary Russell
43b83bec53 INT-4038: Add GPFB Gateways to Graph
JIRA: https://jira.spring.io/browse/INT-4038

General format for node name: bean.method#n

The #n is needed to disambiguate methods with the same name.

Polishing according PR comments

* Fix generic type for `Collections.unmodifiableMap` usage
* Change the gateway method logic in the `IntegrationGraphServer` to include the method signature in the node name to distinguish them as unique
* Move `MutableMessageBuilderFactoryTests` into the separate nested `mutable` package since `@IntegrationComponentScan` sees a new `@MessagingGateway` in the `IntegrationGraphServerTests`.
See https://jira.spring.io/browse/INT-4040
* Document the `@MessagingGateway` representation in the `graph.adoc`
2016-05-26 11:16:28 -04:00
Artem Bilan
49985df858 Fix AbstractKeyValueMessageStore create time
The `RedisMessageGroupStoreTests.testMessageGroupUpdatedDateChangesWithEachAddedMessage()` can fail
 sporadically because there is no guaranty the several calls to the `System.getCurrentTimeMillis()` return the same value.

 * Fix `AbstractKeyValueMessageStore` to reuse `MessageGroup.timestamp` for the `lastModified` in case of a new group
2016-05-18 13:35:30 -04:00
Gary Russell
a5ee9bb7f9 INT-4032: Annotation Javadoc Fixes
JIRA: https://jira.spring.io/browse/INT-4032

Polishing according PR comments
2016-05-13 16:53:16 -04:00
Artem Bilan
6c01056806 Fix timing issue in AdvisedMessageHandlerTests
https://build.spring.io/browse/INT-B43-199/

The `circuitBreakerTests()` relied on the enough short `Thread.sleep(100)`,
which may not be enough in the heavy-load environment like CI Server.
Therefor the time in between thread switching really can be much bigger than expected.

* Fix the test via timeout "emulation" using reflection to set the `lastFailure` somewhere in the past
to overcome `RequestHandlerCircuitBreakerAdvice.halfOpenAfter` barrier
2016-05-10 18:26:28 -04:00
Gary Russell
29fc5e6380 Fix Call Overridable Method From Ctor
https://sonar.spring.io/issues/search#componentRoots=org.springframework.integration%3Aspring-integration|createdAt=2016-05-03T02%3A58%3A49%2B0000|sort=UPDATE_DATE|asc=false
2016-05-03 09:10:13 -04:00
Artem Bilan
6c774638cc INT-4021: SimpleMessageStore: Disable lazy-load
JIRA: https://jira.spring.io/browse/INT-4021

Previously the `SimpleMessageStore` unconditionally followed with the super class options
and provided the `lazy-load` functionality by default.

* Since `persistent` and `lazy-load` logic does not make sense for the `in-memory` store, disable it in the `SimpleMessageStore`
* Fir `AggregatorTests` for better coverage.
* NOTE: The same message can't be persisted in the Persistent `MessageStore`. The store key is fully based on the `messageId`.
And also we provide the header which indicates that the messages has been stored before. See `JdbcMessageStore.addMessage()` for example:
```
if (message.getHeaders().containsKey(SAVED_KEY)) {
      Message<T> saved = (Message<T>) getMessage(message.getHeaders().getId());
      if (saved != null) {
		if (saved.equals(message)) {
			return message;
		} // We need to save it under its own id
	}
}
```
* Fix (S)FTP Streaming tests to use `AbstractPersistentAcceptOnceFileListFilter` instead of raw `AcceptOnceFileListFilter`,
which relies on the object identity, but neither `FtpFile`, nor  `ChannelSftp.LsEntry` provides good `equals()` and `hashCode()` implementations.
* Make `StompIntegrationTests` as `DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD` because the sporadic failure on the Travis around wrong value from the queue isn't clear (yet).
Looks like some interim event is generated by the Websocket Container on the Tomcat.
2016-05-02 15:11:20 -04:00
Artem Bilan
aa9a3ffc25 INT-4020: Fix Unnamed Global Wire-Taps
JIRA: https://jira.spring.io/browse/INT-4020

The fix for `named` global `wire-tap`s (INT-2230) didn't covered testing for `unnamed`.
Therefore the fix unconditionally didn't picked up the issue that we used a wrong `BeanDefinition` to determine the current `id`

* Fix `WireTapParser` to use `wireTapBeanName` from the `resolveId()` when the `GlobalChannelInterceptorParser` invokes it.
* Add tests to demonstrate the issue and confirm the fix

**Cherry-pick to 4.2.x**
2016-04-30 10:31:05 -04:00
Manuel Jordan
8cfb7414ad INT-4005: Fix channels' capacity with store
JIRA: https://jira.spring.io/browse/INT-4005

* The `<int:queue>` lets declare the `capacity` attribute together
with either `message-store` or `ref` attributes, which it is not
correct

* The `<int:queue>` lets declare the `capacity` attribute together
with either `message-store` or `ref` attributes, which it is not
correct
* The `priority-queue` lets declare the `capacity` attribute
together with the `message-store` attribute, which it is not
correct
* Reference documentation fixed for `channel.adoc` and `jdbc.adoc`,
doing mention about these restrictions

* Minor changes about conventions and formats applied.

Code polishing
2016-04-29 15:34:24 -04:00
Gary Russell
287d924fc0 INT-4015: Streaming Remote File Inbound Adapter
JIRA: https://jira.spring.io/browse/INT-4015
      https://jira.spring.io/browse/INT-3854

Initial commit.

Reworked to emit an input stream and use the file splitter.

Add StreamTransformer.

Add CLOSABLE_RESOURCE header so we can close the session automatically.

Implement INT-3854, FTP, SFTP

(S)FTP Namespace Changes

Docs - also fixes a PDF overflow

Polishing - PR Comments

checkstyle fixes

Polishing - Add Namespace for StreamParser

Polishing - PR Comments
2016-04-29 13:24:23 -04:00
Gary Russell
6a9a42562c INT-4009: Support Composite Handler in Graph
JIRA: https://jira.spring.io/browse/INT-4009

Adds:

    ...
    "handlers" : [ {
      "name" : "polledChain$child#0",
      "type" : "transformer"
    }, {
      "name" : "polledChain$child#1",
      "type" : "service-activator"
    } ],
    ...

to a chain node.

INT-4010: Add Discard Flows to Object Model

JIRA: https://jira.spring.io/browse/INT-4010
2016-04-26 12:31:39 -04:00
Artem Bilan
47d7a67bda Some various upgrades, fixes and refactoring
* Upgrade to SA and SF snapshots
* Address TODOs regarding those upgrades
* Resolve some other TODOs
* Replace `PropertyPlaceholderConfigurer` beans with the `<context:property-placeholder>`
* Upgrade to Spring Social Twitter 1.1.2 and resolve deprecations via mocks (https://github.com/spring-projects/spring-social-twitter/issues/91)
* Upgrade to Curator `3.1.0` and resolve deprecation in the `ZookeeperMetadataStore`
2016-04-25 23:32:14 -04:00