Commit Graph

76 Commits

Author SHA1 Message Date
Gary Russell
928b6b8bc3 INT-2961 Make ARPMH.onInit() Final; Add doInit()
https://jira.springsource.org/browse/INT-2961

onInit() relied on subclasses calling super.onInit() to apply the
advice chain and add the BeanFactory to the MessagingTemplate.

At least one extension (smpp) failed to do this, disabling these features.

Make onInit() final and call doInit() for subclass initialization (no-op in ARPMH).

INT-2961 Polishing

- do not increase visibility of doInit in subclasses.
- remove final modifiers from doInit so user subclasses can participate in initialization if needed.
2013-10-29 10:20:19 +02: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
Gary Russell
52b340956f INT-3115 Fix EvaluationContext Initialization
There were several "helper" classes where the context was initialized
in the constructor, before the BeanFactory was passed in.

Generally fixed by adding the BeanFactory to the constructor args.

Other cases where the container-managed bean instantiated a helper
and never passed in the BeanFactory.

Finally, a fix to ExpressionUtils where the caller had a BeanFactory
but the BF did not contain an EvaluationContext factory bean, the
BeanResolver was not set up. This is unlikely in a Spring Integration
application, but added for completeness.

INT-3115 Add a BeanFactory to Test Cases

Change the WARN log in ExpressionUtils to a fatal exception to detect
cases where an EvaluationContext was created without a BeanFactory.

While this was generally in test cases, it also exposed some cases
in code where the context was initialized without a BF.

polishing on merge
2013-08-27 00:28:00 -04:00
Gary Russell
7f008b58c2 INT-1639 Externalize SpEL Evaluation Context
Allow modification of context property accessors and
functions.

Polishing

- Fix tests to ensure the EvaluationContextFactoryBean is
available when necessary.

Polishing - Use Utility for ALL EvaluationContexts

Add Test Showing Custom Function

See SpelTransformerIntegrationTests-context.xml

Polishing

Polishing -fix Remote Sync

Polishing - Emit WARN if No BeanFactory

Polishing - Do Not Override ConversionService

Kludge to Prevent Warning When No BeanFactory

Expressions for method invoking in the MessagingMethodInvokerHelper
don't need a BeanFactory - suppress the warning.

Polishing - PR Comments - Invert Boolean
2013-08-25 20:01:14 -04:00
Artem Bilan
70886b2543 INT-2822: 'requires-reply' for Outbound Gateways
* Add `requires-reply` attribute for all adapters outbound gateways as `true` by default
* WS-outbound-gateway is still without it, because it has its own specific attribute `ignore-empty-responses`
* Make `requires-reply` as `false` by default for `jdbc:stored-proc-outbound-gateway` inasmuch as `jdbc:stored-proc-outbound-adapter`
doesn't have ability to configure `returning-resultset`
* add parser tests for `requires-reply`

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

INT-2822 'requires-reply' for ws:outbound-gateway

Default false.

INT-2822: Polishing after rebase

INT-2822: deprecate 'ignore-empty-responses'

* Add 'requires-reply' section into What's New

INT-2822: remove 'ignore-empty-responses' from RM

INT-2822: Polishing after rebase

INT-2822: Rebased and polished

INT-2822: Rebased and polished

Add WARN within deprecated `AbstractWebServiceOutboundGateway#setIgnoreEmptyResponses`

Revert 'ignore-empty-responses'; Doc Polishing
2013-08-19 13:48:31 -04:00
Artem Bilan
a355f7ea09 INT-3109: make UriVariableTests work offline
JIRA: https://jira.springsource.org/browse/INT-3109
2013-08-14 13:16:40 +03:00
Artem Bilan
406dd39bfb INT-3022: SimpleResponseMessageExtractor NPE fix
https://jira.springsource.org/browse/INT-3022
2013-05-23 11:20:27 -04:00
Gunnar Hillert
05062aa0b2 INT-2964 Various JavaDoc Fixes
INT-2964 - JavaDoc: <emphasis> should be <em>

INT-2964 - JavaDoc: <p/> should be <p>

INT-2964 - JavaDoc polishing

* <li></li> should be wrapped in <ul></ul>
* wrap code snippets in {@code myCode()}
* change <code>false</false> to <code>false</code>

INT-2964 - Polish - Fix more JavaDoc errors

* Mockito-all dependency causes JavaDoc error. Change dependency to Mockito-Core.
2013-04-15 17:11:38 -04:00
Artem Bilan
6b7ae6ceed INT-2720: UriTemplate Support for S-WS Transports
Remove deprecation in the WS module

JIRA: https://jira.springsource.org/browse/INT-2720
      https://jira.springsource.org/browse/INT-2530

INT-2720: Polishing after rebase

INT-2720: Add a note to the Reference Manual

Polishing <authorgroup> to avoid extra whitespace before name

INT-2720: Pr comments & polishing

* Revert removed public API
* Revert tabs in What's new
* Change real URL to fake to allow for tests to work off-line
* Add smackx dependency to avoid error messages in logs
2013-04-10 09:54:34 -04:00
Gunnar Hillert
0271acaf4c INT-2916 - Upgrade to JUnit 4.11 in support of JDK7
For reference see: https://jira.springsource.org/browse/INT-2916

Changes:

* INT-2919 - Upgrade Spring Data Gemfire to 1.2.2.RELEASE
* Exclude Hamcrest transitive dependency from JUnit (as already explicitly declared)
* Set sourceCompatibility in build.gradle to 1.6
* Set targetCompatibility in build.gradle to 1.6
* Upgrade Hamcrest to 1.3 and fix deprications
  - Corematcher is(*class) change to is(instanceOf(*class))
  - Change org.junit.internal.matchers.TypeSafeMatcher to org.hamcrest.TypeSafeMatcher
  - Change import org.junit.matchers.JUnitMatchers.containsString to org.hamcrest.CoreMatchers.containsString
  - Change import org.junit.matchers.JUnitMatchers.both to org.hamcrest.CoreMatchers.both
  - Change import org.junit.matchers.JUnitMatchers.containsString to org.hamcrest.CoreMatchers.containsString
* Fix JUnit deprecations
  - changed junit.framework.Assert to org.junit.Assert
* Add few missing licenses headers to tests
* Marked several test classes with: @DirtiesContext(classMode=ClassMode.AFTER_EACH_TEST_METHOD)
  - SplitterIntegrationTests
  - GatewayInvokingMessageHandlerTests
  - FileToChannelIntegrationTests
  - FileInboundChannelAdapterWithRecursiveDirectoryTests
  - JdbcMessageStoreChannelTests
  - ChatMessageInboundChannelAdapterParserTests
* 3 Tests ignored (Still needs to be addressed):
  - testOperationOnPrototypeBean
  - testFailOperationWithCustomScope
  - testOperationOfControlBus
* Update SQL script (test-failure):
  - spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/config/outboundSchema.sql
  - add drop table statements
  - add ignore-failures="DROPS" to "jdbcOutboundChannelAdapterCommonConfig.xml"

INT-2916 - Code Review Changes

INT-2916 - Fix ignored Tests

Fix 3 previously ignored tests in *GroovyControlBusTests*:

* testOperationOnPrototypeBean
* testFailOperationWithCustomScope
* testOperationOfControlBus

INT-2916 - CI Build Testing

INT-2963 - Remove JDK7 Compilation Warnings

* Upgrade Mockito to 1.9.5
* Fix failing SubscribableJmsChannelTests

INT-2916 - Standardize Hamcrest assertions
Ensure Hamcrest assertions are standardized to: is(instanceOf(...))
2013-04-04 13:40:46 -04:00
Gary Russell
451beb424a INT-2873 Create 3.0 Schemas
Copy schemas, cleanup whitespace, update spring.schemas files,
update version in AbstractIntegrationNamespaceHandler.

For each schema compared the 2.2 version with the 3.0 version
(diff -w), ensuring the only difference is the import of
3.0 schemas (where appropriate) instead of 2.2.
2013-01-25 16:12:00 -05:00
Gary Russell
40ce2ab793 INT-2695 WS Support URI Schemes Other than http(s)
Previously, only http: or https: URI schemes were supported
by the uri attribute. To use other schemes (such as jms:),
you had to provide a DestinationProvider.

Add support for schemes other than http and https by
creating a DestinationProvider internally when such a
URI is detected.

Note: <uri-variable/>s are NOT supported except when
a URI with an http(s) scheme is provided. An exception
is thrown if variables are provided with an incompatible
URI, or if a DestinationProvider is supplied.

This could break existing applications that provide an
external DestinationProvider and have configured
<uri-variable/>s. Previously, these variables were
simply ignored.
2012-09-18 09:41:18 -04:00
Artem Bilan
31d0e42c1a INT-2718 & INT-2721: fixes for <chain> & fix bugs
* ban to use 'channel' and 'request-channel' attributes for 'outbound-channel-adapters' and 'outbound-gateways' when they are declared inside the `<chain>`
* fix usage of `<request-handler-advice-chain>` for components when they are declared inside the `<chain>`
* ban to use `<request-handler-advice-chain>` for 'outbound-channel-adapters' when they are declared inside the `<chain>` don't implement `AbstractReplyProducingMessageHandler`
* refactor `IntegrationNamespaceUtils` to use `BeanDefinition` instead of `BeanDefinitionBuilder` for 'advice-chain' parsing
* tests for new logic for 'channel' and 'request-channel' attributes within `<chain>`
* tests for new logic for `<request-handler-advice-chain>` within `<chain>`
* fix failed test on slow machine
* fix `SysLogTransformer` tests

For reference:
https://jira.springsource.org/browse/INT-2718
https://jira.springsource.org/browse/INT-2721
https://jira.springsource.org/browse/INT-2719

INT-2718 Polishing
2012-09-10 16:13:45 -04:00
Gary Russell
08cbab08c2 INT-2214, INT-343, INT-2250 MessageHandler Advice
Add general capability to advise just the handleRequestMessage
part of an AbstractReplyProducingMessageHandler.

This is to advise just the immediate operation, and not the
entire downstream flow.

Uses include:

* outbound gateway post processing
* adding retry behavior using spring-retry
* adding circuit breaker functionality

Initial commit for review.

Also need to advise simple message handlers (such as file
etc) to allow them to post-process file operations
with payload.delete(), payload.renameTo(...) etc.

INT-2250 Add Circuit Breaker Advice

INT-343 Add Retry Advice

Stateless and Stateful retry using spring-retry. Stateless
means the RetryTemplate performs the retries internally.
Stateful means the exception is thrown (e.g. to JMS container)
and the retry state is maintained by spring-retry.

INT-2215, INT-343, INT-2250 Refactoring

Factor out common abstract Advice class.

INT-2214 Catch Evaluation Expression Exceptions

If an onSuccess expression evaluation fails, add an
option so the user can decide whether such an exception is
caught, or propagated to the caller.

INT-2214 etc PR Review Polishing

INT-2214 etc Namespace Core, File, FTP

Add <request-handler-advice-chain/> to outbound endpoints.

INT-2214 etc. More Namespace Support

amqp, event, gemfire, groovy, http, ip, jdbc, jms, jmx, jpa, mail, rmi, sftp, twitter, ws, xmpp

INT-2214 etc Polishing

PR Review

INT-2214 etc Polishing

Don't catch Throwable.

Move Advice classes to handler.advice package.
2012-08-06 09:15:58 -04:00
Gunnar Hillert
b07abcd30c INT-2262 - Add reply-timeout to Outbound Gateways
For reference see: https://jira.springsource.org/browse/INT-2262

Add reply-timeout attribute to:

* Amqp Outbound Gateway
* File Outbound Gateway
* Ftp Outbound Gateway
* Sftp Outbound Gateway
* Ws Outbound Gateway

Update Schema Documentation for reply-timeout attribute:

* spring-integration-jpa-2.2.xsd
* spring-integration-jms-2.2.xsd
* spring-integration-jdbc-2.2.xsd
* spring-integration-ip-2.2.xsd
* spring-integration-http-2.2.xsd

Update the *What's new in Spring Integration 2.2* section in the reference manual

INT-2262 - Code Review

* Update copyright year for affected files
* Update author tags for affected files
2012-07-16 14:37:16 -04:00
Artem Bilan
5bc41bc60b INT-1029: Support for outbound-gateways in chain
XSD refactoring: remove use="required" from 'request-channel' attribute of all 'outbound-gateways'
Tests for all 'outbound-gateways' inside the <chain>
2012-06-07 13:20:56 -04:00
Oleg Zhurakousky
a1e59442d1 INT-2593 Upgrade to Spring WS 2.1.0
Upgrade spring-integration-ws to use Spring WS 2.1.0;
fix the deprecation warning in AbstractWebServiceOutboundGateway.encodeUri(..) method

INT-2593 polishing,
put deprecated code back in to ensure SPR 3.0 compatibility
2012-06-04 18:24:11 -04:00
Gary Russell
95cd202be6 INT-2536 Create 2.2 Schemas
Add 2.2 versions of module schemas.

JMX is already covered by an existing pull request.

INT-2536 Schema Check

Bump version for schema check in
AbstractIntegrationNamespaceHandler.

INT-2536 Remove Schema Versions

Some test config files had 2.1 versioned schemas.
2012-05-04 10:04:01 -04:00
Oleg Zhurakousky
3ef9177248 INT-2475 Fix WS Gateway Result Payload
Fixed the return value of a non-SOAP message to return the extracted result as is, added tests

INT-2475 polishing based on PR comments

INT-2475 added POX tests for DomSource and Document as per PR suggestion
2012-03-27 13:20:21 -04:00
Oleg Zhurakousky
1729af3959 INT-2445 Fix NotWritablePropertyException
Add mapped-request/reply-headers to isEligibleAttribute(..)

Polishing
2012-03-08 14:00:35 -05:00
Gary Russell
f76f63f23a NT-2400 Fix tool:expected-type Classes
* MessageChannel was moved from core to the base package.
* ChannelResolver moved from core to support.
* TcpConnectionInterceptorFactoryChain was incorrect.
2012-01-13 13:21:41 -05:00
Gunnar Hillert
bd3a93d601 INT-2371 - add package-info.java files - XML
See: https://jira.springsource.org/browse/INT-2371

INT-2370 - add package-info.java files - JDBC
Reference: https://jira.springsource.org/browse/INT-2370

Add package-info.java files - Twitter
For reference: https://jira.springsource.org/browse/INT-2383

INT-2386 - add package-info.java files - XMPP
For reference: https://jira.springsource.org/browse/INT-2386

INT-2384 - add package-info.java files - WS
Reference: https://jira.springsource.org/browse/INT-2384

INT-2382 - add package-info.java files - Test
For reference: https://jira.springsource.org/browse/INT-2382
2012-01-05 16:17:18 -05:00
Mark Fisher
267ff634ec Sonar: self-assignment 2011-12-19 16:14:35 -05:00
Mark Fisher
cd499cfc50 added reply-timeout support for WS inbound-gateway 2011-12-19 15:33:00 -05:00
Mark Fisher
8cc1afa27c fixed since version 2011-12-12 15:01:02 -05:00
Gary Russell
c47086de23 INT-2294 Add SoapHeaderMapper Unit Tests
Add a test for empty SOAP headers, and a SOAP header
that contains an attribute and an element.
2011-12-09 14:36:42 -05:00
Mark Fisher
08e2f6df08 INT-2294 fixed null check for soapHeader (nrather than source) 2011-12-09 12:37:24 -05:00
Mark Fisher
6c1454ae3d INT-2238 removing warnings in JavaDoc 2011-11-22 21:48:34 -05:00
Mark Fisher
adf93e5560 HeaderMapper refactoring
INT-2083
added outbound namespace support for XMPP header mapper

INT-2083
added inbound namespace support for XMPP header mapper

INT-2083
polished XMPP inbound/outbound header mappings, added namespace support for AMQP inbound adapter/gateway header mappings

INT-2083
added support and tests for AMQP outbound gateways and adapters

INT-2083
polishing and adding more tests for AMQP support for header mappings

INT-2083
polishing AMQP and XMPP header mappings, generalized headerMapper configuration in IntegrationNamespaceUtils.configureHeaderMapper(..) method

INT-2803
added headermapping support to WS outbound gateways

INT-2803 polishing

INT-2083
refactored SimpleWebServiceOutboundGateway, added full request/reply test

INT-2083
polished MarshallingWebServiceOutboundGateway to add marshalling callback handlers, added test for marshalling call

INT-2083
polishing based on PR comments

INT-2083 interim commit

INT-2083
added RequestReplyHeaderMapper startegy and migrated AMQP Header Mapper to use it

INT-2083
migrated WS and XMPP to use a new RequestReplyHeaderMapper strategy

INT-2083 polishing with PR comments

INT-2083 polishing
removed introspection method, simplified things

INT-2083 polishing based on recent PR comments

INT-2083 interim commit

INT-2083 polishing WS module

INT-2083
refactored to make sure that Soap action header is set within HeaderMapper

INT-2083 polishing
ensured the Soap header is set to default value if not provided

INT-2083 polishing, putting tests back
2011-11-22 17:04:27 -05:00
Mark Fisher
19bad23055 Setters now expect a Map with Expression values 2011-09-29 13:47:11 -04:00
Mark Fisher
8a8d8343a2 fixed test to run in different environments 2011-09-28 07:40:44 -04:00
Mark Fisher
9ce8c7b519 add URI variable Expressions to outbound gateway
parser and schema now support 'uri-variable'

add test for 'uri-variable' sub-elements

updated pom
2011-09-27 12:48:17 -04:00
Mark Fisher
36322eff51 typo in exception message 2011-09-02 10:03:58 -04:00
Mark Fisher
9f59001230 removed deprecated trigger sub-elements non-core 2011-08-31 12:54:22 -04:00
Mark Fisher
7c5603fe83 INT-2092 update schema imports to use 2.1 version 2011-08-31 05:26:02 -04:00
Oleg Zhurakousky
b2c7a45dcf INT-1951, INT-1981 cleaned up the test and changed the template.mf to reflect the lowest version of Spring-WS to be 2.0.0 2011-08-08 17:24:53 -04:00
Oleg Zhurakousky
5afd12a819 INT-1951, INT-1981 refactored WS module to remove dependency on deprecated version of Spring-WS, added validation checks to the Inbound Gateway Parser for 'extract-payload' attribute 2011-08-08 17:21:17 -04:00
Oleg Zhurakousky
fae321bf4b INT-1951, INT-1981 added parametrization to references of SourceExtractor 2011-08-08 10:44:19 -04:00
Mark Fisher
3e71b5a83b INT-2004 added 2.1 versions of all XML schemas and adjusted spring.schemas files accordingly 2011-08-05 11:07:20 -04:00
Oleg Zhurakousky
6510d77170 INT-1911 upgraded WS module to use Spring-WS 2.0.2 2011-05-23 08:18:36 -04:00
Oleg Zhurakousky
dddf29a39d INT-1758 deprecated setPollerMetadata() on AbstractPollingEndpoint 2011-01-21 11:31:04 -05:00
Oleg Zhurakousky
93f6568c9c INT-1758 refactored AbsractPollingEndpoint to remove deopendency on PollerMetadata, fixed tests 2011-01-21 11:06:48 -05:00
Oleg Zhurakousky
27c8d31889 INT-1729 added error-channel suport for WS inbound-gateway 2011-01-10 16:36:05 -05:00
Mark Fisher
f3e854b10c INT-1568 removed the MessageHeaders.PREFIX constant since it's no longer necessary. Also added @ManagedOperation to the IntegrationMBeanExporter's getChannelSendRate(..) method. 2010-11-18 00:03:58 -05:00
Oleg Zhurakousky
1278666ed7 INT-1596, fixed the broken links as well as all warnings 2010-11-09 12:17:45 -05:00
Mark Fisher
2f9f92235c INT-1446 added 'header-mapper' attribute support for non-marshalling WS inbound gateway 2010-10-18 09:20:28 -04:00
Mark Fisher
93c08e6e3e INT-1446 added DefaultSoapHeaderMapper. SimpleWebServiceInboundGateway now delegates to it. 2010-10-18 08:14:49 -04:00
Oleg Zhurakousky
47b1f7ae8e INT-1451, more refactoring 2010-09-25 16:16:34 -04:00
Oleg Zhurakousky
b6e058c59b INT-1263, added more changes and tests related valdating MessageHistory in every module 2010-09-22 18:44:51 -04:00
Oleg Zhurakousky
0d387756b3 INT-1257, changed convinience method to MessageHistory.containsComponent(string), added/modified tests in XML, WS, JMS to validate MessageHistory 2010-09-21 17:21:50 -04:00