Commit Graph

7448 Commits

Author SHA1 Message Date
Spring Buildmaster
b72ca0e51e [artifactory-release] Next development version 2014-07-08 13:05:41 -07:00
Spring Buildmaster
7febc46360 [artifactory-release] Release version 3.0.4.RELEASE 2014-07-08 13:05:35 -07:00
Gary Russell
539f9e89f0 INT-3453 NIO Always Release Assembler Thread
Fixed hung assembler described in INT-3453.

Used CountDownLatch instead of sleep()

INT-3453 Add Test Case

Currently failing for me - assembler thread stuck on CDL.

Remove redundant `if (TcpNioConnection.this.writingLatch != null)` from `ChannelInputStream#write`

Conflicts:
	spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpNioConnectionTests.java
2014-06-27 18:47:52 +03:00
Gary Russell
ec4c4b03b1 INT-3433 Delay Failed IOs
JIRA: https://jira.spring.io/browse/INT-3433`

If a read fails due to insufficient threads, delay the read
for (default 100ms) - do not re-enable OP_READ until that
time has elapsed. Avoids spinning the CPU.

INT-3433 More Polishing

If the assembler couldn't execute a new assembler after assembling
the current message (when it detected there is more data), in the
finally block it would "continue" only if the socket was still
open.

The test case closes the socket after sending 4 messages so when
this condition occurred, the assembler failed to continue and
data was left in the buffer.

Remove the `isOpen()` check in the finally block and always continue
if there's not another assembler running and there's data available.

INT-3433 More Polishing

We can still get starvation if the selector is in a long
wait (in select()) when a read is delayed.

Whenever a read is delayed, wake the selector so its next
select will use the readDelay timeout.

INT-3433 Reference Docs

Also remove Thread.yield().

Revert redundant boolean return from `TcpNioConnection#checkForAssembler()`

Conflicts:
	spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/AbstractConnectionFactory.java
	spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioConnection.java
2014-06-23 11:34:55 +03:00
JohnA2
eafbe9b6e3 INT-3433 NIO Thread Starvation with Fixed Pool
JIRA: https://jira.spring.io/browse/INT-3433

INT-3433 added the test-case

Conflicts:
	spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioConnection.java
2014-06-23 11:25:13 +03:00
Spring Buildmaster
973e677fc2 [artifactory-release] Next development version 2014-06-02 14:03:56 -07:00
Spring Buildmaster
fd1bd5d272 [artifactory-release] Release version 3.0.3.RELEASE 2014-06-02 14:03:44 -07:00
Gary Russell
e590838571 INT-3423 Fix Expression-Based Splitter
JIRA: https://jira.spring.io/browse/INT-3423

Consider a message containing "one one" and a splitter
with expression "payload.split(' ')", only one message
is emitted.

The default Collection created by SpEL is a HashSet.

Change the ExpressionEvaluatingSplitter to expect a
List instead of a Collection.

Conflicts:
	spring-integration-core/src/test/java/org/springframework/integration/splitter/SpelSplitterIntegrationTests.java
2014-05-29 20:05:15 +03:00
Gary Russell
19443d6817 INT-3410 TCP NIO Deadlock with Bound TE
JIRA: https://jira.spring.io/browse/INT-3410

When running a fixed thread pool with a bound queue,
and CALLER_RUNS execution rejection policy, it
was possible to deadlock the IO selector thread.

Add a `CompositeExecutor` to use different threads for
IO to those used for message assembly.

Add a `CallerBlocksPolicy` to block the invoking thread
(for a specified time) if the pool is exhausted.

Add documentation.

Polishing
2014-05-20 17:42:45 +03:00
Artem Bilan
c49d8f4af7 INT-3407: Fix TX-sync-processor potential NPE
JIRA: https://jira.spring.io/browse/INT-3407

Conflicts:

	spring-integration-core/src/main/java/org/springframework/integration/transaction/ExpressionEvaluatingTransactionSynchronizationProcessor.java
	spring-integration-core/src/test/java/org/springframework/integration/endpoint/PseudoTransactionalMessageSourceTests.java

Resolved.

	Fixed imports and reference to MessageBuilderFactory.
2014-05-16 11:26:03 -04:00
Stevo Slavic
a2ea88beb6 Update preface docs for Java 8 compatibility
Reference docs in preface mention Spring Integration compatibility with
Java 8, once it's released. Since Java 8 is released, the extra note is
no longer relevant and should be removed.

This patch removes no longer relevant note of pending Java 8 release.

JIRA: https://jira.spring.io/browse/INT-3400
2014-05-07 09:36:15 -04:00
Artem Bilan
b63085c52f INT-3368: SyslogToMapTrans: Make TAG Optional
JIRA: https://jira.spring.io/browse/INT-3368

INT-3368: PR comments
2014-04-11 14:00:44 -04:00
Gary Russell
ab8e193b01 INT-3355 Improve Redis Tests
JIRA: https://jira.spring.io/browse/INT-3355

Previously, the RedisAvailableTests unconditionally
flushed Redis; this is not appropriate and could affect
other builds on the CI server (as well as wiping out the
developer's Redis DB).

Change the tests to clean up their own redis data.

Conflicts:

	spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisStoreInboundChannelAdapterIntegrationTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisStoreOutboundChannelAdapterIntegrationTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/rules/RedisAvailableTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageGroupStoreTests.java
	spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageStoreTests.java

Resolved.
2014-04-08 19:42:01 +03:00
Spring Buildmaster
3a186b871a [artifactory-release] Next development version 2014-03-31 13:16:55 -07:00
Spring Buildmaster
0ca790dd9d [artifactory-release] Release version 3.0.2.RELEASE 2014-03-31 13:16:48 -07:00
Gary Russell
a4a8abd6a9 INT-3347 Update Spring Framework Version to 3.2.8
JIRA: https://jira.spring.io/browse/INT-3347
2014-03-31 15:30:40 -04:00
Artem Bilan
5696efc274 INT-3346: Add @Id to CMDbMS.MessageDocument
JIRA: https://jira.spring.io/browse/INT-3346

An `@Id` field is required when MongoDB auditing
is enabled in the ApplicationContext.

This change does not make the document Auditable,
it just prevents an exception being thrown when
auditing is enabled.
2014-03-28 11:10:48 -04:00
Gary Russell
04367659b4 INT-3342 Allow Custom TypeLocator for SpEL
JIRA: https://jira.spring.io/browse/INT-3342

Allow customization of the `TypeLocator` used by SpEL
`EvaluationContext`s throughout the framework.
2014-03-27 10:39:32 +02:00
Gary Russell
305472043f INT-3343 Bump JSch Version to 0.1.51
JIRA: https://jira.spring.io/browse/INT-3343
2014-03-26 14:20:03 -04:00
Gary Russell
466fa2bc5c Fix Typo in DEBUG Message
Also add another control-bus test.

Conflicts:

	spring-integration-core/src/test/java/org/springframework/integration/config/xml/ControlBusTests.java

Resolved.
2014-03-14 15:32:53 -04:00
Gary Russell
225e315e20 INT-3316 BeanFactoryTypeConverter Concurrency
JIRA: https://jira.spring.io/browse/INT-3316

The `SimpleTypeConverter` delegate uses property editors
which are not thread safe. We protect against concurrent
access when the source is not a String, but when a String,
we delegate to the `STC`.

Synchronize access to the `STC.convertIfNecessary()` method.
2014-03-10 20:46:06 +02:00
Gary Russell
8933d7ff4e INT-3305 SFTP Connect Error Polishing
* Add code to test to wait for server to start
* Avoid NPE when trying to close a Sesion that was never open
2014-03-07 15:50:39 -05:00
Artem Bilan
ee73515047 INT-3313: Fix JMS-outbound requires-reply Logic
JIRA: https://jira.springsource.org/browse/INT-3313

Previously, when `requires-reply="false"` on a `<jms:outbound-gateway/>`
a `null` reply caused a `MessageTimeoutException`, instead of quiet ending of flow.

Conflicts:

	spring-integration-jms/src/test/java/org/springframework/integration/jms/JmsOutboundInsideChainTests.java

Resolved.
2014-03-05 17:09:18 -05:00
Gary Russell
1de46a8bdd INT-3305 Fix SFTP Test Case
JIRA: https://jira.springsource.org/browse/INT-3305
2014-03-05 10:23:41 -05:00
Gary Russell
a6edf85f33 INT-3305 SFTP Close Session on Error
JIRA: https://jira.springsource.org/browse/INT-3305

Previously, if the channel can't be connected (e.g. if the server
does not support SFTP), the connection to the server remained open.

Close the session in the event of a failure.

Add test with the Apache SSHD server.
2014-03-05 16:28:13 +02:00
Gary Russell
00c0533004 INT-3298 WARN if RSFB Falls Back to SeqSizeRS
JIRA: https://jira.springsource.org/browse/INT-3298

Emit a WARN log whenever the `ReleaseStrategyFactoryBean`
falls back to using the `SequenceSizeReleaseStrategy`.

This will happen if no method name is provided and no
annotated method is found, or a null reference is provided.
2014-03-05 11:07:16 +02:00
Gary Russell
29bd9e981f INT-3310 Fix Syslog Error on Socket Close
https://jira.springsource.org/browse/INT-3310

Previously, the syslog adapter tried to convert the ErrorMessage
that results from a socket error to a syslog packet, resulting
in a stack trace on stderr.

Test for the ErrorMessage and log at DEBUG.
2014-02-25 11:08:47 +02:00
Artem Bilan
181b1b9c5f INT-3300: Fix MS ref Regression for i-c-adapter
JIRA: https://jira.springsource.org/browse/INT-3300

The change introduced by https://jira.springsource.org/browse/INT-3147
(Registration of `MessageSource<?>` as a bean with suffix `.source`) broke
the case where `MessageSource<?>` is a reference to an existing bean.

Add check to the `AbstractPollingInboundChannelAdapterParser` for the type
of `source` and apply the appropriate logic.

Conflicts:

	spring-integration-core/src/test/java/org/springframework/integration/config/ChannelAdapterParserTests.java

Resolved.
2014-02-21 18:20:29 -05:00
Gavin Gray
1eb501d272 INT-3290 Fix TCP Deserializer for 0 Length Message
ByteArraySingleTerminatorSerializer does not support multiple
subsequent terminators (zero length messages).

JIRA: https://jira.springsource.org/browse/INT-3290

* Add unit test to verify bug.
* Fix bug.

Polishing:

* Remove test for `n >= 0`; n cannot be < 0 here
* Move test case to `DeserializationTests`
2014-02-07 13:32:35 -05:00
Artem Bilan
0087103488 INT-3285: Fix AMQP JsonHeaders Regression
JIRA: https://jira.springsource.org/browse/INT-3285

Spring Integration 3.0 introduced the `JsonHeaders` and populates them
from a request AMQP Message to the SI Message. In the case of the `AmqpInboundGateway` and
`JsonMessageConverter`, if the SI flow doesn't do anything with `JsonHeaders`
they are returned to the `AmqpInboundGateway` for reply Message
and may override correct values provided by `JsonMessageConverter` in the `DefaultAmqpHeaderMapper`.

This fix provides the check for headers from the reply Message's `MessageProperties`
and populates `JsonHeaders` if the `MessageProperties` doesn't contains the `__TypeId__` header already.

Note, it is just a fix for regression to restore previous behavior.
There is maybe a reason to revise (Another JIRA) all standard AMQP headers and populate them from SI `MessageHeaders`
in the `DefaultAmqpHeaderMapper`, only if they haven't been populated by `MessageConverter` before.

**Cherry-pick to 3.0.x**

Conflicts:

	spring-integration-amqp/src/test/java/org/springframework/integration/amqp/inbound/InboundEndpointTests.java

Resolved.
2014-02-07 10:43:35 -05:00
Artem Bilan
41808beb29 INT-3279-3.0.x: Fix class tangle
JIRA: https://jira.springsource.org/browse/INT-3279
2014-02-07 10:39:27 -05:00
Spring Buildmaster
42f5d14b92 [artifactory-release] Next development version 2014-01-31 02:06:47 -08:00
Spring Buildmaster
2d9c50b470 [artifactory-release] Release version 3.0.1.RELEASE 2014-01-31 02:06:39 -08:00
Gary Russell
ff90daf575 INT-3280 Fix SFTP Class Tangle
JIRA: https://jira.springsource.org/browse/INT-3280
2014-01-30 11:46:15 +02:00
Artem Bilan
1f45e00cc3 INT-3243: Postpone MVC Handlers Detection
JIRA: https://jira.springsource.org/browse/INT-3243

* Change `IntegrationRequestMappingHandlerMapping` to postpone
Handlers detection as late as possible using `ApplicationListener<ContextRefreshedEvent>`.
This is needed, because `RequestMappingInfoHandlerMapping#afterPropertiesSet()`
iterates over beans from the `BeanFactory` to detect MVC Handlers. But at the same time
Integration Endpoints require a `requestChannel` as a dependency and those may be postponed
for `auto-creation` by `ChannelInitializer` - late-binding issue.
2014-01-27 13:44:01 -05:00
Artem Bilan
124d8745c4 INT-3274: build.gradle: BUILD-SNAPSHOT condition
JIRA: https://jira.springsource.org/browse/INT-3274

* Add condition on `springVersion` to check `BUILD-SNAPSHOT` release category on version
and enable `libs-snapshot` repository

To allow CI plan to build with SF snapshots it's just enough to configure the Gradle option
`-PspringVersion=3.2.7.BUILD-SNAPSHOT`
2014-01-23 15:56:18 -05:00
Gary Russell
d1dfecdd1e INT-3237 Add 2014 Copyright; Fix What's New
JIRA: https://jira.springsource.org/browse/INT-3237
2014-01-21 12:16:06 -05:00
Artem Bilan
451ccb0e22 INT-3244 Fix RedisMEssageStoreTest Race Condition
JIRA: https://jira.springsource.org/browse/INT-3244

Conflicts:

	spring-integration-redis/src/test/java/org/springframework/integration/redis/store/RedisMessageGroupStoreTests.java

Resolved.
2014-01-21 09:55:58 -05:00
Gary Russell
01b51854d0 INT-3266 Java 6 Compiler Compatibility
- ((CachingSessionFactory<?>.CachedSession) session).dirty();
+ ((CachingSessionFactory.CachedSession) session).dirty();

Failed to compile with Java6 (compiles ok with Java7 with
sourceCompatibility=1.6).
2014-01-21 09:38:52 -05:00
Gary Russell
da4ec8f659 INT-3266 (S)FTP Close Dirty Cached Sessions
If an exception occurs on a session it should be physically closed
and not reused because its state is indeterminate and the next
operation might fail.

Note: The booleans within CachedSession do not need to be volatile
because it is a short-lived object only used by the current thread.

Also fixes the assertion message in RFT.get().

JIRA: https://jira.springsource.org/browse/INT-3266

INT-3266 Polishing - PR Comments

Remove need for SuppressWarnings.
Fix 2 test cases where the exception has an additional cause.

Fix invalid `GenericMessage` import
Fix `e.getCause()` in `FtpServerOutboundTests` & `SftpServerOutboundTests` tests
2014-01-21 11:58:46 +02:00
Gary Russell
6df2e5b026 INT-3265 Stored Proc Debug Logging
Set up stored procedure name in `SimpleJdbcCall` before setting
up row mappers; previously the debug logg showed `[null]` for
the procedure name.

JIRA: https://jira.springsource.org/browse/INT-3265
2014-01-17 14:54:54 +02:00
Artem Bilan
2fb0707465 INT-3258: Reduce #xpath Missing Log Entries
JIRA: https://jira.springsource.org/browse/INT-3258
2014-01-09 15:13:31 -05:00
Artem Bilan
d4ade73cfb INT-3257 Make AggXmlMValidationEx more convenient
JIRA: https://jira.springsource.org/browse/INT-3257

Conflicts:

	spring-integration-xml/src/test/java/org/springframework/integration/xml/config/XmlPayloadValidatingFilterParserTests.java

Resolved.
2014-01-07 09:41:51 -05:00
Gary Russell
28832d2cd6 INT-3252 Fix AlternativeJdkIdGenerator
JIRA: https://jira.springsource.org/browse/INT-3252

Remove the use of `SecureRandom.generateSeed()` which is not
supported on some platforms.

Note: While this change does not reflect the custom IBM
code noted in the JIRA issue, it does revert the initial
SecureRandom generation to use the same code as
UUID.randomUUID(), so the expectation is that this will
work fine on zOS.
2014-01-03 18:01:08 -05:00
Artem Bilan
91f6265344 INT-3240: i-c-a-parser: Fix gen. MessageSource Id
JIRA: https://jira.springsource.org/browse/INT-3240

Spring Integration 3.0 introduced registration of `MessageSource`s as beans
with an `id` based on the adapter `id` or, as a fallback, generated from
the `MessageSource` class name and the suffix `.source`.
But since that bean wasn't registered as a bean with the generated name (because the suffix was added),
subsequent elements get the same source bean name. This meant that
several anonymous `inbound-channel-adapter` with the same type (`file:`, `ftp:`, `twitter:` etc.)
caused an issue, when the same `MessageSource` bean was used by several `SourcePollingChannelAdapter` beans.

Fix the issue for fallback name generation by using the `SourcePollingChannelAdapterFactoryBean` class name.
Since that is registered, the source will always get a unique name, regardless of whether an id is provided.
2014-01-02 14:14:15 -05:00
Gary Russell
b0c70ab519 INT-3248 Suppress HeaderChannelRegistry Warning
Remove warning from BFCR if there is no HeaderChannelRegistry in
the bean factory. Change the log to DEBUG and remove the stack
trace.

Instead, update the Exception message when a channel name can't be
resolved to a channel to indicate that there is no registry.

JIRA: https://jira.springsource.org/browse/INT-3248
2013-12-21 19:31:38 +02:00
Spring Buildmaster
5ed110c2a0 [artifactory-release] Next development version 2013-12-15 15:15:04 -05:00
Spring Buildmaster
6573a68d6c [artifactory-release] Release version 3.0.0.RELEASE 2013-12-15 11:49:37 -08:00
Piotr Dyraga
484a4fac29 INT-2525 Add Connection as an HTTP Response Header
JIRA: https://jira.springsource.org/browse/INT-2525

INT-2525: Add test for 'Connection' header
2013-12-15 13:46:18 -05:00
Artem Bilan
7e94a3ecde INT-3149: Cleanup of the What's New
JIRA: https://jira.springsource.org/browse/INT-3149

* Add a note about `GatewayMethodMetadata`
* Squash several sections to one by type
* Reorder by importance/interestingness
* Remove a note about `MessagingException` for `RetryAdvice`,
as the last one doesn't wrap exceptions to `MessagingException` on each retry
2013-12-13 16:25:41 -05:00