Commit Graph

7652 Commits

Author SHA1 Message Date
Gary Russell
26259e4626 INT-3564 Update Javadoc URLs to spring.io
JIRA: https://jira.spring.io/browse/INT-3564
2014-11-21 13:14:53 +02:00
Gary Russell
f73e920696 INT-3565 Inject Advice Chain to Direct Handlers
JIRA: https://jira.spring.io/browse/INT-3565

Cast to `IntegrationObjectSupport` fails if the handler is
already proxied in `AbstractSimpleMessageHandlerFactoryBean`.

Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/config/AbstractSimpleMessageHandlerFactoryBean.java

Resolved.

INT-3565 Polishing

- Fix test.
- enhance test to show that directly bound message handler beans are not advised if already proxied.
2014-11-20 13:40:27 -05:00
Spring Buildmaster
2c7c5bb3b0 [artifactory-release] Next development version 2014-11-11 11:41:08 -08:00
Spring Buildmaster
12ec9b7361 [artifactory-release] Release version 4.0.5.RELEASE 2014-11-11 11:41:02 -08:00
Gary Russell
16a081044c INT-3545: Don't AutoStart HeaderChannelRegistry
JIRA: https://jira.spring.io/browse/INT-3545

Previously, the `DefaultHeaderChannelRegistry` was auto-started.
This caused the reaper to run and eventually start all the
`taskScheduler` threads, even if the registry was not being used.

- Defer the `start()` until the first channel is stored.
- Do not start the reaper if the bean has been explicitly stopped.
- Deprecate the implementation of `SmartLifecycle`.

Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/channel/DefaultHeaderChannelRegistry.java

Resolved.

__cherry-pick to 3.0.x__
2014-11-05 15:19:51 -05:00
Artem Bilan
39a1c3ce30 INT-3543: Remove context.close() from tests
JIRA: https://jira.spring.io/browse/INT-3543

Quoting Sam Brannen:

> However, one should *never* programmatically close the injected application context in a test,
since the Spring TestContext Framework caches all contexts across the entire JVM process.
If you need to close a context after a test method or test class for some reason,
the only supported and reliable mechanism is `@DirtiesContext`.

**Cherry-pick to 4.0.x**
2014-11-03 08:45:58 -05:00
Artem Bilan
c588288c49 INT-3539: Fix ChannelSecurityInterceptorBPP
JIRA: https://jira.spring.io/browse/INT-3539

Previously the `ChannelSecurityInterceptorBeanPostProcessor` eagerly loaded all beans from its `afterPropertiesSet`
to retrieve the `ChannelSecurityInterceptor`s. According to the `BeanPostProcessor` nature the `afterPropertiesSet` hook isn't legitimate.
It may cause some bad side-effects for other beans, which might not been initialized yet.

Rework `ChannelSecurityInterceptorBeanPostProcessor` to accept `Collection<ChannelSecurityInterceptor>` in the ctor.
Rework `SecurityIntegrationConfigurationInitializer` to iterate over `BeanDefinition`s to determine those of them, which
are `ChannelSecurityInterceptor` or `ChannelSecurityInterceptorFactoryBean`.

**Cherry-pick to 4.0.x**
2014-10-29 10:23:46 -04:00
Gary Russell
e7a64b8ef5 Speed Up Mongo Build When No Mongo
@Rule used a 10 second connection timeout.

Polishing
2014-10-22 16:14:58 +03:00
Gary Russell
064ec921bb INT-3537 RemoteFileTemplate Close Stream
JIRA: https://jira.spring.io/browse/INT-3537

Stream not closed if session cannot be created.

Add `try {} finally {}`.

__cherry-pick to 4.0.x, 3.0.x__

Conflicts:
	spring-integration-file/src/main/java/org/springframework/integration/file/remote/RemoteFileTemplate.java
	spring-integration-ftp/src/test/java/org/springframework/integration/ftp/session/FtpRemoteFileTemplateTests.java
2014-10-22 12:35:41 +03:00
Gary Russell
55a0b4324f INT-3536 Fix Mail Receiver Regression Issue
JIRA: https://jira.spring.io/browse/INT-3536

The fix for opening multiple IMAP connections in the idle
adapter inadvertently removed the check for the store being
open.

Add `connectStoreIfNecessary()` and test case.
2014-10-21 16:58:42 +03:00
Enrique Rodríguez
ca39d91465 INT-3528 Use Collections min and max methods where appropriate
JIRA: https://jira.spring.io/browse/INT-3528

Use `min` and `max` methods instead of sorting an entire collection to get the minimum or maximum element.

Change other inline `Comparator<?>`s to the `final` fields

Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/aggregator/AbstractCorrelatingMessageHandler.java
2014-10-15 12:07:32 +03:00
Gary Russell
9bb2e5abed INT-3526 Used Expanded URI In Exception Message
JIRA: https://jira.spring.io/browse/INT-3526

Previously, the URI in the exception message is the raw
URI with placeholders, if present.

Use the expanded URI in the message instead.
(cherry picked from commit 113716e)
2014-10-04 17:25:37 +03:00
Gary Russell
d0a125e794 INT-3524 Fix Tooling MessageChannel References
JIRA: https://jira.spring.io/browse/INT-3524

Backport to 4.0 schemas.

A number of references (expected-type) still referred to
the Spring Integration 3.0 MessageChanel.
2014-10-03 08:00:11 +01:00
Artem Bilan
3b40d8c063 INT-3517: Fix HTTP Rome Dep. Logic for SF in CP
JIRA: https://jira.spring.io/browse/INT-3517
2014-09-26 09:23:47 +01:00
王小冋
a46da286db INT-3522: MQTT XSD: Fix client-factory attr type
JIRA: https://jira.spring.io/browse/INT-3522
2014-09-26 11:15:44 +03:00
Spring Buildmaster
507b84021e [artifactory-release] Next development version 2014-09-05 01:27:40 -07:00
Spring Buildmaster
a5df485e91 [artifactory-release] Release version 4.0.4.RELEASE 2014-09-05 01:27:32 -07:00
Artem Bilan
f5fc061ee6 Upgrade to SF 4.0.7, AMQP 1.3.6 and Retry 1.1.1 2014-09-05 10:37:16 +03:00
Andreas Falk
fe309077ce INT-3510: Fixed 'missing INT_MESSAGE_SEQ' error
JIRA: https://jira.spring.io/browse/INT-3510

There has been an error in schema creation scipt for message store on postgresql database:

The statement for creating sequence 'INT_MESSAGE_SEQ' was executed AFTER creating the table that actually uses this sequence
which resulted in sequence not found error.

Further problem was that the the corresponding index 'MSG_INDEX_DATE_IDX' in creation script does not match the index name
'INT_CHANNEL_MSG_DATE_IDX' in drop script. Therfore an error occurred when executing drop schema script for postgresql.

Fixes:

1.Moved creation of sequence 'INT_MESSAGE_SEQ' to first line to be executed before creating the corresponding table
2.Renamed index 'MSG_INDEX_DATE_IDX' to 'INT_CHANNEL_MSG_DATE_IDX' in create script to make drop script work again
On branch INT-3510
2014-09-05 09:49:10 +03:00
Artem Bilan
18c704595a 4.0.x: Fix SF 4.1 compatibility 2014-09-04 14:22:03 +03:00
Artem Bilan
2ffb26a7a3 INT-3509 Add Convert Node & DOMSource to Document
JIRA: https://jira.spring.io/browse/INT-3509

**Cherry-pick to 3.0.x and 4.0.x**

Polishing

- Javadoc
- Refactor duplicated code
2014-09-02 16:03:59 -04:00
Artem Bilan
c010685d27 INT-3503 equals & hashCode for ToStringFriendlyJN
JIRA: https://jira.spring.io/browse/INT-3503

**Cherry-pick to 4.0.x**

PR Comments and test
2014-09-02 12:56:17 -04:00
Gary Russell
8351e6a013 INT-3501 Fix IMAP Idle
JIRA: https://jira.spring.io/browse/INT-3501

There were several problems:

When a `Folder` is open, an activity on the `Store` opens a new
connection.

The `PingTask` called `isConnected()` on the store, creating a new
connection. The pings (NOOPs)  were performed on this connection and
therefore did NOT cancel the `IDLE`.

In any case, the `IDLE` was issued on the folder not the store and
the only way to cancel that IDLE is to cause its `waitIfIdle()` to
be invoked. Conveniently, simply calling `isOpen()` invokes that
method and cancels the IDLE.

Finally, the `SimpleMessageCountListener` unnecessarily invoked
`message.getLineCount()` when a simple `folder.isOpen()` is
sufficient.

Fixes:

1. Do not invoke `openSession` if `this.folder` is not null.
2. Change the `PingTask` to simply invoke `isOpen()`.
3. Move the `PingTask to the receiver for a more efficient algorithm
    instead of running on fixed interval. Rename it `IdleCanceler`.
4. Increase the PING timer from 10 to 120 seconds; add setters for it
    and the `reconnectionDelay`.

TODO: Namespace support for 4.1. (Not to be back ported).

Add a test IMAP server (ported from Java DSL and enhanced to simulate IDLE
with a new message arriving for the first idle period.

INT-3501 Polishing - PR Comments

Polishing for `PoorMansMailServer` to get rid of `smtp` and `pop3` servers to avoid unnecessary Base64 dependency
2014-08-27 21:54:46 +03:00
Artem Bilan
dd5224cc58 INT-3486: Poller: Prevent Interrupt StackTrace
JIRA: https://jira.spring.io/browse/INT-3486

INT-3486a: PR comments
2014-08-20 10:47:09 -04:00
Gary Russell
889c084151 INT-3499 AMQP Confirms/Returns Polishing
JIRA: https://jira.spring.io/browse/INT-3499

- Suppress (log) 'null' payload error when no correlation data
- Change tests to use a dedicated template for confirms/returns

Conflicts:
	spring-integration-amqp/src/test/java/org/springframework/integration/amqp/config/AmqpOutboundChannelAdapterParserTests.java
	src/reference/docbook/amqp.xml

Resolved.
2014-08-19 16:01:00 -04:00
Artem Bilan
9d4863c148 INT-3496: JMX Metrics: Int->Long for All count
JIRA: https://jira.spring.io/browse/INT-3496

**Cherry-pick to 4.0.x & 3.0.x**

INT-3496: revert `int` methods and introduce `long` methods for `count` metrics
2014-08-18 14:30:44 -04:00
Artem Bilan
2047998f78 INT-3495 Add FileTailInChAFBean#setErrorChannel
JIRA: https://jira.spring.io/browse/INT-3495

**Cherry-pick to 4.0.x & 3.0.x**
2014-08-15 11:18:39 -04:00
Artem Bilan
705be107ca INT-3470: Fix SF 4.1 Compatibility
JIRA: https://jira.spring.io/browse/INT-3470

According to the commit https://github.com/spring-projects/spring-framework/commit/c06ac06,
the `MessagingException` is now `NestedRuntimeException` including nested StackTrace.
Hence test-cases have to be changed to the `Mathers.containsString` instead of `equals` for the `e.getMessage()`

**Cherry-pick to the 4.0.x**

Conflicts:
	spring-integration-amqp/src/test/java/org/springframework/integration/amqp/channel/DispatcherHasNoSubscribersTests.java
	spring-integration-core/src/test/java/org/springframework/integration/handler/advice/AdvisedMessageHandlerTests.java
2014-08-12 22:10:24 +03:00
Gary Russell
bd58077528 INT-3483 Fix Test Case for < 4.1
JIRA: https://jira.spring.io/browse/INT-3483
2014-07-25 10:48:37 -04:00
Artem Bilan
9b2fb8a07f INT-3483: Fix AbstractCorrelatingMH deadlock
JIRA: https://jira.spring.io/browse/INT-3483

**Cherry-pick to 4.0.x & 3.0.x**
2014-07-25 10:28:39 -04:00
Clément Garnier
917a970b27 INT-3480: public DefaultPahoMC.setPayloadAsBytes
JIRA: https://jira.spring.io/browse/INT-3480

In docs, it s said:
```
The DefaultPahoMessageConverter can be configured to return the raw byte[] in the payload by declaring it as a <bean/> and setting the payloadAsBytes property.
```
http://docs.spring.io/spring-integration/docs/4.0.0.M3/reference/html/mqtt.html
2014-07-25 13:17:11 +03:00
Gary Russell
8ad0ab378f INT-3464 Fix Test Filenames 2014-07-24 18:01:45 +03:00
Gary Russell
19d31c3446 INT-3464 Exceptions and AcceptOnceFileListFilter
JIRA: https://jira.spring.io/browse/INT-3464

Previously, if an IO exeption occurred while synchronizing
files, and an AcceptOnceFileListFilter is being used, files that were
not transferred would not be fetched next time.

Add strategy `ReversibleFileListFilter` that can rollback previously
accepted files.

Implement this interface on `AcceptOnceFileListFilter` and
`AbstractPersistentAcceptOnceFileListFilter`.

Add test cases.

Polishing
2014-07-24 18:01:44 +03:00
Gary Russell
8dd6adab52 INT-3474 Suppress DEBUG StackTrace in MIMHelper
JIRA: https://jira.spring.io/browse/INT-3474

When the MethodInvokingMessageHandler skips ineligible methods while
searching it emits a stack trace under DEBUG logging. This is not
needed, a simple log message is enough to convey the information.

Some POJOs gain ineligible methods when wrapped in a proxy so this
is no fault of the developer.

Other reasons for skipping methods (improperly set annotations etc)
continue to emit a stack trace.

INT-3474: Polishing

Rethrow `IneligibleMethodException` as `IllegalArgumentException` in case of a single `method` for processor
2014-07-24 16:53:53 +03:00
Gary Russell
b2f07d0116 INT-651 Suppress Deprecation Warnings 2014-07-18 14:45:04 -04:00
Gary Russell
9858657953 INT-651 Use Local 'Function' Interface
Avoid adding a new dependency after backport.
2014-07-18 14:10:35 -04:00
Artem Bilan
3113b69a87 INT-651: Add Iterator Support for Splitter
JIRA: https://jira.spring.io/browse/INT-651

INT-651: Polishing according PR comments

INT-651: Polishing #2

Doc Polishing
2014-07-18 13:40:55 -04:00
Artem Bilan
dae634346f INT-3473: Set Inactive TcpNioFactory Before Stop
JIRA: https://jira.spring.io/browse/INT-3473

A simple fix to prevent `Selector closed` error loging message on `TcpNioServerConnectionFactory#stop()`

Polishing
2014-07-17 15:39:22 -04:00
Artem Bilan
f0eeb3b2b9 INT-3470: SF 4.1 Compatibility #2
JIRA: https://jira.spring.io/browse/INT-3470

* Apply the last `ChannelInterceptor` changes - just `extends ChannelInterceptorAdapter`
* Change some tests to check content according to the new changes to the `GenericMessage#toString()`

**Cherry-pick to 4.0.x**
2014-07-17 14:33:46 -04:00
Gary Russell
e8898821ae INT-3469 MQTT - Set Callback Before Subscribing
JIRA: https://jira.spring.io/browse/INT-3469

Previously, the callback was set immediately after
subscribing which caused a small possibility of
message loss.

Set the callback before subscribing.
2014-07-10 12:18:10 -04:00
Spring Buildmaster
d1448da321 [artifactory-release] Next development version 2014-07-08 12:11:47 -07:00
Spring Buildmaster
6b8aec175e [artifactory-release] Release version 4.0.3.RELEASE 2014-07-08 12:11:37 -07:00
Artem Bilan
5eb68866d9 INT-3448: Add @Async test for @Gateway
JIRA: https://jira.spring.io/browse/INT-3448

INT-3448: Addressing PR comments

Late Resolution of @Publisher.defaultChannel

Early resolution of the publisher default channel caused
`@ Configuration` factory beans to be instantiated before
Spring Integration bean post processors had been registered.

Use the channel name instead of channel reference and resolve
it when processing the first publish.

Merge branch 'INT-3448' of https://github.com/garyrussell/spring-integration into INT-3448

Conflicts:
	spring-integration-core/src/test/java/org/springframework/integration/configuration/EnableIntegrationTests.java

INT-3448: Polishing
2014-07-08 09:21:57 -04:00
Artem Bilan
23c80906d8 INT-3417: Polishing Docs for MessageHeaders
JIRA: https://jira.spring.io/browse/INT-3417

Polishing

Add note about using the accessor.
2014-07-03 15:21:05 -04:00
Artem Bilan
27b35e2264 INT-3461: Add rometools Dependency for SF 4.1
JIRA: https://jira.spring.io/browse/INT-3461

To test it: `gradlew :spring-integration-http:testAll -PspringVersion=4.1.0.BUILD-SNAPSHOT`

INT-3461: Add CP condition for `rometools` into the `HttpRequestHandlingEndpointSupport`

INT-3461: Add CLASSPATH check for `RequestEntity` to determine the SF 4.1

Conflicts:
	build.gradle

Resolved.
2014-07-03 14:34:13 -04:00
Gary Russell
e836cc2edc Fix Tcp Interceptor Docs
http://stackoverflow.com/questions/24514348/tcpinboundgateway-replychannel-error-handling
2014-07-01 13:28:44 -04:00
Artem Bilan
fee6f6beed INT-3458: Compatibility with Spring Framework 4.1
JIRA: https://jira.spring.io/browse/INT-3458

* Change Spring AMQP to `1.3.5.RELEASE`
* `HttpRequestHandlingEndpointSupport`: remove `MappingJacksonHttpMessageConverter` registration
* `IntegrationRequestMappingHandlerMapping`: add 'fake' `name()` attribute to the inline `RequestMapping` annotation
* `StoredProcJmxManagedBeanTests`: remove `context.stop();` code, Since `MBeanExporter` deregister MBeans on `stop()` now
* `StoredProcPollingChannelAdapterParserTests`: change deprecated `ParameterizedSingleColumnRowMapper` to the `SingleColumnRowMapper`
* `Jms`: comment out the reflection code to check the value for the `recoveryInterval`, because it is removed already in favor of `backOff`
* `NotificationListeningMessageProducer`: move the start-up listener registration to the `onApplicationEvent`,
because `MBeanExporter` moved `registerBeans()` to the `start()` now.
The same `phase` might cause the issue, that MBeans aren't registered yet for `NotificationListeningMessageProducer`
* `JpaOutboundGatewayTests`: change `@TransactionConfiguration` to the `@Transactional`. Don't know why the first doesn't work now.

**Cherry-pick to 4.0.x**

INT-3458: Addressing PR comments

`NotificationListeningMessageProducer`: defer listener registration until `onApplicationEvent()`

Conflicts:
	build.gradle

Resolved.
2014-07-01 09:48:46 -04:00
Gary Russell
86fa138554 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`
2014-06-27 18:29:19 +03:00
Gary Russell
2c1833b12c 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()`
2014-06-23 09:49:05 +03:00
JohnA2
f639a0e1de INT-3433 NIO Thread Starvation with Fixed Pool
JIRA: https://jira.spring.io/browse/INT-3433

INT-3433 added the test-case
2014-06-23 09:49:04 +03:00