Commit Graph

8023 Commits

Author SHA1 Message Date
Artem Bilan
057c004e6c INT-3619: Prevent scanner Options Overrides
JIRA: https://jira.spring.io/browse/INT-3619

Previously the `FileReadingMessageSource` allowed overriding `filter` and `locker` properties
on the `scanner` through its own setters.
It caused confusing and unexpected behavior.

Provide refactoring to check that provided `filter` and `locker` are applied for an internal `scanner`
instance, not for the injected one.

PR Comments
2015-08-12 16:59:35 -04:00
Gary Russell
adb0f43aa8 INT-3779: CodecMessageConverter and Docs
JIRA: https://jira.spring.io/browse/INT-3779

Fix timeouts for the `EnableIntegrationTests`: https://build.spring.io/browse/INT-B41-385
2015-08-11 18:21:35 -04:00
Gary Russell
455a146a1f INT-3798: Customizable File in Props MetadataStore
JIRA: https://jira.spring.io/browse/INT-3798

Add `fileName` property.
2015-08-11 17:51:59 -04:00
Gary Russell
e2a10a8d79 TCP: Add Diagnostics 2015-08-11 15:56:23 -04:00
Gary Russell
31b8b37ab4 INT-3741: Add Explicit spring-core Dependency
JIRA: https://jira.spring.io/browse/INT-3741

spring-retry pulls in an old version.
2015-08-11 12:45:44 -04:00
Gary Russell
a70bc06a18 Fix FailoverClientConnectionFactoryTests
Race condition in `ServerSocket`; the `accept` thread is exiting due to the
close, but it still accepted a new message.

All tests need to wait until the server has stopped listening (as well as
waiting for the close to be propagated to the client).
2015-08-11 10:49:26 -04:00
Artem Bilan
e408331e67 INT-3622: (S)FTP: Add MessageSessionCallback
JIRA: https://jira.spring.io/browse/INT-3622

INT-3622: Polishing
2015-08-11 09:33:34 -04:00
Artem Bilan
d89dabe72f INT-3778: STOMP Namespace and Documentation
JIRA: https://jira.spring.io/browse/INT-3778

* Add Namespace support for STOMP adapters
* Document the STOMP module
* Fix race condition in the `AbstractStompSessionManager`
* Add `handleTransportError` to the `StompInboundChannelAdapter` and `StompMessageHandler` to log errors during STOMP interactions
* Fix `StompMessageHandler` to handle `RECEIPT` in case of `RECEIPT` header existence, not the common `autoReceipt` option
which can be disable, but the `RECEIPT` header may be present in the message to send
* Increase logging level for the STOMP tests to trace sporadic failures on the CI Server
* Fix several typos

INT-3778: Doc Polishing
2015-08-11 09:17:05 -04:00
Gary Russell
e82bfdc9a6 INT-3796: More SFTP Refinements
JIRA: https://jira.spring.io/browse/INT-3796

When a `UserInfo` is provided, use it for the password and passphrase.
Disallow local properies when a `UserInfo` is provided.

Simple polishing and fixing `TestSftpServer` for the `this.server.stop(true);`
to avoid `port is already in use` for other tests which use default SSH port.
2015-08-10 16:12:45 -04:00
Artem Bilan
56bfe6b0ac INT-3790: Fix Parser for ROLE attribute usage
JIRA: https://jira.spring.io/browse/INT-3790
2015-08-10 11:49:36 -04:00
Gary Russell
f73898ba8b INT-3736: Doc Polishing 2015-08-09 09:36:22 -04:00
Gary Russell
c695129bd5 INT-3736: Process Barrier Component
JIRA: https://jira.spring.io/browse/INT-3736

INT-3736: Polishing

INT-3736: Use o-c-a For Release

Avoids unusual parser logic, allows release channel to be of any type.

INT-3736: Schema Polishing

INT-3736: Polishing

- Add TriggerMessageHandler interface
- Use SyncQueue - suspend the trigger thread if the main thread hasn't arrived yet
 - allows clean up of state regardless of whether just a trigger or suspend is processed
- reply-required

INT-3736: Polishing and Docs

Polishing code style and fixing typos in docs
2015-08-07 21:03:44 -04:00
Artem Bilan
4266bb53b4 INT-3649: Support for Payload Application Events
JIRA: https://jira.spring.io/browse/INT-3649

Polishing according to the PR comments

Address PR comments
2015-08-07 17:41:32 -04:00
Gary Russell
95a9e0d2dd INT-3796: Configure SFTP Unknown Host Behavior
JIRA: https://jira.spring.io/browse/INT-3796

Previously, the `DefaultSftpSessionFactory` unconditionally accepted keys
from unknown hosts, or when a host key changed.

Permit this behavior to be configured with `allowUnknownHosts` and/or a custom
`UserInfo` properties in the factory.

`allowUknownHosts` is false by default (since 4.2) and true by default in 4.1.x for
backwards compatibility.

INT-3796: Fix Tests

INT-3796: Polishing
2015-08-07 15:50:09 -04:00
Gary Russell
9140e4ac18 INT-3791: Don't Wrap Confirms if Already Message
JIRA: https://jira.spring.io/browse/INT-3791

Do not wrap a publisher confirm if the correlation data is a Messge<?>.
2015-08-07 15:42:48 -04:00
Gary Russell
0ce5f12342 INT-3795: TCP: Combo Failover and Cached CFs
JIRA: https://jira.spring.io/browse/INT-3795

Previously, a `CachingClientConnectionFactory` could wrap `FailoverClientConnectionFactory` instances.

It was not possible to wrap `CachingClientConnectionFactory` instances in a `FailoverClientConnectionFactory`.

The failover logic only failed over when an `IOException` occurred, whereas the CCCF wrapped the IOException
in a `MessagingException`.

- Catch all exceptions in the failover logic
- Add real TCP test cases for both scenarios
 - test failover when a connection is closed
 - test failover when the first factory cannot connect at all

INT-3795: Polishing - Fix Test Race

Revert `.travis.yml` changes
2015-08-05 20:33:05 -04:00
Artem Bilan
2376a558a4 Mark MessageGroupQueueTests as LONG_RUNNING_TEST
https://build.spring.io/browse/INT-B41-JOB1-370
2015-08-05 16:16:17 -04:00
Artem Bilan
0f689558ab INT-3792: Fix Some SONAR Vulnerabilities
JIRA: https://jira.spring.io/browse/INT-3792

* Remove `Serializable` requirement for `ThreadStatePropagationChannelInterceptor` generic type
* Increase `PriorityChannelTests` timeout
2015-08-05 14:20:08 -04:00
Gary Russell
7f504efa1b INT-3794: SocketUtils - Bind to Loopback Adapter
JIRA: https://jira.spring.io/browse/INT-3794

On OSX, if a server socket is in use on the loopback adapter, but not on others,
a BindException is not thrown; instead the socket is bound to other adapters.

This causes test failures because tests, generally, expect the socket to be bound to localhost.

Change SocketUtils to attempt to bind to localhost.

Polishing
2015-08-05 12:52:19 -04:00
Gary Russell
57e2fcfbca INT-3793: Fix Namespace Inconsistency
JIRA: https://jira.spring.io/browse/INT-3793

Also fix several typos in the TCP/IP chapter
2015-08-05 11:21:58 -04:00
Gary Russell
8273edd0ea INT-3779: Codec Support Part I - Transformers
JIRA: https://jira.spring.io/browse/INT-3779

MessageConverters and Docs to follow.
2015-08-04 12:42:20 -04:00
Artem Bilan
09fb4f78c9 INT-2166: Add SecurityContext Propagation
JIRA: https://jira.spring.io/browse/INT-2166

* Introduce `ThreadStatePropagationChannelInterceptor` based on the `ExecutorChannelInterceptor`
* Add `SecurityContextPropagationChannelInterceptor`,`SecurityContextCleanupChannelInterceptor`
* Introduce `AbstractExecutorChannel` to utilize `ExecutorChannelInterceptor` logic
* Introduce `MessageHandlingTaskDecorator` to avoid package tangle from `dispatcher` and `channel`
* Introduce `SecurityContextCleanupAdvice` for those cases when we don't get deal with `MessageChannel`s already, but want to have proper way to cleanup `SecurityContext`
* Make `GlobalChannelInterceptorProcessor` as `SmartInitializingSingleton` to avoid `phase` conflicts.
* Fix `MessagingAnnotationPostProcessor` to use `beanFactory.initializeBean(endpoint, endpointBeanName);` instead of manual `start()` invocation bypassing the `phase` logic, hence having a bug, when endpoints have been started very early
* Optimise `AbstractPollableChannel` to use `size` field from `ChannelInterceptorList` instead of `size()` from `Collection<?>`
* Fix `AnnotatedEndpointActivationTests` extracting separate component for annotation configuration instead of using test class directly. This caused very late Messaging Annotations process on that class
* Fix typo in the `spring-integration-jdbc-4.2.xsd`
* Remove some `SOUT`s throughout the project

TODO Docs

PR Comments:

* Remove redundant `AbstractExecutorChannel#executorInterceptors` and make logic based on the `super.interceptors`
 * Fix wrong imports order
 * JavaDocs for `ThreadStatePropagationChannelInterceptor`
 * Docs for `SecurityContext` propagation

INT-3593: Fix FTP PartialSuccess Tests

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

Sort the files for the MPUT tests.

INT-2166: Add SecurityContext Propagation

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

* Introduce `ThreadStatePropagationChannelInterceptor` based on the `ExecutorChannelInterceptor`
* Add `SecurityContextPropagationChannelInterceptor`,`SecurityContextCleanupChannelInterceptor`
* Introduce `AbstractExecutorChannel` to utilize `ExecutorChannelInterceptor` logic
* Introduce `MessageHandlingTaskDecorator` to avoid package tangle from `dispatcher` and `channel`
* Introduce `SecurityContextCleanupAdvice` for those cases when we don't get deal with `MessageChannel`s already, but want to have proper way to cleanup `SecurityContext`
* Make `GlobalChannelInterceptorProcessor` as `SmartInitializingSingleton` to avoid `phase` conflicts.
* Fix `MessagingAnnotationPostProcessor` to use `beanFactory.initializeBean(endpoint, endpointBeanName);` instead of manual `start()` invocation bypassing the `phase` logic, hence having a bug, when endpoints have been started very early
* Optimise `AbstractPollableChannel` to use `size` field from `ChannelInterceptorList` instead of `size()` from `Collection<?>`
* Fix `AnnotatedEndpointActivationTests` extracting separate component for annotation configuration instead of using test class directly. This caused very late Messaging Annotations process on that class
* Fix typo in the `spring-integration-jdbc-4.2.xsd`
* Remove some `SOUT`s throughout the project

TODO Docs

PR Comments:

* Remove redundant `AbstractExecutorChannel#executorInterceptors` and make logic based on the `super.interceptors`
 * Fix wrong imports order
 * JavaDocs for `ThreadStatePropagationChannelInterceptor`
 * Docs for `SecurityContext` propagation

Doc Polishing

Address PR comments

Address PR comments

* Extract `ExecutorChannelInterceptor` logic in the `PollingConsumer`
to have an ability to invoke `afterMessageHandled()` on the TaskScheduler's Thread
for example for the `SecurityContext` clean up
* Get rid of all that redundant "clean up" stuff
* Docs polishing

Fix `NPE` in the `PollingConsumer`

Introduce `ExecutorChannelInterceptorAware` to avoid iterators on each message

Polishing; Docs, Sonar
2015-08-03 09:33:23 -04:00
Gary Russell
fd35d43aba INT-3784: Use acknowledge="transacted" by Default
JIRA: https://jira.spring.io/browse/INT-3784

Also

- suppress WARN log when priority mapping fails
- rework extract payload tests to use a single context

Make a new `JmsMessageDrivenEndpoint` as `private` because it makes sense only for XML `BeanDefinition` variant.
2015-07-31 17:41:31 -04:00
Artem Bilan
4cca684f36 INT-3789: Upgrade to SF 4.2 and other fixes
JIRA: https://jira.spring.io/browse/INT-3789

* Hazelcast -> `3.5.1`
* ActiveMq -> `5.11.1`
* Boon -> `0.33`
* Spring Security -> `4.0.2`
* Kryo -> `3.0.3`
* Fix missed polishing for the `Log4jLevelAdjuster` according required generics:
https://build.spring.io/browse/INT-MJATS41-348
* Fix `ImapIdelIntegrationTests` sporadic failure
* Fix `Kryo` Codec stuff according to the changes in the latest Kryo version
2015-07-31 13:19:28 -04:00
David Turanski
88be3dd325 INT-3776: Add Codec support
JIRA: https://jira.spring.io/browse/INT-3776

revert LoggingHandlerTests

Added byte[] serialize(Object obj)

Clean up java doc and some minor name changes

added null checks

Cleanup and rename methods to encode/decode

remove SerializationFaileException

clean up

Polishing
2015-07-30 18:02:33 -04:00
Gary Russell
0fd7b2568a INT-3782: Fix PDF Formatting
JIRA; https://jira.spring.io/browse/INT-3782

- downsize some images to fit in PDF margins
- reduce some long FQ Class names
- fix some tables
- add some missing links
2015-07-30 16:27:40 -04:00
Artem Bilan
ec12b289c2 INT-3786: Fix Several Sporadic Test Failures
JIRA: https://jira.spring.io/browse/INT-3786

* Increase `receiveTimeout` for several `QueueChannel` and `CountDownLatch` based tests
* Fix `FileSplitterTests` for Windows compatibility - `UTF-8` for bytes conversion
* Make some STOMP tests as `LongRunning`

The next fixing phase
2015-07-30 15:28:02 -04:00
Gary Russell
3c9b0e4e82 INT-3788: Fix Poller Doc (Memory Leak)
JIRA: https://jira.spring.io/browse/INT-3788
2015-07-30 12:46:44 -04:00
Gary Russell
448f9a52d2 Debugging for TCP FailOver Tests
Add LogLevelAdjuster; enable TRACE debugging for this test class.
2015-07-30 12:44:41 -04:00
Gary Russell
13b4facc7a INT-3491: (S)FTP Delegation Session Factory
JIRA: https://jira.spring.io/browse/INT-3491

Select the session factory at runtime.

Polishing; PR Comments

Also add/remove factories.
2015-07-30 12:39:55 -04:00
Gary Russell
b073688529 INT-3780: Revert JaCoCo Version
JIRA: https://jira.spring.io/browse/INT-3780

The new version is not compatible with our Sonar servers.
2015-07-29 10:43:00 -04:00
Gary Russell
e085a03c0b INT-3401: Fix StoredProc Tests (Guava Optional)
JIRA: https://jira.spring.io/browse/INT-3401
2015-07-28 16:59:23 -04:00
Artem Bilan
a98c45f2d7 INT-3783: Make JPA module compatible with IO
JIRA: https://jira.spring.io/browse/INT-3783

* Since IO doesn't have `hibernate-jpa-2.1-api` dependency and we need it only for testing,
hence move it to the `testRuntime`.
* Revert `org.eclipse.persistence:javax.persistence` and make it as `optional`, since it is end-user
responsibility to choose JPA implementation.
* Resolve deprecations since the latest Spring Framework changes.
* Increase `FeedInboundChannelAdapterParserTests` timeouts: https://build.spring.io/browse/INT-B41-353
2015-07-28 16:54:18 -04:00
Gary Russell
d6aa9f8334 INT-3785: Update to Spring Data Fowler SR2
JIRA: https://jira.spring.io/browse/INT-3785
2015-07-28 16:40:28 -04:00
Artem Bilan
32e23d1642 INT-3401: Make Google Guava an Optional Dep
JIRA: https://jira.spring.io/browse/INT-3401

Add Google Guava CLASSPATH check for the `StoredProcExecutor`
and use `ConcurrentHashMap` as an alternative to the Guava's `Cache`,
when Guava isn't presented in the CLASSPATH

Addressing PR comments

PR Comments

PR Comments:

Introduce an internal static `StoredProcExecutor.GuavaCacheWrapper` class
to avoid the eager class loading for the `CacheLoader` anonymous class
2015-07-27 09:38:03 -04:00
Gary Russell
9944e54ce5 INT-3781: Configure HTTP GW Timeout Status Code
JIRA: https://jira.spring.io/browse/INT-3781

- Add mechanisms to set status code on an inbound gateway timeout.
- Send a message to the error channel if configured.

Polishing - Add failedMessage to MTE

Fix Schema Docs; Timeout Detection on Error Flow

Add Zookeeper Leadership Logs

Fix typo in the `SmartLifecycleRoleController`
2015-07-24 18:37:26 -04:00
Artem Bilan
178c86faa4 INT-3683: Fix typo in schema.sql.vpp
JIRA: https://jira.spring.io/browse/INT-3683

* In addition fix `inputs` for the Gradle `generateSql` task and regenerate all SQLs
to apply the typo fix.
The previous way to generate sql scripts doesn't work properly. It is always as `UP-TO-DATE`.
Adding `inputs` to the `generateSql` show the correct behaviour.
From other side that makes `cleanSql` task as redundant.
* Applying the Travis config fix to this commit as well.

Fix HTTP test timeout

https://build.spring.io/browse/INT-B41-346

Fix `ProducerAndConsumerAutoStartupTests`

https://build.spring.io/browse/INT-B41-346

Fix `DelayerUsageTests` `time` bean scope bug

https://build.spring.io/browse/INT-B41-347

Fix `HttpInboundGatewayParserTests.java` generics Java < 8 compiler warnings

Increase Tomcat response timeout for WebSocket tests

https://build.spring.io/browse/INT-B41-349

Increase timeout in the `AsyncMessagingTemplateTests#executionException()`

Fix `ClassCastException` for the `StandardWebSocketClient#userProperties`

Increase Delay to 2 Seconds in DelayHandlerTests
2015-07-24 16:10:05 -04:00
Gary Russell
b69c0c2d24 INT-3780: Update to Gradle 2.5
JIRA: https://jira.spring.io/browse/INT-3780

- Move `s-i-test` to top of file to avoid deprecation warning

- Change `jacoco` to use the Gradle plugin

- Enable generation of `jacoco` coverage html report

- Hibernate tests need `javax.persistence` `2.1` eclipselink pulls in `2.0`;
works ok with gradle 2.3, but with 2.5 the 2.0 versions are loaded.

- replace `jpaApiVersion` build variable with the `jpa21ApiVersion`
2015-07-23 19:02:16 -04:00
Gary Russell
75a7b63350 Experimental: Support Gradle --parallel
This should be treated as experimental but with these changes it seems to build ok.

BUILD SUCCESSFUL

Total time: 5 mins 15.533 secs

It turns out that our sporadic Redis problems were fixed in a later version of Jedis.

The problem was that the `connection.subscribe()` exited immediately. When I started adding debug
logic, the problem went away (because I was using a newer versio of Jedis).

spring-data-redis 1.5.2 is updated to work with the 2.7.3 version of Jedis.

Polishing
2015-07-23 12:23:25 -04:00
Artem Bilan
b57018b78b INT-3611: Support WebSocketHandlerDecoratorFactory
JIRA: https://jira.spring.io/browse/INT-3611
2015-07-23 10:45:06 -04:00
Artem Bilan
cd582926e1 INT-3765: Fix BeanFactory usage from BPP
JIRA: https://jira.spring.io/browse/INT-3765

The `beanFactory.getBeanNamesForType(Class<?> aClass)`
has eager `FactoryBean` loading logic and using it from the `BeanPostProcessor`
may cause an issue with late-binding beans like auto-created `MessageChannel`.

The change that code to the
```
beanFactory.getBeanNamesForType(IntegrationMBeanExporter.class, false, false)
```
to bypass `FactoryBean`s eager initialization.

All other similar usage throughout the project are OK, because they are already outside of any `BPP`

**Cherry-pick to 4.1.x and 4.0.x**
2015-07-22 09:21:43 -04:00
Gary Russell
e9117bd7f2 Use Docker on Travis
http://docs.travis-ci.com/user/migrating-from-legacy/?utm_source=legacy-notice&utm_medium=banner&utm_campaign=legacy-upgrade
2015-07-22 09:20:12 -04:00
Artem Bilan
1a5a944af0 INT-3767: Fix JPA Parser for parameter-source
JIRA: https://jira.spring.io/browse/INT-3767

The `JpaInboundChannelAdapterParser` has missed to parse `parameter-source`,
as well as the parser test-case has been missed.

In addition fix JPA xsd for wrong type references.
2015-07-22 09:12:10 -04:00
Mauro Molinari
943057e9d9 INT-3777: Update Preface Compatibility Info
JIRA: https://jira.spring.io/browse/INT-3777

INT-3777: Reference guide still mentions SI 4.1.x version in the
Requirements paragraph

* fix Spring Integration references to version 4.2.x of the library in
the Requirements paragraph
* increase the Spring Framework minimum requirement to 4.2.0 as declared
in build.gradle
* add a space between the Spring library names and versions to improve
readability
2015-07-20 18:34:36 -04:00
Gary Russell
22ee6586a0 INT-3593: Fix FTP PartialSuccess Tests
JIRA: https://jira.spring.io/browse/INT-3593

Sort the files for the MPUT tests.
2015-07-20 13:28:20 -04:00
Mauro Molinari
f99183afca INT-2466: Propagate SOAP action from inbound
JIRA: https://jira.spring.io/browse/INT-2466

Current reference documentation says that: "If the incoming web service
message is a SOAP message the SOAP Action header will be added to the
headers of the Message that is forwarded onto the request channel."
However, `DefaultSoapHeaderMapper` was actually missing to do that.

Polishing
2015-07-20 12:24:04 -04:00
Gary Russell
a8f47ee343 INT-3587: JMS OG - Lazy Reply Container Init.
JIRA: https://jira.spring.io/browse/INT-3587

Start the reply container on demand; stop after a timeout.

INT-3587: Polishing; PR Comments
2015-07-20 12:16:21 -04:00
Gary Russell
9e0b2fb319 INT-3593: (S)FTP OG Partial Updates (mget/mput)
JIRA: https://jira.spring.io/browse/INT-3593

Throw a `PartialSuccessException` if an exception occurs after partial success (some files transferred).
2015-07-20 12:10:33 -04:00
Gary Russell
0dc43404a9 INT-3774: Update Groovy to 2.4.4
JIRA: https://jira.spring.io/browse/INT-3774
2015-07-17 16:49:28 -04:00
Gary Russell
00540cb5df INT-3229: Fix WatchService Test
JIRA: https://jira.spring.io/browse/INT-3229
2015-07-16 15:09:59 -04:00