Commit Graph

9623 Commits

Author SHA1 Message Date
Artem Bilan
adbbca13fb INT-4513: Clean IntManageConf from removed beans
JIRA: https://jira.spring.io/browse/INT-4513

The `IntegrationManagementConfigurer` keeps metrics beans in its local
stores.
When we add beans at runtime, they are not removed from those caches
after their removal

* Implement `DestructionAwareBeanPostProcessor` in the `IntegrationManagementConfigurer`
and clean up caches according provided bean type and its name
* Improve `ManualFlowTests` and `FtpTests` to be sure that
`IntegrationManagementConfigurer` caches are cleared after destroying
 `IntegrationFlowRegistration`

**Cherry-pick to 5.0.x**
2018-07-27 13:32:08 -04:00
Gary Russell
bd0fd50313 INT-4514: Integration Graph, include dynamic flows
JIRA: https://jira.spring.io/browse/INT-4514

`getBeansOfType()` with eager init does not currently return late registered singletons.
We should not be eagerly initializing here anyway.

**cherry-pick to 5.0.x**
2018-07-27 12:45:09 -04:00
Artem Bilan
cdba9a741c INT-4512: Add more JMS options for DSL builders
JIRA: https://jira.spring.io/browse/INT-4512

* Add `JmsListenerContainerSpec.subscriptionShared()` option

**Cherry-pick to 5.0.x**
2018-07-27 10:31:33 -04:00
Artem Bilan
c44cd2b99b Upgrade to Reactor 3.2 M3, Fix FluxMessageChannel 2018-07-27 09:35:31 -04:00
Artem Bilan
8c03d72e2d INT-4510: Test no memory leak in FluxMessageCh
JIRA: https://jira.spring.io/browse/INT-4510

Related to https://github.com/reactor/reactor-core/issues/1290

The `Flux.publish()` and subsequent `connect()` doesn't fuse a subscriber
for the hooks flow is interrupted (complete, or error, or disconnect).
In this case the `FluxMessageChannel.publishers` store is not cleared
from the finished publishers

* Add test-case to check the `FluxMessageChannel.publishers` store after
finishing the stream
* Add `hide()` operator with TODO to remove when an appropriate Reactor
version is ready

**Cherry-pick to 5.0.x**
2018-07-27 09:31:51 -04:00
Artem Bilan
8b13b2861d Revert to errorStrategyContinue in FluxMessageChe
https://build.spring.io/browse/INT-MASTER-1134

According the latest released reactor-core-3.2.0.M2, there is no yet
a `.onErrorContinue()` operator.
We need to stick with the `.errorStrategyContinue()` for time being
2018-07-27 09:10:34 -04:00
Artem Bilan
0c65bb741b Upgrade to Security 5.1.M2 and Rector 3.2.0.M2
* Upgrade to Reactor-Netty-0.8.0.M1
2018-07-27 09:03:44 -04:00
Artem Bilan
3ab037f1eb Fix RedisUtils to detect UNLINK per RedisOps
This might be a fact that application doesn't use a single
`RedisOperations`.
Also the same JVM may be shared between several applications with
different connections to different Redis servers

* change plain `Boolean unlinkAvailable` property to the
`Map<RedisOperations<?, ?>, Boolean>` and `computeIfAbsent()` per
provided `RedisOperations`
2018-07-26 14:36:33 -04:00
Artem Bilan
da977941f8 INT-4509: Fix memory leak for static beans stores
JIRA: https://jira.spring.io/browse/INT-4509

To avoid a re-usage of the `AbstractReplyProducingMessageHandler`,
the `IntegrationFlowDefinition` and `AbstractStandardMessageHandlerFactoryBean`
have a `static Set<>` to store already used producers and check it for
newly provided.
These stores are not cleaned when beans are destroyed leading to memory
leaks

* Implements a `DisposableBean` for the `AbstractStandardMessageHandlerFactoryBean`
to remove its `replyHandler` from the `referencedReplyProducers` on
`destroy()`
* Introduce a `IntegrationFlowDefinition.ReplyProducerCleaner` - an
`DestructionAwareBeanPostProcessor` to clean up removing `MessageProducer`
from the `IntegrationFlowDefinition.REFERENCED_REPLY_PRODUCERS`

**Cherry-pick to 5.0.x**
2018-07-26 14:15:58 -04:00
Gary Russell
20789ac118 Upgrade Spring AMQP to 2.1.0.M1 2018-07-26 13:28:19 -04:00
Gary Russell
37d05de02d Upgrade Spring Framework, Data, to RC1 2018-07-26 10:40:25 -04:00
Artem Bilan
1ee0639be4 Increase wait timeout in the AbsCorMHandlerTests
https://build.spring.io/browse/INT-MASTERSPRING40-414/
2018-07-26 09:47:20 -04:00
Artem Bilan
9d17e09f31 Upgrade to the latest Kotlin
* Fix more recursive generics on factory methods
See https://jira.spring.io/browse/INT-4458

**Cherry-pick to 5.0.x**
2018-07-26 09:11:55 -04:00
Artem Bilan
4d20fe5e1e Upgrade to Spring WS 3.0.2
**Cherry-pick to 5.0.x**
2018-07-25 16:41:43 -04:00
Artem Bilan
88c7646ed9 INT-4507: Use UNLINK in RedisMessageStore if any
JIRA: https://jira.spring.io/browse/INT-4507

* Add `RedisUtils` with the `isUnlinkAvailable()` to check the Redis
server version to be sure that `UNLINK` is available or not
* Use `RedisUtils.isUnlinkAvailable()` in the `RedisMessageStore` and
`RedisLockRegistry` when a removal functionality is performed
* Add `AbstractKeyValueMessageStore.doRemoveAll(Collection<Object> ids)`
for optimization
* Implement `doRemoveAll()` in the `RedisMessageStore` and
`GemfireMessageStore`

**Cherry-pick to 5.0.x**
2018-07-25 16:30:03 -04:00
Gary Russell
d61cd790fe Upgrade to Gradle 4.9; fix RotatingServersTests
Stop the flow before examining the stream to avoid `ConcurrentModificationException`.

**cherry-pick to 5.0.x**
2018-07-25 14:01:38 -04:00
Gary Russell
bebde260db INT-4506: Splitter: close stream and Closeables
JIRA: https://jira.spring.io/browse/INT-4506

Capture the actual splitter result in the `FunctionIterator and close it if necessary.

**cherry-pick to 5.0.x**

Add Closeable to proxy in test; remove AutoCloseable check.

Closeable extends AutoCloseable.

Fix javadocs; test for AutoCloseable instead of Closeable

Polishing - PR comments; tighten up API.

A `CloseableIterator` is now an `AutoCloseable` with an overridden
`close()`` (no exception) to avoid lint problem.

* Polishing omissions, code style and `@author`

**Cherry-pick to 5.0.x**
2018-07-25 13:16:48 -04:00
Artem Bilan
0d0605be78 INT-4381: MessageSources refactoring (#2517)
* INT-4381: MessageSources refactoring

JIRA: https://jira.spring.io/browse/INT-4381

* Make all the out-of-the-box `MessageSource` implementations based
on the `AbstractMessageSource`
* Fix `JdbcPollingChannelAdapterIntegrationTests` for sporadic failure
because of `fixed-rate` for the poller

* Fix HeaderEnricherTests race condition

The `errorChannel()` expect an error in the `testErrorChannel` after
`1000` ms, but at the same time the `poller` in configured for the
`3000` ms.

* Increase all the timeouts for replies
* Decrease a `fixed-delay` on the `poller`
* Some other code style polishing for the `HeaderEnricherTests`
2018-07-25 13:01:22 -04:00
Gary Russell
d6c8baf50f INT-4505: Fix package tangle
JIRA: https://jira.spring.io/browse/INT-4505
2018-07-24 16:30:10 -04:00
Oleksii Komlyk
865e2162e5 INT-4503: Fix assertion in HttpMessageHandlerSpec
JIRA: https://jira.spring.io/browse/INT-4503

Custom `ErrorHandler` can't be used if an external `RestTemplate`
is provided

* Replace `isClientSet()`` with ``!isClientSet()`` for `isTrue`
 assertion in `errorHandler` method
* Replace assertion of `restTemplate` `isNull` with assertion
`!isClientSet()` `isTrue` in the `requestFactory()` method
* Add test coverage for the `errorHandler` into the `HttpDslTests`

**Cherry-pick to 5.0.x**
2018-07-24 16:12:39 -04:00
Gary Russell
1a4de86b30 Fix appendix warnings and other minor fixes 2018-07-24 15:56:14 -04:00
Artem Bilan
44b7df94c1 Polishing for the FileWritingMessageHandler
* Fix typos in docs
* Add `om.google.code.findbugs:jsr305` to avoid warnings like
`Cannot find annotation`
2018-07-24 15:50:56 -04:00
Alen Turkovic
9ac0746f19 INT-4502: Add new file callback in FileWritingMH
JIRA: https://jira.spring.io/browse/INT-4502

Documentation
Using a BiConsumer instead of a custom interface

Doc fixes

Calling callback while locked

More requested fixes

Missing `FileWritingMessageHandler.this` on `fileExistsMode`
2018-07-24 15:50:05 -04:00
Artem Bilan
a7ffbde07f Fix WebSocketInChA according latest SF
* The `SimpleBrokerMessageHandler` has been fixed the way it consults
a `session` store for sending reply.
The session can be added to that store only when we send a `CONNECT`
command.
Fix `WebSocketInboundChannelAdapter` to send additional `CONNECT` message
in the `afterSessionStarted()` and when selected `SubProtocolHandler` is
a `StompSubProtocolHandler`
* Add extract check into the `StompIntegrationTests` for events: now
we also get a `SessionConnectedEvent` as well
* Fix typo in the `index-docinfo.xml`
2018-07-24 14:59:39 -04:00
Gary Russell
001b86b641 Upgrade Micrometer to 1.0.6 2018-07-24 12:39:04 -04:00
Jay Bryant
997183bee2 Removed the troublesome backticks
Removed the backticks that were making links not render. Fixed a few typoes, too.

Integrating feedback from Artem

Artem caught some errors that I had made (and that my editor, Atom, had made - grrr). I fixed them.

Thanks, Artem. :)

Removing duplicate content

I caught that duplicate content somehow got added to preface.adoc. I removed one set of it to make that content not be duplicated.

* Fix `jdbc.adoc` typos
2018-07-24 12:24:34 -04:00
Artem Bilan
5c1c82efd7 Fix zookeeper.adoc typos 2018-07-24 12:12:40 -04:00
Gary Russell
b23147b9ef Fix PDF overflows; missing block fences
- Fix most PDF overflows (2 remain)
- Add missing block fences to fix ToC/Headings
2018-07-24 12:10:56 -04:00
Artem Bilan
3ff9645167 Fix FluxMessageChannel for the latest Reactor 2018-07-24 12:08:06 -04:00
Artem Bilan
c6f459c130 INT-4453: Move Twitter module to Extensions
JIRA: https://jira.spring.io/browse/INT-4453

Fix typos and language in docs

Fix more typos and language in docs
2018-07-23 14:14:41 -04:00
Gary Russell
09d6b76748 More doc fixes
Fix Java syntax rendering leak.
2018-07-19 17:00:07 -04:00
Gary Russell
70db967d4f Doc ToC Fixes 2018-07-19 16:48:58 -04:00
Gary Russell
55f69206e3 Gateway void return type docs
* Polishing - PR Comments
2018-07-19 16:03:53 -04:00
Gary Russell
ec106984a2 Fix race condition in test 2018-07-19 10:27:12 -04:00
Artem Bilan
de9f8d7ccd INT-4501: Don't call getBean from BPP.setBFactory
JIRA: https://jira.spring.io/browse/INT-4501

The call to the `IntegrationFlowBeanPostProcessor#setBeanFactory`
happens during BPP creation.
The introduced call to `beanFactory#getBean` triggers a lot of bean
creations.
For those beans not all `BPP`s are applied.

* Obtain a `flowContext` bean in lazy-load manner

**Cherry-pick to 5.0.x**
2018-07-16 19:40:06 -04:00
Artem Bilan
aac4051d68 Remove max-rows from Stored Proc-in-ch-ad Docs
https://stackoverflow.com/questions/51361379/spring-integration-jdbc-what-is-the-replacement-for-the-missing-attribute-max

**Cherry-pick to 5.0.x and 4.3.x**
2018-07-16 11:29:22 -04:00
Steve Singer
0dcbde0642 INT-4500: Fix DefAmqpHeaderMapper correlationId
JIRA https://jira.spring.io/browse/INT-4500

The `correlationId` condition was against a `contentType` by mistake

* Code style polishing, add `@author`
2018-07-12 20:46:15 -04:00
Artem Bilan
e40e2a4238 Fix test entities for @PersistenceConstructor 2018-07-12 17:27:06 -04:00
Artem Bilan
481dec4fa8 Fix MongoDb MessageDocument for latest Spring Data 2018-07-12 17:04:40 -04:00
Artem Bilan
1043b00996 Fix IntComponentSpec for ctx hooks
Since `IntegrationComponentSpec` is a `FactoryBean`, we need to care
about `Aware` and `init` & `destroy` hooks our selves or delegate
them through the `FactoryBean` wrapper

* Implement `InitializingBean` and `DisposableBean` on the
`IntegrationComponentSpec`
* Call the `Aware` hooks from the `IntegrationFlowBeanPostProcessor`

**Cherry-pick to 5.0.x**
2018-07-12 16:11:45 -04:00
Artem Bilan
76877b9440 INT-4499: Add JdbcMetadataStore.setLockHint()
JIRA https://jira.spring.io/browse/INT-4499
Fixes https://github.com/spring-projects/spring-integration/issues/2483

To allow to reconfigure a `SELECT ... FOR UPDATE` for particular RDBMS
vendor, we need an option to specify possible hint for the target data base.

**Cherry-pick to 5.0.x**
2018-07-11 17:52:44 -04:00
Artem Bilan
0d11c7e0ed INT-4490: DefaultLockRepo: no uppercase format
JIRA https://jira.spring.io/browse/INT-4490

The `DefaultLockRepository.prefix` can be configured with the schema name.
And this one can be case-sensitive.

* Change format hint from the `%S` to `%s` to avoid upper-casing.

**Cherry-pick to 5.0.x and 4.3.x**
2018-07-11 17:38:54 -04:00
Sundara Balaji J K
01461720da Add Query Provider for SQL Server
* updated copyright year

* indentation issue fixed

* white space - build issue fixed

* Trailing whitespace - removed

* fixed pull request comments

* Rename `SqlChannelMessageStoreQueryProvider` to `SqlServerChannelMessageStoreQueryProvider`
2018-07-10 10:49:07 -04:00
Gary Russell
753255c30c Fix ThreadAffinityClientConnectionFactory
`isSingleUse()` should return `false` by default - the whole point is
to bind a connection to a thread. The TACCF should have its own flag
not return the delegate's.

Also, the `TcpReceivingChanneladapter` calls `closeConnection(connectionId)`.
This should be a no-op for the TACCF since the proper way to close a connection
is to call `releaseConnection()` on the thread to which the connection is bound.

**cherry-pick to 5.0.x**
2018-07-09 14:37:17 -04:00
Artem Bilan
d4b7cef928 Fix deprecations in MongoDB and WebFlux modules
Related to a663454fad
2018-07-09 14:36:03 -04:00
Artem Bilan
a1f016a94c INT-4498: StreamUtils -> FileCopyUtils
JIRA: https://jira.spring.io/browse/INT-4498

* Use `FileCopyUtils` instead of `StreamUtils` in test-cases when we deal
with `InputStream` s and files resources.
* Fix reflection-based tests with AOP to use an `ArrayList` access
instead of `LinkedList` since an optimization in SF:
6d6aa72e8f

**Cherry-pick to 5.0.x and 4.3.x**
2018-07-09 13:39:56 -04:00
Gary Russell
8eac5b449c INT-4498: SFTP: Close privateKey resource
JIRA: https://jira.spring.io/browse/INT-4498

Use `FileCopyUtils` instead of `StreamUtils`.

**cherry-pick to 5.0.x, 4.3.x**
2018-07-09 12:26:37 -04:00
Artem Bilan
9a7ae3dfad Polishing some concerns and warnings 2018-07-03 14:46:49 -04:00
Jay Bryant
f3bf2a68d6 Full editing pass for the Reference Guide
I went through all the Asciidoc files to correct spelling, grammar,
punctuation, and usage. Wherever possible, I also made it more clear and more concise.
I also added links wherever they were reasonable.

Accommodating changes that came while I was editing

Various folks made changes (one of which I recommended) to the documents
while I spent a month editing.
I had to edit that new and changed content as well, so I need this second commit.

Accommodating Artem's requested changes for `aggregator.adoc`

Artem reviewed `aggregator.adoc` as a starting point, so that
he could get some questions answered.
I have made the changes he requested (and answered his questions on Github).
2018-07-03 14:11:02 -04:00
Gary Russell
11d39b7da1 INT-4496: (S)FTP: Sort file list earlier
JIRA: https://jira.spring.io/browse/INT-4496

Sort the file list before applying `maxFetchSize` and filters.

* Polishing - PR Comments
2018-07-02 16:49:23 -04:00