Commit Graph

7508 Commits

Author SHA1 Message Date
Artem Bilan
d74b4dba73 INT-2918: Fix 'Redis available' for ROGTests 2014-03-31 11:59:42 -04:00
Gary Russell
5f51d191e4 INT-3345 Update Spring-AMQP to 1.3.1.RELEASE
JIRA: https://jira.spring.io/browse/INT-3345
2014-03-31 11:02:35 -04:00
Artem Bilan
945455f360 INT-2918: Add Redis Outbound Command Gateway
JIRA: https://jira.springsource.org/browse/INT-2918

INT-2918: Improvement according PR comments

INT-2918: Polishing according PR comments

Minor Doc Polishing

INT-2918: Change `notNull` message

Polishing
2014-03-31 10:51:25 -04:00
Artem Bilan
c11e3ba3b5 INT-3337: MongoDbMessageStore Refactoring
JIRA: https://jira.spring.io/browse/INT-3337

INT-3337: Addressing PR comments

INT-3337: Add support to store/read Messages

* Add support to store/read `ErrorMessage`. As a trick for `Throwable` is selected (de)serializing converter

INT-3337: Add converters for `Message<?>` impls

INT-3337: Make `MDbMS.MessageWrapper` AuditAware

Add `_id` persistence field

Addressing PR comments

Polishing

- Docs
- Check for null ApplicationContext
- Add afterPropertiesSet() to tests
2014-03-28 16:46:48 -04:00
Artem Bilan
6d6bef58b2 INT-3326 Add GlobalChannelInterceptor Annotation
JIRA: https://jira.spring.io/browse/INT-3326

INT-3326: Add parent-child test

INT-3326: Fix `ClassCastException` for `GCII`

INT-3326: Rebase and Polishing

INT-3326: Fix `GCII` for `getBeanNamesForType`

INT-3326: Add `GlobalChannelInterceptor` annotation

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

INT-3326: Add parent-child test

INT-3326: Fix `ClassCastException` for `GCII`

INT-3326: Rebase and Polishing

INT-3326: Fix `GCII` for `getBeanNamesForType`

INT-3326 Polishing Doc, JavaDocs

Also fix a typo in the bean name for the CI processor.

INT-3326: Polishing

Doc Polishing
2014-03-28 14:04:22 -04:00
Artem Bilan
42a13c830d INT-2743: Improve <header-enricher>.<priority>
JIRA: https://jira.spring.io/browse/INT-2743
2014-03-28 13:06:49 -04:00
Artem Bilan
39a7fb3adf 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 10:46:56 -04:00
Gary Russell
66a23a2835 INT-3345 Update Spring-AMQP to 1.3.0.RELEASE
JIRA: https://jira.spring.io/browse/INT-3345
2014-03-27 17:35:55 -04:00
Artem Bilan
e3f8ef534b INT-3331: Add ChannelSecurityInterceptorFB
JIRA: https://jira.spring.io/browse/INT-3331

INT-3331: PR comments and others

* Register `ChannelSecurityInterceptorBeanPostProcessor` as a `BeanDefinition` (not `BPP`)
* Get `ChannelSecurityInterceptor`s from `ChannelSecurityInterceptorBeanPostProcessor#afterPropertiesSet()`
* Make `ChannelSecurityInterceptor` `final` to disallow to subclass it for unexpected issues
* Provide more convenience to the `ChannelSecurityInterceptorFactoryBean` - to allow to use it from xml configuration

Doc Polishing
2014-03-27 14:06:35 -04:00
Gary Russell
5587d79070 INT-3330 Fix JDK8 Javadoc Violations
JIRA: https://jira.spring.io/browse/INT-3330
2014-03-27 13:21:20 -04:00
Gary Russell
e9337a401e INT-3344 Update Spring Framework to 4.0.3
JIRA: https://jira.spring.io/browse/INT-3344
2014-03-27 12:56:17 -04:00
Artem Bilan
97c270c0e2 INT-3330 EnableIntegrationMBeanExport Annotation
JIRA: https://jira.spring.io/browse/INT-3330

INT-3330: Enable SpEL evaluation

INT-3330: Polishing for `MBeanExporterHelper`

INT-3330: Fix `errorChannel` early access

INT-3330: Polishing according PR comments

Polishing - copyrights, author, docs
2014-03-27 12:53:20 -04:00
Gary Russell
1d6e80ecd0 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:23:38 +02:00
Gary Russell
d6ed8dc7d0 Add Bamboo Status to README 2014-03-26 18:19:19 -04:00
Gary Russell
dcf4932d80 INT-3343 Bump JSch, Hibernate Versions
JIRA: https://jira.spring.io/browse/INT-3343
2014-03-26 16:29:47 -04:00
Gary Russell
70c43c8eed Test, Javadoc Cleanup
* Remove an unnecessary test.
* Fix timing in header channel registry test.
* Fix Javadocs in VetoCapableInterceptor
2014-03-26 10:09:32 -04:00
Gary Russell
9998880485 INT-3336 Fix MQTT Test Rule
JIRA: https://jira.spring.io/browse/INT-3336

Disconnect the client after verifying the broker is available.
Change the rule to a class level rule in DownstreamExceptionTests.
2014-03-21 15:05:42 -04:00
Gary Russell
98d735d058 INT-3336 Add error-channel to MQTT m-d-c-a
JIRA: https://jira.spring.io/browse/INT-3336

Previously exceptions thrown in a flow downstream of a
message-driven-channel-adapter were not logged and thrown
back to the client, causing the connection to drop and
reconnect.

Add `error-channel` to the adapter to allow normal
error handling. If no error channel, catch and log
the unhandled exception.

Add `adapter.stop();` in the end of 'real' tests to close the mqtt-connection
2014-03-21 20:44:11 +02:00
Gary Russell
b92134fae7 INT-3332 GlobalChannelInterceptorBeanPostProcessor
Implicit channel declaration for items downstream
of a `ChannelInterceptor` were not created.

The `BPP` eagerly fetched the interceptors during its
own creation; this caused the context initialization to fail
because the channel initializer hasn't run yet.

Defer creation of the interceptor beans until they are
actually needed.

Also, when using `@Configuration`, the channelInitializer
is no longer the first bean in the bean factory.

INT-3332 Use SmartLifeCycle to Apply Interceptors

Instead of using a bean post processor, the interceptor
processor now performs the channel interception when beans
in phase Integer.MIN_VALUE are started - after all beans
have been instantiated.

Polishing
2014-03-19 15:33:32 +02:00
Artem Bilan
23a26ca38e INT-3328: Add EnablePublisher Annotation
JIRA: https://jira.spring.io/browse/INT-3328

INT-3328: Polishing
2014-03-18 16:30:41 -04:00
Gary Russell
a8c8a4fed5 INT-3325 Add Redis Channel Message Group Store
JIRA: https://jira.spring.io/browse/INT-3325
JIRA: https://jira.spring.io/browse/INT-1870

Optimized MGS for QueueChannel - uses a LIST for
each channel and LPUSH, RPOP.

* Also fix MutableMessage to be Serializable

INT-1870 Priority Redis Channel Message Store

Supports priorities 0-9 (+ no priority).

Priorities out of that range are treated as no priority.

Polishing - Add Marker Interfaces

* Emit a `WARN` log if a channel is used with a regular MessageGroupStore
* Allow message-store on namespace when defining a priority channel

INT-3325 Polishing; PR Comments

Fix some typos in JavaDocs and Docs
2014-03-18 12:34:06 +02:00
Gary Russell
a9faa5836f Fix Typo in DEBUG Message
Also add another control-bus test.
2014-03-14 15:24:00 -04:00
Artem Bilan
f1cd5ede66 INT-3324: Simple refactoring to Routers
JIRA: https://jira.spring.io/browse/INT-3324

* Move `private` `ExpressionControlBusFactoryBean$ControlBusMethodFilter` class
to the `org.springframework.integration.expression.ControlBusMethodFilter`
to make it as convenient to use from JavaConfig
2014-03-13 14:41:00 -04:00
Artem Bilan
dafa765d88 INT-3321: Remove powermock Dependency
JIRA: https://jira.spring.io/browse/INT-3321

Refactor `StoredProcExecutorTests` just to use Mockito

INT-3321 Polishing

Mock the operations cache loader; remove static method.
2014-03-13 13:31:59 -04:00
Gary russell
c73cc40e23 INT-3322 JDBC i-c-a SpEL Select ParameterSource
JIRA: https://jira.spring.io/browse/INT-3322

Support the use of an ExpressionEvaluatingSqlParameterSource
from the ExpressionEvaluatingSqlParameterSourceFactory as the
`select-sql-parameter-source` for an inbound channel adapter.

Add documentation showing how to construct the bean.

Add a mechanism to disable caching so that the expression is
re-evaluated each time. However, the value should still be
cached between the `hasValue()` and `getValue()` calls.

INT-3322 Polishing; PR Comments
2014-03-13 16:09:49 +02:00
Biju Kunjummen
98b46c61f3 INT-3323: Add poller element to HTTP-outbound
JIRA: https://jira.spring.io/browse/INT-3323

Poller is internally supported in the bean definition of an http outbound gateway and outbound adapter, but it is not supported by their schema. This change attempts to fix the schema.

* Added in schema element for base poller, in both outbound adapter and outbound gateway
* Added in tests to ensure that a PollingConsumer is the instance type
* Polishing `import` for test classes
2014-03-13 09:41:35 +02:00
Artem Bilan
b12312114a INT-3320: Update Dependencies
JIRA: https://jira.spring.io/browse/INT-3320
2014-03-12 11:57:28 -04:00
Artem Bilan
8429424d46 INT-3317: Remove comparator from resequencer
JIRA: https://jira.spring.io/browse/INT-3317

In addition add `AbstractCorrelatingMessageHandler.discardChannelName` for convenience with JavaConfig

INT-3317: Add `AbstractCorrMH.outputChannelName`

INT-3317: Fix further `BF` population

Also add `MessageFilter.discardChannelName`

Move `XPathExpressionEvaluatingHeaderValueMessageProcessor` to the `xml.transformer.support` package

Additional polishing

Polishing

PR comments.
2014-03-12 11:25:17 -04:00
Gary Russell
75af72a77c INT-3319 Fix BeanFactory Propagation
JIRA: https://jira.spring.io/browse/INT-3319

The `MessageBuilderFactory` abstraction relies on the bean factory
being propagated to all classes that create messages.

Some classes were missed in the initial PR.
2014-03-12 12:03:31 +02:00
Gary Russell
1c9bcaccee INT-3041 Add Namespace Support For Retry Advice
JIRA: https://jira.spring.io/browse/INT-3041

Add namespace support to simplify configuration of
a `RequestHandlerRetryAdvice.

INT-3041 Polishing; PR Comments

* Allow a retry-advice element within the request-handler-advice-chain
* Clean up schema (should not have allowed `synchronization-factory` on
    the request-handler-advice-chain.

INT-3041 Polishing; PR Comment
2014-03-11 17:56:51 +02:00
Gary Russell
c7265d8e4a INT-3288 Use Unique Queues for Tests
JIRA: https://jira.spring.io/browse/INT-3288

Possible crosstalk between in inbound and outbound channel
adapter tests - they used the same queue (foo). The outbound
test leaves a message in the queue.
2014-03-11 10:41:47 -04:00
Gary Russell
5d0eafc608 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 13:42:15 -04:00
Artem Bilan
7adc9537b6 INT-3314: Fix BeanFactory Population for SAH
JIRA: https://jira.springsource.org/browse/INT-3314

Add to `ServiceActivatingHandler` `beanFactory` population code for the `MessageProcessor` delegate

INT-3314: Populate `BF` to `HValueMProcessor`s

Make `XPathExpressionEvaluatingHeaderValueMessageProcessor` as `public`

INT-3314: Populate `BF` to `HE.messageProcessor`

INT-3314: Add `BF` `NPE` protection

INT-3314 XPath Header Enricher Test

Add a test that verifies the `BeanFactoryTypeConverter` is used
(convert to a TimeZone object).
2014-03-10 12:01:53 -04:00
Gary Russell
267fc5b3db INT-3315 Use Non-Peristent AMQ Broker for Tests
JIRA: https://jira.spring.io/browse/INT-3315

Some tests use a persistent broker which can cause crosstalk
between tests/test runs.
2014-03-09 14:14:25 -04:00
Gary Russell
3cba7d522a INT-3288 Increase receive-timeout
JIRA: https://jira.spring.io/browse/INT-3288

Block in the ActiveMQ client for each poll instead
of returning immediately.
2014-03-09 12:24:19 -04:00
Gary Russell
62352d1dd7 INT-3288 Increase Test Timeouts
JIRA: https://jira.spring.io/browse/INT-3288

Sometimes, even locally with no load, ActiveMQ takes over
5 seconds to deliver the message with a polled adapter.

Increase timeout to 20 seconds instead of 2.
2014-03-08 11:50:19 -05:00
Gary Russell
df5877af17 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:48:55 -05:00
Artem Bilan
26d252bf00 INT-3288 JMS 'session-transacted' Attribute
JIRA: https://jira.springsource.org/browse/INT-3288

Previously, if you wanted to have a JMS outbound-channel-adapter
participate in an upstream JMS transaction (or use transactions
at all), you had to inject a `JmsTemplate` with `sessionTransacted`
set to `true`.

The `session-transacted` attribute has been added to the adapter,
allowing transactions to be used with the default `JmsTemplate`,
avoiding the need to inject a separate template.

Also, the inbound (polled) channel adapter incorrectly allowed
the `acknowledge` attribute to be set to `transacted` which is invalid and,
again, you had to inject an appropriately configured JmsTemplate
for transactions.

The inbound-channel-adapter now supports `session-transacted` as
well, and `acknowledge` can no longer be set to `transacted`.

There are no changes to the `message-driven-channel-adapter`, you
enable transactions with it by setting `acknowledge="transacted"`
as before.

INT-3288 Doc Polishing; Integration Tests
2014-03-07 21:06:34 +02:00
Gary Russell
7b94f1e21e Update spring-amqp to 1.3.0.RC1 2014-03-07 13:38:43 -05:00
Gary Russell
ff845b5069 INT-3309 Pluggable MessageBuilder
This is still a work in process.

There are a bunch of TODOs in classes
that are not managed by Spring and so
need to have the MessageBuilderFactory
injected.

But I am looking for feedback on the
approach.

INT-3309 Resolve TODOs

Provide access to the MessageBuilderFactory in all classes.

INT-3309 Polishing + Tests

* Fallback to 'fromMessage()' if mutating and inbound message is not MutableMessage
* Add 'alwaysMutate' boolean to MutableMessageBuilderFactory - coerces 'fromMessage' calls to 'mutateMessage'
* Add tests

INT-3309 Polishing; PR Comments

Also add tests to parent/child contexts where the parent has the
default message builder and the child has a mutable message builder.

INT-3309 More Polish; PR Comments

Also fix removeHeader in MMB.
2014-03-06 19:51:12 +02:00
Artem Bilan
4c775bce9d Fix JavaDocs issues 2014-03-06 14:33:18 +02:00
Gary Russell
776705e6c4 INT-3308 SubscribableChannel Optimization
JIRA: https://jira.springsource.org/browse/INT-3308

INT-3308 Move Optimization to AbstractDispatcher

- avoids the need for `canShortCutDispatcher()`
- optimizes all framework channels, including AMQP, JMS
- slight additional performance improvement

INT-3308 FinalSingleHandlerChannel

This is still a work in process.

TODO:Parser, parser tests.

See the DirectChannelTests for perforance results.

INT-3308 'Final' Channel Parser Changes, Tests

INT-3308 Polishing; PR Comments

INT-3308 Polishing

* Rename 'final' attribute to 'fixed-subscriber'
* Rename `BasicSingleFixedSubscriberChannel` to `FixedSubscriberChannel`

INT-3308 Polishing

* Rename test cases to match channel
* Fix parser error messages
* Add more exclusive attribute/element tests

INT-3308 More Polishing

* Remove remaining textual references to 'final'
* WARN log if the single subscriber has auto-startup="false"
* Handle the case when a fixed subscriber channel is declared after its handler
* Support the use of a fixed subscriber channel for elements created by an AbstractOutboundChannelAdapterParser
2014-03-06 13:28:08 +02:00
Artem Bilan
c7fb83259f 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.
2014-03-05 17:02:34 -05:00
Artem Bilan
f0a1f81931 INT-3312: Add Support for outputChannelName
JIRA: https://jira.springsource.org/browse/INT-3312

* Add `setOutputChannelName` to `AbstractReplyProducingMessageHandler` and `SourcePollingChannelAdapterFactoryBean`
to allow to have 'late binding' and resolve the real channel from `AC` on component initialization, instead of creation phase
* Add `setRequestChannelName` and `setReplyChannelName` to `ContentEnricher` for the same purpose
* Make `HeaderValueMessageProcessor` implementation `public`. It is useful for JavaConfig and DSL
* Polishing parsers to use classes, not their names as strings

INT-3312: PR comments

INT-3312: Polishing
2014-03-05 12:18:48 -05:00
Gary Russell
5c68029a72 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 17:25:53 +02:00
Gary Russell
8b2637dfbd INT-3305 Fix SFTP Test Case
JIRA: https://jira.springsource.org/browse/INT-3305
2014-03-05 10:21:25 -05:00
Gary Russell
345d831ec9 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:16:02 +02:00
Gary Russell
3e0f17258b INT-3404 Clarify Router Attributes
JIRA: https://jira.springsource.org/browse/INT-3304

Add notes to explain the relationship between `resolution-required`
and `default-output-channel`.
2014-03-05 10:30:41 +02:00
Gary Russell
669db1fb02 INT-3299 Remove Unneeded Dependency From IP
JIRA: https://jira.springsource.org/browse/INT-3299

The IP module incorrectly has s-i-stream as a transitive dependency.

It is only used in a test case.
2014-03-05 10:27:32 +02:00
Gary Russell
727a554ccf INT-3294 Support Implicit Input Channel with Ann.
JIRA: https://jira.springsource.org/browse/INT-3294

Previously, implicit input channel creation was not
supported for annotated endpoints.

Register a `DirectChannel` if the input channel does
not exist in the context.
2014-03-04 18:28:57 -05:00