Commit Graph

7240 Commits

Author SHA1 Message Date
Artem Bilan
dd5c9cc18c INT-3155: Add Gradle Task 'testAll'
* Add to `LongRunningIntegrationTest` ability to read `System.properties`
Note, ENV property 'RUN_LONG_INTEGRATION_TESTS' has a preference in case of value `true`
* Add Gradle task `testAll`
* Upgrade to Gradle 1.7
* Improve build performance by adding 'inputs'/'outputs' to some tasks

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

Polishing

Remove inputs/outputs.

Polish RouterConcurrencyTest.
2013-09-30 12:01:12 -04:00
Artem Bilan
7101120589 INT-3153: Fix Mongo Mapping for List in Headers
JIRA: https://jira.springsource.org/browse/INT-3153

Polishing: remove compiler (generic) warning in test case
2013-09-30 09:46:23 -04:00
Gary Russell
691fffc058 INT-3154 Use SPR Javadoc Stylesheet
Use the Spring Framework stylesheet for javadocs.

Fix 3 missing package-info files.

(Aside: remove cache-sessions from 2 @Ignored test case configuration files).
2013-09-27 15:01:05 -04:00
Amol Nayak
61f24c8d9e INT-2881: Add support for the firstRecord to retrieving JPA gateway
JIRA: https://jira.springsource.org/browse/INT-2881
2013-09-27 19:45:31 +03:00
Gary Russell
df6b821e4b INT-3152 Polishing Show Skipped Tests as 'Ignored'
In test report.
2013-09-27 11:39:07 -04:00
Gary Russell
65328b951b Polishing - Switch to TestWatcher
TestWatchMan is deprecated.
2013-09-27 08:28:08 -04:00
Gary Russell
be87cfc365 INT-3152 Speed Up Build Times
Add a `@Rule` to skip long-runing tests during normal builds.

Add the rule to long-running tests in gemfire, ip, jms, jmx.

Add an environment variable `RUN_LONG_INTEGRATION_TESTS`; when set
to true, all tests are run.

Set the environment variable to true on all nightly builds.

Build now runs in 13 minutes on my 3 year old laptop.
2013-09-26 17:38:38 -04:00
Artem Bilan
65e84030fb INT-3133-2: PAs Inheritance Refactoring
JIRA: https://jira.springsource.org/browse/INT-3133

INT-3133-2: Addressing PR's comments
2013-09-26 09:42:37 -04:00
Gary Russell
4d7b94e0ee Merge pull request #897 from mbazos/INT-2768
* INT-2768:
  INT-2768 Polishing - Docs, White Space
  INT-2768: Add BeanClassLoaderAware
  INT-2768 Add XSLT Transformer Factory Class Name
2013-09-25 17:48:59 -04:00
Gary Russell
5617d2e2d8 INT-2768 Polishing - Docs, White Space
Add what's new; fix white space in test case.
2013-09-25 17:43:33 -04:00
Artem Bilan
2f8053f585 INT-2768: Add BeanClassLoaderAware 2013-09-25 17:25:20 -04:00
mbazos
3daa690426 INT-2768 Add XSLT Transformer Factory Class Name
Add the ability to inject the class name of the xslt transformer
implementation.

https://jira.springsource.org/browse/INT-2768

-add @author to java docs
-updat copywrite year to current year

add new test and check for class name that it exists.

-fix xslt payload transformer and test for unknown class name, will
now default to the jre default transformer.
2013-09-25 17:23:29 -04:00
Biju Kunjummen
bb6aebc587 INT-3142 Allow Merging of HTTP Message Converters
INT-3142: A flag to retain default converters when the user has customized messageconverters for HttpRequestHandlingController, HttpInboundGateway

* Introduced a new flag in the base class of HttpRequHttpRequestHandlingController, HttpInboundGateway - registerDefaultConverters
* Introduced a new attribute "register-default-converters" for inbound-channel-adapter and inbound-gateway to indicate if the default HttpMessageConverter's need to be registered
* Http namespace parser related changes to set the new flag
* Added additional tests to test the flag and the namespace parser related changes

Changes per feedback from Artem - additional javadoc comments, cleaned up tests

Updated: Setting the register-default-converters by default to false now, for backward compatibility reasons
Changed adapter name per feedback from Artem

Changed adapter name per feedback from Artem

Changed attribute name from register-default-converters to merge-with-default-converters

INT-3142: Atomic operation for messageConverters

'What's New' polishing

Polishing

Fix a few comments, error messages, docs, whitespace.
2013-09-25 13:26:11 -04:00
Gary Russell
a9ec7c8107 INT-3133 Doc Polishing 2013-09-24 17:36:42 -04:00
Artem Bilan
19dd45a98a INT-3133: Add <spel-property-accessors> Support
* Add <spel-property-accessors> to configure a list of beans
that implement `org.springframework.expression.PropertyAccessor`
* Add `SpelPropertyAccessorRegistrar` to manage a list of PropertyAccessors
for Integration infrastructure
* Refactoring for `SpelFunctionRegistrar` and `IntegrationEvaluationContextFactoryBean`
to fix the issue when there is no `SpelFunctionRegistrar`(`SpelPropertyAccessorRegistrar`)
in the child AC, but there is one in the parent.
Previously the inheritance did't work for that reason.
* Now parent/child logic moved to `IntegrationEvaluationContextFactoryBean`
* Add documentation

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

INT-3133: Rebasing, polishing and documentation

INT-3133: PropertyAccessors override support

* `@Ignore` `SOLingerTests#finReceivedNioLinger()` test

INT-3133: Change JavaDoc link to 3.0.0.RC1

Polishing

- Remove duplicate check - last bean def wins
- Doc Polishing
2013-09-24 16:55:08 -04:00
Gary Russell
00d9ba50ef INT-3146 Fix Another Test Timing Issue
Increase test timer for soTimeout detection.
2013-09-24 13:33:27 -04:00
Artem Bilan
7517963be2 INT-3027: Headers Enrichment for <enricher>
* Add `<header>` sub-element to `<enricher>`
* Refactoring of `EnricherParser`
* Add Headers Enrichment logic to `ContentEnricher`
* Add tests
* What's new and Content Enricher's `<header>` note

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

INT-3027: Addressing PR comments

INT-3027: add NPE asserts to map properties

INT-3027: add overwrite & type to enricher header

Move `HeaderValueMessageProcessor` hierarchy to 'transformer.support' package

INT-3027: Make header's overwrite=true by default

Doc Polishing
2013-09-24 12:55:06 -04:00
Gary Russell
7c0c9e92fc INT-3146 Fix Test Timing Issue
Wait for server connection factory to start listening for new tests.
2013-09-24 12:30:06 -04:00
Gary Russell
f8cfecfc79 INT-3146 TCP SO Timeout with Caching Client CF
https://jira.springsource.org/browse/INT-3146

Incompatibility of using socket timeouts with a caching client
connection factory.

When a socket option timeout (soTimeout) is set on a TCP connection
and the timeout occurs, the socket is closed.

When a connection is intercepted, the close is performed through
the interceptor (for example to allow a closing handshake before the
physical close).

However, the caching client connection factory is implemented
using an interceptor, which returns the underlying connection to
the cache pool (for reuse). In the case of a TcpNetConnection,
the reader thread has terminated meaning that, the next time the connection
is used, no reply will ever be received.

The work-around (when using a gateway) is to use the 'remote-timeout'
attribute instead of relying on the soTimeout. There is no
work around when using collaborating channel adapters with a Net
connection. Using NIO works because there is no reader thread
in that case, but the socket is never closed on a timeout.

Always physically close the connection whenever an exception occurs
even if the close was delegated to an interceptor.

Add test cases for Net and NIO implementations.
2013-09-24 10:40:02 -04:00
Artem Bilan
f3d3f4ee4b INT-2998: Channel Adapters' Lifecycle Refactoring
* Add XSD attributeGroup `smartLifeCycleAttributeGroup`
* Use it for all adapters tags
* Refactoring `AbstractChannelAdapterParser` hierarchy
* Refactoring some `MessageHandler`'s that should not have `autoStartup` & `phase`.
    It is the responsibility of `AbstrctEndpoint`
* Polishing some tests according new logic

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

INT-2998: Polishing

Polishing

 - Reformat schemas where indentation changed
 - Add SLC to the UDP inbound adapter
2013-09-23 17:58:58 -04:00
Artem Bilan
e8ecbac7fd INT-2943: Retry: Don't Wrap in MessagingException
Previously, `RequestHandlerRetryAdvice` wrapped a Handler's (business) Exceptions in a
`MessagingException` on each retry within `RetryCallback#doWithRetry`
and before `RetryPolicy#canRetry`.
It made useless some retry framework out-of-the-box features like `BinaryExceptionClassifier`

* Push wrapping to `MessagingException` after `retryTemplate#execute`
* Polishing `ErrorMessageSendingRecoverer` regarding new logic
* Add `retryableExceptions` test

You can now properly specify Business exceptions with the retry policy to
perform conditional retry.

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

Polishing

Only wrap Throwable in ThrowableHolderException if the Throwable
is not an Exception.

INT-2943: Polishing ErrorMessageSendingRecoverer
2013-09-23 16:27:54 -04:00
Artem Bilan
347c3f03e5 INT-3145: Fix compatibility with SPR 4.0
JIRA: https://jira.springsource.org/browse/INT-3145
2013-09-20 14:07:54 +03:00
Artem Bilan
f96e5ee00b Merge pull request #890 from garyrussell/INT-3144
INT-3144 Fix JMX Tests Timing Issue
2013-09-20 01:52:19 -07:00
Gary Russell
197f9d75ba INT-3144 Fix JMX Tests Timing Issue
Really only an issue with the queue channel test, but change
all tests to use CountDownLatches instead of relying on Thread.sleep().
2013-09-20 11:39:04 +03:00
Gary Russell
ec1269278d DOS->Unix NewLines in Several Core Files 2013-09-19 17:08:03 -04:00
Artem Bilan
09be87551b INT-2867: Add Script Support to inbound-c-a
* Add `<script>` and `<expression>` to `<int:inbound-channel-adapter>`
* Refactoring for `DefaultInboundChannelAdapterParser`
* Introduce `ScriptExecutingMessageSource` to allow scripts' `MessageProcessor`
implementations work as a source for polling endpoint

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

INT-2867: documentation

In addition the tests for Lifecycle attributes

Polishing
2013-09-19 16:55:32 -04:00
Gary Russell
5228db96f9 INT-3144 Fix JMX Tests Timing Issue
Really only an issue with the queue channel test, but change
all tests to use CountDownLatches instead of relying on Thread.sleep().
2013-09-19 14:32:09 -04:00
Artem Bilan
63cbf736a2 INT-3139: Add #jsonPath SpEL Function Support
* #jsonPath function is registered automatically if the library is on the classpath
* Add otional dependency on `com.jayway.jsonpath:json-path` artifact
* Add `JsonPathUtils` class as a wrapper around `JsonPath`
* Add `#jsonPath` tests for: `<transformer>`, `<filter>`, `<splitter>`, `<router>`

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

INT-3139: Further improvements

* Remove `SpelFunctionRegistrar`
* Introduce `SpelFunctionFactoryBean`

INT-3139: Polishing
2013-09-19 12:35:34 -04:00
Artem Bilan
4d3bc36ff0 INT-2433: Get Rid of MessageProcessors wrapping
Previously, provided `MessageProcessor` to create a `MessageHandler`
for endpoint was wrapped to `MethodInvokingMessageProcessor`,
e.g. `GroovyScriptExecutingMessageProcessor`.

Check the type of provided object in the constructor
of `MethodInvoking*` strategies and use it directly if it is `MessageProcessor`

JIRA: https://jira.springsource.org/browse/INT-2433
2013-09-18 17:01:54 -04:00
Artem Bilan
417c848c0b INT-3129: FTP local-filename-generator-expression
* Add `local-filename-generator-expression` attribute to FTP and SFTP Outbound Gateway
* Refactoring for `(S)FtpOutboundGatewayParser`
* Add `local-filename-generator-expression` tests
* Add 'What's New' and attribute description

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

Polishing

Doc Polishing

Assert attribute is only set for get/mget

Move tests to the get gateways
2013-09-18 13:40:59 -04:00
Gunnar Hillert
bbf93e1385 INT-3029 JPA: Support Iterables for Persist/Merge
* Add test cases
* Add documentation

Jira: https://jira.springsource.org/browse/INT-3029

INT-3029 Update copyright year

Doc Polishing
2013-09-18 10:41:47 -04:00
Gary Russell
772a01be79 INT-3098 TCP Suppress Error Log on Normal Close
Net connections suppress error logs, NIO connections did not.
2013-09-18 10:01:01 -04:00
Artem Bilan
7f34f8c919 INT-2739: StoredProc: 'row-mapper' as a Bean Ref
* Convert `row-mapper` attribute of stored procedure components
to bean reference
* Class name is also supported for backward compatibility

JIRA: https://jira.springsource.org/browse/INT-2739
2013-09-16 17:39:27 -04:00
Artem Bilan
f42f6eca57 INT-3024: Add <poller> to mongodb:o-c-adapter
In addition add `<request-handler-advice-chain>`

JIRA: https://jira.springsource.org/browse/INT-3024
2013-09-16 17:12:01 -04:00
Artem Bilan
4d351ada4c INT-3117: Add r-c & r-t Attrs. to Chain Gateways
* Add `reply-channel` and `reply-timeout` to `<gateway>` within `<chain>`
* Add appropriate asserts to `ChainParserTests`

JIRA: https://jira.springsource.org/browse/INT-3117
2013-09-16 16:29:42 -04:00
Artem Bilan
f28f30c880 INT-2117: Test that trim() Works in the AMMR
* `AbstractMappingMessageRouter#addChannelFromString` uses
`StringUtils.tokenizeToStringArray`, so it's enough to check it from test.

JIRA: https://jira.springsource.org/browse/INT-2117
2013-09-16 15:41:00 -04:00
Artem Bilan
5cb64f81f6 INT-3120: Remove Accept-Charset from Response
`StringHttpMessageConverter` adds `Accept-Charset` header by default.
By RFC 2616 `Accept-Charset` is a Request header,
so it won't be presented in the response.

Turn off `writeAcceptCharset` in the `HttpRequestHandlingEndpointSupport`.

JIRA: https://jira.springsource.org/browse/INT-3120
2013-09-16 15:13:17 -04:00
Artem Bilan
937ac9647a INT-3092, INT-3042: Doc: Jacksons, Resequencer
JIRA: https://jira.springsource.org/browse/INT-3042
https://jira.springsource.org/browse/INT-3092
2013-09-16 13:55:30 -04:00
Artem Bilan
77b0917190 INT-3138: add awaitTermination to delayer tests
`DelayerHandlerRescheduleIntegrationTests` fail sometimes
on asserts. Looks like `context.destroy()` works very slow
and `<delayer>` manages to send delayed Messages

JIRA: https://jira.springsource.org/browse/INT-3138
2013-09-16 13:00:06 -04:00
Artem Bilan
cd256204d0 INT-3075: Note regarding HTTP Status Code
JIRA: https://jira.springsource.org/browse/INT-3075
2013-09-16 12:34:16 -04:00
Artem Bilan
4c2548b085 Contributing wiki: JIRA links note 2013-09-05 23:28:58 -04:00
Gary Russell
7bf64c8aa5 Add Artem to POM Developer List 2013-09-05 23:17:49 -04:00
Gary Russell
76de60c2b5 Revert Version to 3.0.0.BUILD-SNAPSHOT 2013-09-05 11:25:58 -04:00
Spring Buildmaster
47a405a832 [artifactory-release] Release version 3.0.0.M3 2013-09-05 07:49:22 -07:00
Gary Russell
4abeebdb3a INT-3132 Add minSubscribers to Pub/SubChannel
Send is deemed to be successful if sent to at least this
number of subscribers (default 0).

Note: when using a task executor, if there is at least one
subscriber, a send is always good, regardless of success
or failure of invoking the handler.

Polishing - Docs - PR Comments
2013-09-05 09:12:17 -04:00
Eric Bottard
e24d683478 INT-3122 Return String Properties as String
Make converted object toString() behave as expected
2013-09-04 22:59:18 -04:00
Artem Bilan
93f61160e2 INT-1639: Add <spel-function> support
* add `<spel-function>` XSD element
* add `SpelFunctionParser`
* add `SpelFunctionRegistrar` to avoid introducing some confused 'Method'-bean
* add `SpelFunctionRegistrar` collaboration with `IntegrationEvaluationContextFactoryBean`
* some refactoring for `IntegrationEvaluationContextFactoryBean`
* polishing some failed tests after this change

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

INT-1639: SpelFunctionParser use BeanClassLoader

INT-1639: Inherit 'functions' from parent AC

INT-1639: Document the <spel-function>

INT-1639: 'NoSuchBeanDefinitionException' fix

Polishing
2013-09-04 18:43:00 -04:00
Gary Russell
1705a70def INT-3114 Call MessageHandlers Directly
Invoke ARPMH Directly (SA, Splitter etc)

If a bean referenced by a service activator etc, is already an ARPMH,
then wire it directly into the endpoint rather than wrapping it in a
MethodInvoking Handler.

Disallow the same bean being used in this way in multiple endpoints.
It would cause rewiring of outputChannel etc.
Detect such use and suggest using prototype scope.

Previously, an ARPMH used in a MethodInvokingHandler didn't work
in some cases, because the "inner" ARPMH had no output-channel
and the outer ARPMH (e.g. transformer) wouldn't get a reply and
would complain if requiresReply is set.

The general solution is to detect the ARPMH targetObject in
AbstractStandardMessageHandlerFactoryBean, invoke canBeUsedDirect()
to allow the subclass to vote - specifically it will be allowed
if the type is not also a special type understood by the subclass
and no endpoint-specific attributes are set.

To this end, remove a few default attributes from the schema to
enable detection of explicit setting of these attributes.

If these conditions pass and the method is handleRequest (either
explicitly or by omission) then wire it in and invoke the
subclass to post process the handler (set attributes).

Restructure this post processing in each subclass so that it can be invoked in
this way, or directly by the subclass when it makes a custom
handler.

Polishing - PR Comments

Mainly a little refactoring in the RouterFactoryBean to allow
the parameter in canBeUsedDirect() to be an ARPMH instead of
Object.

Plus a couple more minor changes.
2013-09-04 17:07:01 -04:00
Gary Russell
81ac7e56be INT-3124 JMX Check Mutually Exclusive Attributes
Only one of query-name and query-name-ref
Only one of query-expression and query-expression-ref
2013-09-03 18:49:54 -04:00
Artem Bilan
98b42cbe36 INT-3070: Fix Delayer with MongoDbMessageStore
The `DelayHandler.DelayedMessageWrapper` works correctly, as designed by INT-3049.
However `DelayHandler.DelayedMessageWrapper` contains `Message` as a property
and `GenericMessage` can't be reconstructed automatically.

So, added new `DBObjectToGenericMessageConverter` to read `GenericMessage` for
`DelayHandler.DelayedMessageWrapper#original` property.

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

Cherry-picked 2.2.x

INT-3070: PR comments

INT-3070: Remove `assert` for common state
2013-09-03 18:15:02 -04:00