Commit Graph

9623 Commits

Author SHA1 Message Date
Artem Bilan
f660b6df2f INT-3959: Make Certain JMX Classes Top Level
JIRA: https://jira.spring.io/browse/INT-3959

Also add `LifecycleMessageHandlerMetrics.getDelegate()` and `LifecycleMessageSourceMetrics.getDelegate()`
to avoid reflection on each `extractManagedBean()`
2016-03-24 16:58:55 -04:00
Artem Bilan
6195e8d4ca Fix fixedDelay typo in the file.adoc
JIRA: https://jira.spring.io/browse/INT-3969

**Cherry-pick to 4.2.x**
2016-03-24 15:59:09 -04:00
Gary Russell
8c95a0c2af INT-3974: Document SOAP Header Mapping
JIRA: https://jira.spring.io/browse/INT-3974

Polishing according PR comments
2016-03-24 15:09:10 -04:00
Gary Russell
8db0ad3ae6 INT-3945: Async Service Activator
JIRA: https://jira.spring.io/browse/INT-3945

Polishing

Send errors to the default `errorChannel` (if available) and no `errorChannel`
header present.

Fix Test; Javadoc Polishing

Fix Test; Javadoc Polishing
2016-03-24 15:02:13 -04:00
Gary Russell
516846b750 INT-3960: File Outbound - Preserve Timestamp
JIRA: https://jira.spring.io/browse/INT-3960

Polishing - PR Comments

Fix errors according Checkstyle report.
Wrap `warn()` to `isWarnEnable()`.
Polishing for `setPreserveTimestamp()` JavaDocs.
2016-03-23 15:00:40 -04:00
Gary Russell
ad0839da8b INT-3973: SFTP - Support chmod
JIRA: https://jira.spring.io/browse/INT-3973

Add `chmod` to outbound adapter and gateway (put methods).

Polishing - PR Comments

Fix Checkstyle vulnerabilities
2016-03-23 12:28:17 -04:00
kilida
2936e97ea3 Remove duplication in TestReceivingMSParserTests
Polishing for code style and author name
2016-03-23 11:12:23 -04:00
Artem Bilan
2b0598291c RequireThis rule and fixThis Gradle task
* `gradlew clean check -x test --parallel --continue` - to collect reports
* `gradlew fixThis --parallel` - to fix all possible vulnerabilities. With `-Dfile.encoding=UTF-8` on Windows

Since the `RequireThisCheck` doesn't see parents for anonymous classes (e.g. `Runnable` callback), its report doesn't contains the outer class name with `this.`,
therefore we still have to fix those cases manually.
Thanks to the wrong `replacer` just with `this.` we have uncompilable code enough easy to find problems.
Not so easy to fix for good readability though...

* Upgrade to Grade 2.12
* Upgrade to SonarQube native plugin

The fix contains at about 300 files. So, will be done on merge.

Fix `fixThis.gradle` according PR comments

Apply `fixThis` and also `fixModifiers` for test classes.
 Fix some `this.` inner issues manually.
 Make code polishing for long lines after `fixThis`

Fix conflicts and vulnerabilities after the rebase
2016-03-22 20:18:27 -04:00
Gary Russell
e189307ab6 INT-3968: Map JmsDestination Header (Inbound)
JIRA: https://jira.spring.io/browse/INT-3968

Also deprecate `o.s.i.jms.JmsHeaders` in favor of the `o.s.jms.support` version.

*Fix JavaDocs for `JmsHeaders` and `DefaultScriptExecutor`
2016-03-22 16:07:00 -04:00
Artem Bilan
f7c59b3b18 INT-3963: Add XMPP Extensions Support
JIRA: https://jira.spring.io/browse/INT-3963

* Update to Smack-4.1.6
* Introduce `stanza-filter` option for the `<int-xmpp:inbound-channel-adapter>`
* Introduce `payloadExpression` for the complex and specific `stanza` parsing, e.g. GCM packets
* Deprecate `extract-payload` in favor of `payload-expression`
* Add `ChatMessageListeningEndpointTests` test for GCM protocol
* Add `ChatMessageInboundChannelAdapterParser` test for new attributes
* Document changes

Polishing according PR comments

Extract `#extension` SpEL variable

Document the `#extension` SpEL variable
2016-03-22 14:08:26 -04:00
Artem Bilan
956cf275e1 INT-3970: Fix ScriptExecutor for Wrong lang
JIRA: https://jira.spring.io/browse/INT-3970

NOTE: Don't see reason to back-port, because we have catched `ScriptingException` for the same reason at runtime.

Fix typo in the `AbstractScriptExecutor` method name.

Use that method from the `Assert`on the `engine`
2016-03-22 13:54:31 -04:00
Artem Bilan
66cd92a6e7 INT-3964: More @EnableIntegration Documentation
JIRA: https://jira.spring.io/browse/INT-3964

Doc Polish

XSD: document classes for element implementations

Fix Redis XSD typo for CDATA
2016-03-22 10:41:07 -04:00
Artem Bilan
c2954881ad Enable RedundantModifier checkstyle, add fixer
Add `fixModifiers.gradle` to run after `check` task.

The `RedundantModifierChecker` doesn't catch all errors at once.
We need run `check -> fixModifiers` pair several times to reach `SUCCESSFUL`.

The `fixThis` has been ported from the SA, but without applying.

* Polishing for `fixModifiers.gradle`
* Fix all redundant modifier with the `fixModifiers.gradle`

NOTE: Since all these task modify files on Windows we have to run them with the `-Dfile.encoding=UTF-8`.
Otherwise they are read and write with the Windows default `cp1251` making them incompatible with Unix system.
2016-03-17 13:10:05 -04:00
Artem Bilan
714734115a Fix WS XSD for proper header-mapper type 2016-03-15 18:19:19 -04:00
Gary Russell
d4e6615f82 INT-3943: AMQP Async Outbound Gateway
JIRA: https://jira.spring.io/browse/INT-3943

Initial commit.

Polishing; Address PR Comments; Docs

Doc Polishing

Async GW - Support requiresReply

Polishing.

Avoid extra `requiresReply` in the `AsyncAmqpOutboundGateway`
2016-03-15 17:58:18 -04:00
Gary Russell
78aaa6dac6 INT-3965: AMQP Header Mapping Changes
JIRA: https://jira.spring.io/browse/INT-3965

Rework According to AMQP-589
2016-03-15 12:35:26 -04:00
Artem Bilan
518df4f74b Make PublisherDelegate as public
https://build.spring.io/browse/INT-MJATS41-573/

The latest SF changes (https://jira.spring.io/browse/SPR-14042) added a restriction (breaking change) when
only `public` classes and their methods can be exposed as a managed resources and attributes, operations, respectively.

* Make `NotificationPublishingMessageHandler.PublisherDelegate` as `public` according the new requirement.

Even if it doesn't look necessary, because our `PublisherDelegate` is just for notification,
it sounds logical that any exposed into the JMX resource won't be `private` any more.
2016-03-15 09:42:02 -04:00
Gary Russell
a2c97ca23b Fix FTP Tests
Incorrect directory and the test didn't verify that files were retrieved.
2016-03-11 16:34:21 -05:00
Artem Bilan
c9ef27ae87 Revert UTF-8 Symbols in source code
https://build.spring.io/browse/INT-MJATS41-569/

The `fixHeaders` Gradle task (and similar) must be run from Windows with the `-Dfile.encoding=UTF-8`.
Otherwise read/write operations for files are done in the native Windows `cp1251`
2016-03-10 10:24:11 -05:00
Artem Bilan
1d93702b23 INT-3961: Add Channel Late Binding for @ICA
JIRA: https://jira.spring.io/browse/INT-3961

The `@InboundChannelAdapter` may be initialized by its `MessagingAnnotationPostProcessor` a bit earlier than the
provided channel is created and registered in the context - via some other more late `BPP`, e.g. `IntegrationFlowBeanPostProcessor` from Java DSL.

* Add channel late-binding logic to the `InboundChannelAdapterAnnotationPostProcessor` and `SourcePollingChannelAdapter` by the provided `outputChannelName` option.
* Add the `channel` alias for the `value` annotation attribute in the `@InboundChannelAdapter`
* Add the `@InboundChannelAdapter` configuration into the `EnableIntegrationTests` without the channel declaration to be sure that the fix provide the expected results without `DestinationResolutionException`
* Mention both changes in the `configuration.adoc` and `whats-new.adoc`
2016-03-08 16:33:29 -05:00
Artem Bilan
732990ee66 Fix non-UTF-8 symbols
https://build.spring.io/browse/INT-B43-113/
2016-03-07 15:21:46 -05:00
Artem Bilan
ef40a939cf Add check header rule and fixHeaders task
Add "new line" in the header end

* Optimization for the `fixHeaders.gradle`
* Apply the `fixHeaders` for the affected classes
2016-03-07 15:08:51 -05:00
Gary Russell
5fe827a3dd Checkstyle - Phase I - Unused Imports
I copied the checkstyle config from spring-boot and commented
out most of the rules.

Over time, we should uncomment each rule and fix violations.
2016-03-04 15:50:08 -05:00
Artem Bilan
15026062ac INT-3958: Groovy Compiler Customization Support
JIRA: https://jira.spring.io/browse/INT-3958

* Introduce `compileStatic` and `compilerConfiguration` properties for the `GroovyScriptExecutingMessageProcessor`,
to allow to customize the Groovy Script compilation
* Introduce `compile-static` and `compiler-configuration` options on the `<int-groovy:script>` component
* Change `RefreshableResourceScriptSource.suggestedClassName()` to return the **full** file name together with the
extension. That may be useful during the filtering phase for Compiler customization
* Modify tests to demonstrate different Compiler customization tricks
* Since Spring Boot 1.4 is already based on the SF-4.3, make an appropriate upgrade, too

Doc Polishing

More Docs Polishing
2016-03-01 15:55:34 -05:00
Artem Bilan
82c2da8dc4 Move BigMGetTests out of the main
Even it isn't harmful, the one useless class in the `.file.test` package looks confusing.

Move it out to the `test` scope and change the dependant projects respectively.
2016-02-24 16:59:40 -05:00
Gary Russell
d4c6713e8a Fix HTTP Doc 2016-02-19 10:47:39 -05:00
Steve Swor
bfb31a1361 INT-3956: peekLast for timeSinceLastSend
JIRA: https://jira.spring.io/browse/INT-3956

Use reflection in tests to access private members

fix assertion imports

Polishing author rights.
Make tests `Threas.sleep()` free.
2016-02-18 17:46:12 -05:00
Artem Bilan
1f4dda011b Disable Gradle reference task on the Travis
* Use `NO_REFERENCE_TASK=true` ENV var to skip `reference` tasks
* To enable `reference` tasks directly even with `NO_REFERENCE_TASK=true` use `ignoreEnvToStopReference` project (`-P`) variable
2016-02-18 16:46:57 -05:00
Spring Buildmaster
0b0894d94e [artifactory-release] Next development version 2016-02-16 14:27:40 -08:00
Spring Buildmaster
b9e4a88734 [artifactory-release] Release version 4.3.0.M1 2016-02-16 14:27:37 -08:00
Gary Russell
d48597f41b Fix TCP Cache Race Condition
On a gateway remote timeout, there's a race between the reader and writer
thread to close the connection.

Change the `released` boolean to an `AtomicBoolean` to avoid the unexpected
exception when the other thread attempts to return a non-existent connection
to the pool.
2016-02-16 15:51:54 -05:00
Artem Bilan
96565cc716 Fix FTP Server test config for file separator 2016-02-16 15:18:27 -05:00
Artem Bilan
217d5395c0 Upgrade to ZooKeeper-3.4.7 2016-02-16 15:07:38 -05:00
Artem Bilan
7595e4f142 INT-3919: FTP: Allow null for Remote Directory
JIRA: https://jira.spring.io/browse/INT-3919

Since `FtpClient` supports `null` for the `LS` command, treating it as a current `working directory`,
there is no reason to forbid `null` from the FTP adapters end-user perspective.

* Allow `null` for the `FtpSession` `list()` and `listNames()` methods
* Allow `null` in the `remote-directory` for the `<int-ftp:inbound-channel-adapter>`
* Allow `null` in the `expression` for the `FtpOutboundGateway`

Polishing - send error if error on async output

Cover `onFailure()` from `onSuccess()` with the `errorChannel`

Address PR Comments

* Get rid of `null` population for the `remoteDirectoryExpression` in the `AbstractPollingInboundChannelAdapterParser`
* Populate `new LiteralExpression(null)` from the `FtpInboundFileSynchronizer` ctor
* Introduce `buildRemotePath(parent, child)` function in the `AbstractRemoteFileOutboundGateway` with the `null` logic for `parent`
* Rework `mGetWithoutRecursion()` to use `LS` command and allow `null` for the dir.
* Fix tests according the new `mGetWithoutRecursion()` logic

Polishing
2016-02-16 14:45:22 -05:00
Artem Bilan
2fad35d9b8 INT-3955: Upgrade to Spring Data Hopper
JIRA: https://jira.spring.io/browse/INT-3955

Tested like:
```
gradlew clean springIoCheck -PplatformVersion=2.1.0.BUILD-SNAPSHOT -PJDK8_HOME=d:\Java\jdk8\
```
2016-02-16 12:38:39 -05:00
Gary Russell
edb30efcd5 INT-3811: Support Negative Matches on Header Map
JIRA: https://jira.spring.io/browse/INT-3811

Polishing - PR Comments
2016-02-16 12:09:47 -05:00
Alexander Derkach
583371007a Fix missing spaces in doc 2016-02-16 10:24:33 -05:00
Gary Russell
408b8ca5f3 INT-3954: Nested Exception in SFTP remove()
JIRA: https://jira.spring.io/browse/INT-3954

Left `e.toString` in the message for now; to avoid a breaking change.
2016-02-16 10:14:46 -05:00
Gary Russell
51a16b2f45 INT-3953: AMQP Delay Header Mapping
JIRA: https://jira.spring.io/browse/INT-3953

Polishing

Doc Polish
2016-02-12 20:53:27 -05:00
Gary Russell
ae2e1b0a8d INT-3947: Support Async Message Handlers
JIRA: https://jira.spring.io/browse/INT-3947

Async Message Handler

If `asyncReplySupported` and the handler returns a `ListenableFuture<?>`,
defer the send to the reply channel until the future is satisfied.

First candidate would be the `AmqpOutboundGateway` wired with an
`AsyncRabbitTemplate`.

Polishing - Use errorChannel Header for Exceptions

Add more tests.

Polishing - ListenableFuture Callback Exceptions

Polishing - send error if error on async output

Cover `onFailure()` from `onSuccess()` with the `errorChannel`
2016-02-11 17:12:00 -05:00
Artem Bilan
51f319bd4f INT-3949: FileWritingMH: use Files.move()
JIRA: https://jira.spring.io/browse/INT-3949
2016-02-11 15:48:19 -05:00
Gary Russell
91387147c9 INT-3952: Local IP Address Header and SocketInfo
JIRA: https://jira.spring.io/browse/INT-3952
2016-02-11 11:43:28 -05:00
Gary Russell
188bb8555e Fix Amqp Header Mapper MimeType
Remove unnecessary class name comparison; `MediaType` is a subclass of `MimeType`.
2016-02-10 15:23:17 -05:00
Artem Bilan
7628cc5439 INT-3950: Fix Aggregator documentation
JIRA: https://jira.spring.io/browse/INT-3950

Previously there was a mention of the `MessageGroupStore.expireMessageGroup(groupId)` which just doesn't existing
in the Framework and never has been there.

* Fix the documentation for the existing `MessageGroupStore.expireMessageGroups(timeout)`.
Although the mention there of `Control Bus` requires to have `@ManagedOperation` on the method.

* Add `@ManagedOperation` for the `MessageGroupStore.expireMessageGroups(timeout)` and confirm with the test-case: `AggregatorWithMessageStoreParserTests`
* Fix the same docs in the XSD for `<aggregator>`
* Fix other typos in the `aggregator.adoc` and `resequencer.adoc`
2016-02-05 11:08:14 -05:00
Artem Bilan
6d4bc8eefa INT-3917: Gemfire tests polishing
JIRA: https://jira.spring.io/browse/INT-3917

* Add `@DirtiesContext` to tests with application contexts
* Add `cache.close()`
* Add NPE check around `cache` in the `@After` methods
* Change a parser test to use mocks, not real Gemfire objects

**Cherry-pick to 4.2.x**
2016-02-02 10:57:10 -05:00
Artem Bilan
760e030c56 Protect JmsOutboundGateway against NPE
https://build.spring.io/browse/INT-MJATS41-532
2016-02-02 09:30:09 -05:00
Gary Russell
d91a6fd467 Add Contributor Covenant
Also convert CONTRIBUTING from markdown to asciidoc.
2016-02-01 17:54:33 -05:00
Artem Bilan
d2eba0927d INT-3939: Consistency for Redis Queue Gateways
JIRA: https://jira.spring.io/browse/INT-3939

Previously `RedisQueueInboundGateway` and `RedisQueueOutboundGateway` used different `RedisSerializer`s
for non-String objects.

* Change the default to the `JdkSerializationRedisSerializer` for the consistency in case of client/server scenarios.

The previous behavior with the `StringRedisSerializer` can be reinstated with `serializer` injection.

Doc Polishing.
2016-01-28 15:49:29 -05:00
Artem Bilan
f762f2c3f0 Fix JDBC test for the HSQLDB Dead Lock
https://build.spring.io/browse/INT-B43-86
https://sourceforge.net/p/hsqldb/bugs/1432
2016-01-25 18:07:00 -05:00
Artem Bilan
c66632a3a0 Fix CrossOriginTestsfor SF-4.3 compatibility
https://build.spring.io/browse/INT-MJATS41-524

Since SF-4.3 (see https://jira.spring.io/browse/SPR-13130) the
`OPTIONS` request, which isn't CORS one (without `HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD`),
is handled by new internal `HttpOptionsHandler`, which just responds with `Allow` header.
2016-01-25 15:00:54 -05:00