Commit Graph

8347 Commits

Author SHA1 Message Date
Artem Bilan
4a5acaa162 INT-4016: Improve channel.adoc for cross-links
JIRA: https://jira.spring.io/browse/INT-4016
2016-05-10 16:30:48 -04:00
Artem Bilan
806bec33f1 INT-4023: Fix MongoDB MGSs timing issue
JIRA: https://jira.spring.io/browse/INT-4023

There is no guaranty that following `System.currentTimeMillis()` return the same value.
That is how the `assertEquals()` test for `created` and `modified` value may fail sporadically.

* Fix `MongoDbMessageStore` and `ConfigurableMongoDbMessageStore` do not use a new `System.currentTimeMillis()`
in case of `group create`

**Cherry-pick to 4.2.x**
2016-05-06 07:38:08 -04:00
Artem Bilan
10a6abf688 Add Xlint:-processing Compiler Option
* To avoid a compiling noise like:
```
warning: No processor claimed any of these annotations: org.springframework.integration.support.management.IntegrationManagedResource,org.springframework.jmx.export.annotation.ManagedResource
```
add `-processing` option to the `compileTestJava.options.compilerArgs`
* Remove such an option from the `JPA` module as redundant
* Fix typos in the `spring-integration-file-4.3.xsd`
2016-05-04 14:49:46 -04:00
Artem Bilan
5975a34106 Increase security test receive timeout
https://build.spring.io/browse/INT-B41-555/

**Cheery-pick to 4.2.x**
2016-05-03 14:18:14 -04:00
Gary Russell
f0079cefd5 Fix Final "Available Socket" Tests
https://build.spring.io/browse/INT-AT42SIO-141/

Also fix sftp .gitignore
2016-05-03 11:55:55 -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
537fef8ec9 Fix feed module and downgrade to curator-2.10.0
1. The fix for `SI-feed` module wasn't proper and we still see a `deprecation` warns during testing with Gradle.

* Move all deprecated `com.rometools.fetcher` imports directly to their classes declaration in the `FeedEntryMessageSource`.
That allows `@SuppressWarnings("deprecation")` to work properly

2. The latest nightly tests against IO demonstrate that upgrading to the `curator-3.1.0` has been hasty.
And it pulls as transitive `ZK-3.5.1-alpha`. The last one isn't appropriate for our stable IO dependencies.
But on the other hand the first one isn't compatible with `ZK-3.4.x`:

> The are currently two released versions of Curator, 2.x.x and 3.x.x:

>  Curator 2.x.x - compatible with both ZooKeeper 3.4.x and ZooKeeper 3.5.x
>  Curator 3.x.x - compatible only with ZooKeeper 3.5.x and includes support for new features such as dynamic reconfiguration, etc.

* The consolidate decision with Spring Cloud team to stay with the latest curator version which pull the latest stable ZK version.
Therefore downgrade to `curator-2.10.0`
* Additional decision is always to rely on the curator's transitive dependency for ZK and don't provide explicit to avoid versions incompatibility.
2016-05-02 12:48:44 -04:00
Gary Russell
87b1af088f Fix Streaming (S)FTP Tests
https://build.spring.io/browse/INT-B43-190/

Add `AcceptOneFileListFilter`s.
2016-04-30 11:04:54 -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
Artem Bilan
354975ecef INT-4006: Upgrade to rometools-1.6.0
JIRA: https://jira.spring.io/browse/INT-4006

* Upgrade to `rometools-1.6.0`
* Fix `FeedFetcher` typo in the XSD
* Since the `FeedFetcher` (and the whole `feed-fetcher` jar) is deprecated, provide an appropriate `@SupressWarning("deprecation")`
* Deprecate `FileUrlFeedFetcher` as well
2016-04-29 16:49:39 -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
Artem Bilan
ca0fa1b182 INT-4019: Upgrade to Gradle-2.13
JIRA: https://jira.spring.io/browse/INT-4019

* Add `org.gradle.daemon=true` to `gradle.properties`
* Add `--no-daemon` to CI plans, such as `master` and `nightly`
* Adjust `.travis.yml` to disable `gradlew assamble` task and allow artifacts caching

Add `script` to `.travis.yml` config

Since we have sometimes the problem with cached dependencies and the Travis report doesn't reflect the reality properly,
  add `--refresh-dependencies` to avoid such a caching bottleneck
 Also add `--parallel` for experiment to see if a new Gradle and Travis can overcome that now

No `--parallel`

Doesn't work forTravis. It indicates the maximum load for CPU as a critical error and interrupts the spawned Gradle Threads

Add `--no-daemon`

This option does not make sense for Travis. It starts a new environment for each build.
Meanwhile looks like `caching` and `--refresh-dependencies` do their premise
2016-04-29 14:38:59 -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
Artem Bilan
6b6a38f8cb INT-4017: Fix If-None-Match HTTP header tests
JIRA: https://jira.spring.io/browse/INT-4017

According RFC 7232 (https://tools.ietf.org/html/rfc7232#section-2.3) the ETag headers must be in the pattern:
```
ETag       = entity-tag

     entity-tag = [ weak ] opaque-tag
     weak       = %x57.2F ; "W/", case-sensitive
     opaque-tag = DQUOTE *etagc DQUOTE
     etagc      = %x21 / %x23-7E / obs-text
                ; VCHAR except double quotes, plus obs-text
```
Therefore the regexp like `HttpHeaders.ETAG_HEADER_VALUE_PATTERN`
2016-04-28 20:00:06 -04:00
Manuel Jordan
98a7b679ec INT-4011: Fix jdbc.adoc for wrong m-s attr
JIRA: https://jira.spring.io/browse/INT-4011

* The `jdbc.adoc` has an incorrect reference in a snippet code about
*Priority Channel*. The correct attribute value must be `channelStore`
2016-04-27 10:05:05 -05: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
Manuel Jordan
590398f972 INT-4003: Fix channel.adoc for wrong MS def
JIRA: https://jira.spring.io/browse/INT-4003

* The `channel.adoc` has a wrong mention of `JdbcMessageStore`,
when the `JdbcChannelMessageStore` must be used
2016-04-26 12:00:25 -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
Gary Russell
3390734a99 INT-3943: Fix Race in Async AMQP Gateway Test
Ensure the non-requiresReply timeout has been processed before setting
requiresReply.
2016-04-25 18:26:21 -04:00
Spring Buildmaster
0fc5c46b32 [artifactory-release] Next development version 2016-04-25 19:39:16 +00:00
Spring Buildmaster
b643165a3a [artifactory-release] Release version 4.3.0.M2 2016-04-25 19:39:07 +00:00
Artem Bilan
60dca87d24 Revert to SF-4.3.RC1 still 2016-04-25 14:58:58 -04:00
Artem Bilan
854a504a95 Revert S-AMQP and SF to the latest Milestones
See TODOs in the code of this change
2016-04-25 14:37:24 -04:00
Artem Bilan
b3087b4fc8 Remove Gradle "fix"-scripts for Checkstyle rules 2016-04-25 13:18:53 -04:00
Gary Russell
564eb165d1 INT-3993: Add Error Flow Logic to Object Map
JIRA: https://jira.spring.io/browse/INT-3993

Does not include "standard" `errorChannel` routing from pollers,
this is implied.
2016-04-25 13:12:27 -04:00
Gary Russell
2370296b95 INT-3967: Add contentDescriptor to Object Model
JIRA: https://jira.spring.io/browse/INT-3967

Polishing

Polishing

Polishing - remove componentName
2016-04-25 13:11:22 -04:00
Gary Russell
439559f255 INT-3994: Add Option to Map MimeMessage
JIRA: https://jira.spring.io/browse/INT-3994

If a header mapper is injected into the mail receiver, a mapped
message is result instead of a message with the raw `MimeMessage`.

`MimeMessage` properties are mapped as discrete headers; in addition
the raw email headers are provided as a multivalue map in the headers.

Handle Multipart

Since a Multipart content has a reference to the original MimeMessage,
convert to a simple byte[] by default.

Add an option in case the user wants to map the message but still
interpret the Multipart intact.

Namespace and Docs

Polishing

Polishing - PR Comments
2016-04-22 18:01:02 -04:00
Artem Bilan
8df487c96f INT-3991: Add IntegrationGraphController
JIRA: https://jira.spring.io/browse/INT-3991

* Add `IntegrationGraphController` `@RestController` over `IntegrationGraphServer` bean
* Add `@EnableIntegrationGraphController` and `<int-http:graph-controller>` to register
`IntegrationGraphController` if the `DispatcherServlet` is in classpath.
* Also register the `IntegrationGraphServer` bean from the same place, if that isn't presented in the application context yet.
* Allow to configure the "root" `path` for the `IntegrationGraphController` as a placeholder value via
`spring.integration.graph.controller.request.mapping.path` property
* Add tests for both `@EnableIntegrationGraphController` and `<int-http:graph-controller>` cases based on the `MockMvc`
2016-04-22 17:34:21 -04:00
Gary Russell
b84747b090 INT-3989: WatchService Scanner Fix Checkstyle 2016-04-22 14:26:01 -04:00
Gary Russell
06703c8368 Fix WatchService Scanner Tests 2016-04-22 14:17:37 -04:00
Artem Bilan
7b1f77ac1f INT-3989: WatchServiceDirectoryScanner Improvement
JIRA: https://jira.spring.io/browse/INT-3989,
https://jira.spring.io/browse/INT-3990,
https://jira.spring.io/browse/INT-3988

INT-3989: Add `FileReadingMessageSource.WatchServiceDirectoryScanner`

* Deprecate top-level `WatchServiceDirectoryScanner` because of inconsistency around `Lifecycle` and shared `directory` property
* Copy/paste its logic into the `FileReadingMessageSource.WatchServiceDirectoryScanner` to hide that inconsistency, but still get a gain from the `WatchService` benefits
* Add support for the `StandardWatchEventKinds.ENTRY_MODIFY` and `StandardWatchEventKinds.ENTRY_DELETE` events in the `FileReadingMessageSource.WatchServiceDirectoryScanner`
* Introduce `useWatchService` option to switch to the internal `FileReadingMessageSource.WatchServiceDirectoryScanner`
* Make `CompositeFileListFilter` also as `ResettableFileListFilter`
* Deprecate weird `FileReadingMessageSource.onSend()` method and remove its usage from tests
* Modify `WatchServiceDirectoryScannerTests` for the new logic
* Document changes

Add `MODIFY` and `DELETE` test coverage

Optimize the `filesFromEvents()` logic replacing item with the fresh event sources.
Remove the item from the result set in case of `DELETE` event, because file removal generates both `MODIFY` and `DELETE` events.

* Add `FileReadingMessageSource.setWatchEvents` to allow to listen to the specific events,
not only `CREATE` or all of them.
* Modify tests and docs to reflect the new API

Address PR comments

* Improve `FileReadingMessageSource.setWatchEvents()`
* Add `file.exists()` before adding file from event.

Add more DEBUG logs into the `WatchServiceDirectoryScanner`

With the fact of those logs provide more optimizations:
* Don't register the same directory for watching:
  - use the `ConcurrentMap<Path, WatchKey> pathKeys` to track registrations
  - any modification within the directory causes the `ENTRY_MODIFY` for the directory as well.
    So, skip such an event exactly for the directory during `walkDirectory`
* Add debug logs in case of `ENTRY_DELETE`
2016-04-22 13:29:10 -04:00
Gary Russell
379a8a2d0b Async AMQP Tests: Purge ackChannel
Since acks may arrive after the timeout and therefore won't be
delivered to the ackChannel, purge the channel to clear it
instead of waiting for the acks, before stubbing the template.
2016-04-22 12:43:24 -04:00
Gary Russell
a98ce143e2 Async AMQP Test - Always Get the Ack First 2016-04-22 12:33:48 -04:00
Gary Russell
c1092e7f15 Fix Test and Add Diagnostics
https://build.spring.io/browse/INT-MJATS41-608/
2016-04-22 10:10:10 -04:00
Artem Bilan
cfdfa62745 Fix some latest test failures
https://build.spring.io/browse/INT-B43-164/

* Fix CheckStyle for `System. out .println(` expression commenting out such a code line
* Fix generics in the `JdbcMessageStoreTests`
* Increase receive timeout in the `FileMessageHistoryTests`
* Change the `AsyncAmqpGatewayTests` logic to deal with the same channel for both `ack/nack`.
The `timeout` case without reply may end up with the `Consumer cancel`, therefore `nack` not `ack` like we expected
2016-04-21 19:03:35 -04:00
Artem Bilan
286c421c1a INT-3387: MessageGroupStore Improvements
JIRA: https://jira.spring.io/browse/INT-3387,
https://jira.spring.io/browse/INT-3806

* Introduce
```
MessageGroupStore

void addMessagesToGroup(Object groupId, Message<?>... messages);
```
And implement it in all stores.

* Use new `addMessagesToGroup` where it is reasonable, e.g. `DelayHandler`
* Optimize test-case to use a new store method (where it is possible)
* Fix timing delays in the `JdbcMessageStoreTests`
* Introduce `PersistentMessageGroup`
* Add `AbstractMessageGroupStore#proxyMessageGroupForLazyLoad` to wrap the raw `MessageGroup` to the `PersistentMessageGroup` for lazy-load
* Rework `MessageGroupMetadata` do not be `immutable` and allow to store/restore in the `AbstractKeyValueMessageStore` only the `MessageGroupMetadata`
* Refactor `ResequencingMessageHandler` and `SequenceSizeReleaseStrategy` a bit for better performance when interact with the `MessageGroup`
* Add `AbstractMessageGroupStore#setLazyLoadMessageGroups` to switch off the `lazy-load` behavior and restore the previous full `MessageGroup` logic
* Add `What's New` note and `message-store.adoc` paragraph for the lazy-load functionality

`GroupType.PERSISTENT` and not lazy by default

PR Comments

Fix `JdbcMessageStoreTests` timing issues

Address PR comments

* Add performance test to the `ConfigurableMongoDbMessageGroupStoreTests`
* Add JavaDocs for the `MessageGroupFactory` methods
* Add `log4j.properties` into the `test` MongoDB module for better traceability
* Fix `JdbcMessageStore#getOneMessageFromGroup()` over the `doPollForMessage()` delegation.
The `jdbcTemplate.queryForObject()` requires exactly one and only one raw in `resultSet`
* Add performance test results into the `message-store.adoc`
2016-04-21 17:47:20 -04:00
Artem Bilan
4e4763d24f Fix JavaDos and Compiler warnings
https://build.spring.io/browse/INT-B43-162
2016-04-21 10:25:08 -04:00
Artem Bilan
38274f5ac6 JdbcPollingChannelAdapter: Fix typo and CodeStyle 2016-04-21 10:16:39 -04:00
Artem Bilan
1dc4ebe4d1 INT-4001 Disable some Jackson features by default
JIRA: https://jira.spring.io/browse/INT-4001

Since all other Spring Framework components use the Jackson's `ObjectMapper` configuration by default as:
```
this.objectMapper.configure(MapperFeature.DEFAULT_VIEW_INCLUSION, false);
this.objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
```
It would be better to be consistent in Spring Integration, too.

* Add mention options to the `Jackson2JsonObjectMapper` default's `ObjectMapper`
* Add on more constructor into the `Jackson2JsonMessageParser` to allow to inject customized `Jackson2JsonObjectMapper`
* Modify a couple tests to reflect the change
* Reformat code style in the `AbstractJsonInboundMessageMapperTests` for better readability

**The Migration Guide note follows up**
2016-04-20 17:09:55 -04:00
Artem Bilan
256a7292ef INT-3999: Avoid "hard" References from Futures
JIRA: https://jira.spring.io/browse/INT-3999

Since the scheduled tasks may live for a long time it can finish
with the `OutOfMemory` if we use the direct reference to big objects, like `Message<?>`.

* Fix `AbstractCorrelatingMessageHandler` to deal only with the `groupId`
from the `scheduleGroupToForceComplete()` when we `schedule` `Runnable` for the `forceRelease` logic.
* Fix `DelayHandler` to deal only with `messageId` in the `releaseMessageAfterDelay()`, when we
`schedule` `Runnable` for the `releaseMessageAfterDelay`.
* Since the logic hasn't been changed for those components, there is no any new test.
There is just enough to be sure that all existing tests are fine.

**Cherry-pick to 4.0.x, 4.1.x, 4.2.x**

Optimise the release task for the `SimpleMessageStore` case
2016-04-20 15:55:44 -04:00
Artem Bilan
882f4c017e INT-3998: Channel Late-Binding for WireTap
JIRA: https://jira.spring.io/browse/INT-3998

Do not modify interceptors from the `AbstractMessageChannel`.

They must be declared as beans, too.

Fix [UnusedImport] in the `EnableIntegrationTests`

Doc Polishing
2016-04-20 15:12:42 -04:00
Gary Russell
d8e4a9d114 Fix Partial Stubbing Problem in AMQP Tests
https://build.spring.io/browse/INT-SONAR-1700/

We set up some stubbing on the `AsyncAmqpTemplate` to test nacks
which are not easy to generate on a real broker.

However, some acks might not have been consumed yet - this can cause
partial stubbing errors, depending on timing.

Be sure to consume all acks before stubbing the template.
2016-04-20 14:19:49 -04:00
Artem Bilan
818387f0a4 INT-3982: Fix XSD declaration ambiguity
JIRA: https://jira.spring.io/browse/INT-3982

Also fix some sporadic, timing issues in tests
2016-04-19 08:18:14 -04:00
Gary Russell
9e092d44f7 INT-3996: Fix JdbcChannelMessageStore Javadoc
JIRA: https://jira.spring.io/browse/INT-3996

One of the query provider implementations was missing. To avoid a maintenance
nightmare, simply reference the interface's javadoc which lists all known
implementations.

* Simple `JdbcChannelMessageStore` JavaDocs polishing
* Add `LogAdjustingTestSupport` to the `StompIntegrationTests` to trace failures in the future.
* Also change the test `Start/Stop` messages to the `WARN` level in the `LogAdjustingTestSupport`, because `DEBUG` doesn't work everywhere.
Maybe some logging systems mix misconfiguration, like we have in the WebSocket modules with the Embedded Tomcat
2016-04-18 10:51:10 -04:00
Gary Russell
ae9cfc3ea5 INT-3967: Sonar Issues
https://sonar.spring.io/issues/search#componentRoots=org.springframework.integration%3Aspring-integration|createdAt=2016-04-16T02%3A56%3A21%2B0000|sort=UPDATE_DATE|asc=false
2016-04-16 10:03:33 -04:00
Gary Russell
ed40582121 INT-3967: Expose Object Model
JIRA: https://jira.spring.io/browse/INT-3967,
https://jira.spring.io/browse/INT-3987

Based on the XD FLO object model, each node represents an endpoint or channel.
The graph contains nodes and links where the links represent a connection (publish
or consume) to/from a channel.

From the test case...

```
{
  "nodes" : [ {
    "name" : "three",
    "output" : null,
    "input" : null,
    "stats" : {
      "countsEnabled" : true,
      "statsEnabled" : true,
      "loggingEnabled" : true,
      "sendCount" : 0,
      "sendErrorCount" : 0,
      "timeSinceLastSend" : 0.0,
      "meanSendRate" : 0.0,
      "meanErrorRate" : 0.0,
      "meanErrorRatio" : 0.0,
      "meanSendDuration" : 0.0,
      "minSendDuration" : 0.0,
      "maxSendDuration" : 0.0,
      "standardDeviationSendDuration" : 0.0,
      "sendDuration" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "sendRate" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "errorRate" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "available" : true
    },
    "componentType" : "channel",
    "componentName" : "three",
    "nodeId" : 1
  }, {
    "name" : "four",
    "output" : null,
    "input" : null,
    "stats" : {
      "countsEnabled" : true,
      "statsEnabled" : true,
      "loggingEnabled" : true,
      "sendCount" : 0,
      "sendErrorCount" : 0,
      "timeSinceLastSend" : 0.0,
      "meanSendRate" : 0.0,
      "meanErrorRate" : 0.0,
      "meanErrorRatio" : 0.0,
      "meanSendDuration" : 0.0,
      "minSendDuration" : 0.0,
      "maxSendDuration" : 0.0,
      "standardDeviationSendDuration" : 0.0,
      "sendDuration" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "sendRate" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "errorRate" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "available" : true
    },
    "componentType" : "channel",
    "componentName" : "four",
    "nodeId" : 2
  }, {
    "name" : "nullChannel",
    "output" : null,
    "input" : null,
    "stats" : {
      "countsEnabled" : true,
      "statsEnabled" : true,
      "loggingEnabled" : true,
      "sendCount" : 0,
      "sendErrorCount" : 0,
      "timeSinceLastSend" : 0.0,
      "meanSendRate" : 0.0,
      "meanErrorRate" : 0.0,
      "meanErrorRatio" : 0.0,
      "meanSendDuration" : 0.0,
      "minSendDuration" : 0.0,
      "maxSendDuration" : 0.0,
      "standardDeviationSendDuration" : 0.0,
      "sendDuration" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "sendRate" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "errorRate" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "available" : true
    },
    "componentType" : "channel",
    "componentName" : "nullChannel",
    "nodeId" : 3
  }, {
    "name" : "errorChannel",
    "output" : null,
    "input" : null,
    "stats" : {
      "countsEnabled" : true,
      "statsEnabled" : true,
      "loggingEnabled" : true,
      "sendCount" : 0,
      "sendErrorCount" : 0,
      "timeSinceLastSend" : 0.0,
      "meanSendRate" : 0.0,
      "meanErrorRate" : 0.0,
      "meanErrorRatio" : 0.0,
      "meanSendDuration" : 0.0,
      "minSendDuration" : 0.0,
      "maxSendDuration" : 0.0,
      "standardDeviationSendDuration" : 0.0,
      "sendDuration" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "sendRate" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "errorRate" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "available" : true
    },
    "componentType" : "publish-subscribe-channel",
    "componentName" : "errorChannel",
    "nodeId" : 4
  }, {
    "name" : "one",
    "output" : null,
    "input" : null,
    "stats" : {
      "countsEnabled" : true,
      "statsEnabled" : true,
      "loggingEnabled" : true,
      "sendCount" : 0,
      "sendErrorCount" : 0,
      "timeSinceLastSend" : 0.0,
      "meanSendRate" : 0.0,
      "meanErrorRate" : 0.0,
      "meanErrorRatio" : 0.0,
      "meanSendDuration" : 0.0,
      "minSendDuration" : 0.0,
      "maxSendDuration" : 0.0,
      "standardDeviationSendDuration" : 0.0,
      "sendDuration" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "sendRate" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "errorRate" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "available" : true
    },
    "componentType" : "channel",
    "componentName" : "one",
    "nodeId" : 5
  }, {
    "name" : "two",
    "output" : null,
    "input" : null,
    "stats" : {
      "countsEnabled" : true,
      "statsEnabled" : true,
      "loggingEnabled" : true,
      "sendCount" : 0,
      "sendErrorCount" : 0,
      "timeSinceLastSend" : 0.0,
      "meanSendRate" : 0.0,
      "meanErrorRate" : 0.0,
      "meanErrorRatio" : 0.0,
      "meanSendDuration" : 0.0,
      "minSendDuration" : 0.0,
      "maxSendDuration" : 0.0,
      "standardDeviationSendDuration" : 0.0,
      "sendDuration" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "sendRate" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "errorRate" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      },
      "available" : true
    },
    "componentType" : "channel",
    "componentName" : "two",
    "nodeId" : 6
  }, {
    "name" : "producer",
    "output" : "one",
    "input" : null,
    "stats" : null,
    "componentType" : "test-producer",
    "componentName" : "producer",
    "nodeId" : 7
  }, {
    "name" : "polling",
    "output" : null,
    "input" : "four",
    "stats" : null,
    "componentType" : "unknown",
    "componentName" : "unknown",
    "nodeId" : 8
  }, {
    "name" : "foreignMessageHandlerNoStats",
    "output" : null,
    "input" : "three",
    "stats" : null,
    "componentType" : "unknown",
    "componentName" : "unknown",
    "nodeId" : 9
  }, {
    "name" : "_org.springframework.integration.errorLogger",
    "output" : null,
    "input" : "errorChannel",
    "stats" : {
      "countsEnabled" : true,
      "statsEnabled" : true,
      "loggingEnabled" : true,
      "handleCount" : 0,
      "errorCount" : 0,
      "meanDuration" : 0.0,
      "minDuration" : 0.0,
      "maxDuration" : 0.0,
      "standardDeviationDuration" : 0.0,
      "activeCount" : 0,
      "available" : true,
      "duration" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      }
    },
    "componentType" : "logging-channel-adapter",
    "componentName" : "_org.springframework.integration.errorLogger",
    "nodeId" : 10
  }, {
    "name" : "services.foo.serviceActivator",
    "output" : "two",
    "input" : "one",
    "stats" : {
      "countsEnabled" : true,
      "statsEnabled" : true,
      "loggingEnabled" : true,
      "handleCount" : 0,
      "errorCount" : 0,
      "meanDuration" : 0.0,
      "minDuration" : 0.0,
      "maxDuration" : 0.0,
      "standardDeviationDuration" : 0.0,
      "activeCount" : 0,
      "available" : true,
      "duration" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      }
    },
    "componentType" : "service-activator",
    "componentName" : "services.foo.serviceActivator.handler",
    "nodeId" : 11
  }, {
    "name" : "services.bar.serviceActivator",
    "output" : null,
    "input" : "two",
    "stats" : {
      "countsEnabled" : true,
      "statsEnabled" : true,
      "loggingEnabled" : true,
      "handleCount" : 0,
      "errorCount" : 0,
      "meanDuration" : 0.0,
      "minDuration" : 0.0,
      "maxDuration" : 0.0,
      "standardDeviationDuration" : 0.0,
      "activeCount" : 0,
      "available" : true,
      "duration" : {
        "count" : 0,
        "min" : 0.0,
        "max" : 0.0,
        "mean" : 0.0,
        "standardDeviation" : 0.0,
        "countLong" : 0
      }
    },
    "componentType" : "service-activator",
    "componentName" : "services.bar.serviceActivator.handler",
    "nodeId" : 12
  } ],
  "links" : [ {
    "from" : 7,
    "to" : 5
  }, {
    "from" : 2,
    "to" : 8
  }, {
    "from" : 1,
    "to" : 9
  }, {
    "from" : 4,
    "to" : 10
  }, {
    "from" : 5,
    "to" : 11
  }, {
    "from" : 11,
    "to" : 6
  }, {
    "from" : 6,
    "to" : 12
  } ]
}
```

Polishing

Only include stats if at least counts are enabled.

More Polishing

Polishing

Polishing - PR Comments; isAvailable()->protected

Make isAvailable protected so it doesn't appear in the JSON.

More Polishing - PR Comments

Yet More Polishing

buildGraph() -> private, rebuild() returns graph
2016-04-15 12:57:46 -04:00
Artem Bilan
3638275783 Fix Error Handling chapter typos 2016-04-14 18:31:29 -04:00
Gary Russell
4027b38da8 Remove System.out/.err Calls From All Tests 2016-04-14 16:22:45 -04:00
Artem Bilan
e5bf0187eb INT-3980: Don't Require @Component for Messaging
JIRA: https://jira.spring.io/browse/INT-3980

When we declare our components via `@Bean` (or `<bean>`) the requirements for
the `@Component` (`@MessageEndpoint`) looks redundant and sometimes even dangerous,
when we use `@ComponentScan`, too.

* Remove the `@Component` restriction logic from the `MessagingAnnotationPostProcessor`
* Ensure that tests pass

(We may consider to backport afterwards)

Add `requireComponentAnnotation` logic

* Introduce `spring.integration.messagingAnnotations.require.componentAnnotation` property for `spring.integration.properties` as `false` by default
* Add `MessagingAnnotationPostProcessor#setRequireComponentAnnotation()` to accept the value from the `spring.integration.messagingAnnotations.require.componentAnnotation`
 * Fix `integraton` typo everywhere
 * Document the change in the `What's New` and in the `configuration.adoc`
 * Ensure that logic works properly (no messaging endpoints populated) with the `spring.integration.messagingAnnotations.require.componentAnnotation = true` and "unannotated" `AnnotatedEndpoint2` in the `AnnotatedEndpointActivationTests`

This PR also fixes: https://jira.spring.io/browse/INT-3962

Fix issues according Travis report

Doc Polishing
2016-04-12 14:35:03 -04:00