Commit Graph

9623 Commits

Author SHA1 Message Date
Artem Bilan
4473e565a5 INT-2971: AMPQ 'header-mapper' XSD Polishing
* Change expected type from the `HeaderMapper` to the `AmqpHeaderMapper`
* Add 'header-mapper' mutually exclusivity failing tests
* Change AMQP doc to reference `AmqpHeaderMapper` not `HeaderMapper`

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

INT-2971 Polishing

Polish schema docs; add info about STANDARD_*_HEADERS.
2013-04-09 10:00:11 -04:00
Gary Russell
77c93bc6e5 Merge pull request #737 from ghillert/INT-2916 2013-04-04 13:43:14 -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
Gunnar Hillert
3c98b371fa Merge pull request #754 from garyrussell/INT-2939
* garyrussell-INT-2939:
  INT-2939 Polishing
  INT-2939 LoggingHandler Improvements
2013-04-03 00:14:03 -04:00
Gary Russell
4818d9a722 INT-2939 Polishing
Add assert for non-null Level.
2013-04-03 00:11:17 -04:00
Gary Russell
d54a88f528 INT-2939 LoggingHandler Improvements
- Don't evaluate expression if the log level is not enabled
- Add mutually exclusive assertions (already protected by the parser
  but not for programmatic configuration).

INT-2944 Document <logging-channel-adapter/>

Add reference sub-chapter.

INT-2939 Polishing - PR Comments

- remove unnecessary cast.
- add setter for level changes.

Polishing

* Change setter to use enum.
* Add getter for current level.
* Rename method to 'createLogMessage'.
2013-04-03 00:11:17 -04:00
Gunnar Hillert
93211942cf Merge pull request #777 from garyrussell/INT-2970
* garyrussell-INT-2970:
  INT-2970 Update to Spring-AMQP 1.2.0.M1
2013-04-02 18:08:25 -04:00
Gary Russell
4449595520 INT-2970 Update to Spring-AMQP 1.2.0.M1
Add deprecated constants for message properties no
longer used by Spring-AMQP 1.2 (retain to provide
compatibility with 1.1.x).
2013-04-01 13:08:45 -04:00
Gunnar Hillert
110957f975 Merge pull request #775 from garyrussell/INT-2968
* garyrussell-INT-2968:
  INT-2968 SFTP - Update JSch to 1.49
2013-03-27 23:31:04 -04:00
Gary Russell
3cce459335 INT-2968 SFTP - Update JSch to 1.49
Ran SFTP samples to verify.
2013-03-27 23:29:44 -04:00
Mark Fisher
ea68746665 Merge pull request #773 from garyrussell/INT-2954
# By Gary Russell
* INT-2954:
  INT-2954 (S)FTP Fix AutoCreate Top Level Dir
2013-03-27 17:44:00 -04:00
Gary Russell
274813e04c INT-2954 (S)FTP Fix AutoCreate Top Level Dir
When autocreateDirectory is true, and the top level directory
did not exist, the mkdirs failed because the adapter tried
to create a directory name with a zero length string.

This caused an 'String index out of range: 0' exception in
SFTP.

Stop iteration when 'pathSegment' is zero length.
2013-03-27 17:39:22 -04:00
Mark Fisher
dfe8d07eea Merge pull request #761 from garyrussell/INT-2955
* INT-2955: Fix Collection/Map Conversion
2013-03-27 17:31:12 -04:00
Gary Russell
7ab1361231 INT-2955 Fix Collection/Map Conversion
The fix for INT-2650 (to avoid unnecessary array copying) was
too general in that it also prevented types in collections and
maps from being converted.

Add tests to illustrate that such payloads are not converted.

Change code to only short circuit the conversion process if
the payload is a primitive array.

An existing test ensures that arrays are not copied.

Add more tests to complete coverage - discovered another
bug - the early exit after using a property editor to convert
to a String was never taken - it was testing against the
Class of the TypeConverter instead of the Type. If the
target type is a String, we don't need to perform
conversion after the property editor has done its
conversion.

Fix MessageHistory test (was testing MessageHeaders).
2013-03-27 17:03:33 -04:00
Gunnar Hillert
e003891040 Merge pull request #772 from garyrussell/INT-2959
* garyrussell-INT-2959:
  INT-2959 Correct Schema GW reply-timeout Doc.
2013-03-26 23:50:57 -04:00
Gary Russell
b500ef397b INT-2959 Correct Schema GW reply-timeout Doc.
Incorrectly indicated that an exception is thrown when
the gateway times out.
2013-03-26 23:47:52 -04:00
Gary Russell
e8333ae737 Fix Typo in Reference
s/Adivce/Advice/
2013-03-26 11:48:35 -04:00
Gary Russell
be4416c9bf Merge pull request #767 from ghillert/INT-2960 2013-03-14 15:50:07 -04:00
Gunnar Hillert
26e41c8858 INT-2960 - Remove deprecated 'xpath-selector'
For reference see: https://jira.springsource.org/browse/INT-2960

* Remove 'xpath-selector' from XML Schema
* Remove parser class
* Remove tests
* Remove respective reference documentation
2013-03-14 15:48:20 -04:00
Gunnar Hillert
cd7e0576ed Merge pull request #759 from sobychacko/INT-2531
* sobychacko-INT-2531:
  INT-2531: Remove deprecations in XML Adapter after upgrade to Spring 3.1.1
2013-03-14 13:49:35 -04:00
Soby Chacko
d43bbc8eda INT-2531: Remove deprecations in XML Adapter after upgrade to Spring 3.1.1
* BeanDefinitionParserDelegate constructor now prefers an Environment. Circumvent this
preference by directly getting BeanDefinitionParserDelegate from the associated ParserContext
2013-03-14 13:47:06 -04:00
Gunnar Hillert
0fc21de170 Merge pull request #765 from garyrussell/INT-2957
* garyrussell-INT-2957:
  INT-2957 Remove Unnecessary AspectJ Dependencies
2013-03-14 10:54:19 -04:00
Gary Russell
c9fc15892a INT-2957 Remove Unnecessary AspectJ Dependencies
Core, JDBC, JMX, JPA each had dependencies for both
weaver and rt jars. weaver is a superset of rt.

Remove dependencies on the rt jar.

Further JDBC, JPA have no dependencies on AspectJ.

Finally, the JMX dependency was compile, when only
testCompile is needed.
2013-03-14 10:08:34 -04:00
Gary Russell
a3ff5bc2e7 Merge pull request #764 from artembilan/INT-2958 2013-03-13 12:06:01 -04:00
Artem Bilan
6ae61a3345 INT-2958: XSD: move 'charset' from common attrs
`charset` for `<object-to-string-transformer>` was placed in the common `inputOutputChannelGroup` attributeGroup.
`charset` wasn't available  within `<chain>`.

* Move 'charset' from `inputOutputChannelGroup` to the new `specialized-transformer-charset-aware-type` complexType
* Add test for 'charset' within `<chain>`

JIRA: https://jira.springsource.org/browse/INT-2958
2013-03-13 12:02:09 -04:00
Gary Russell
834974481a Merge pull request #707 from ghillert/INT-2882 2013-03-12 18:45:43 -04:00
Gunnar Hillert
06831b9e22 INT-2882 Upgrade DocBook Reference Plugin to 0.2.6
For reference see: https://jira.springsource.org/browse/INT-2882

* Verify spacing
* Ensure all source code samples are typed: e.g. <programlisting language="xml">
* Ensure source code fits space in PDF format
2013-03-12 18:45:25 -04:00
Gunnar Hillert
35365990f9 Merge pull request #752 from garyrussell/INT-2932
* garyrussell-INT-2932:
  INT-2932 TCP Connection Events - Doc and Polishing
2013-03-08 10:10:57 -05:00
Gary Russell
d059abf4d1 INT-2932 TCP Connection Events - Doc and Polishing
INT-2932
- Reference Documentation

INT-2941
- Add getter for Throwable
- Add auto-startup to Parser, Endpoint (already in schema)
- Add phase to schema, Parser

(Schema changes are mostly indentation because the element now
extends SmartLifecycleType).
2013-03-07 17:26:32 -05:00
Gary Russell
8b476b2d76 Merge pull request #756 from ghillert/INT-2945 2013-03-05 11:32:57 -05:00
Gunnar Hillert
a099eba9a8 INT-2945 - StoredProc isFunction Property Not Set
For reference see: https://jira.springsource.org/browse/INT-2945

* ensure that for StoredProcedure Inbound Channel Adapter the *isFunction* property is set
* add test

INT-2945 - Code Review - Add Tests
2013-03-05 11:31:42 -05:00
Gary Russell
7b6b740cce INT-2950 Use spring-amqp 1.1.4.RELEASE 2013-03-05 11:00:32 -05:00
Gary Russell
139fabed22 Merge pull request #757 from bijukunjummen/patch-1 2013-03-01 11:48:46 -05:00
Biju Kunjummen
0f6589d894 INT-2947 Update gateway.xml With Sample Link
Very minor change - provided a link to the github
location of the async-gateway sample being referred to

Polished to add some line breaks.
2013-03-01 11:46:33 -05:00
Mark Fisher
9efb70f24e Merge pull request #751 from garyrussell/INT-2937
* INT-2937: Fix Race Condition in MGS Reaper
2013-02-25 14:40:11 -05:00
Gary Russell
eb07178381 INT-2937 Fix Race Condition in MGS Reaper
Groups changed within the same millisecond that they
were selected for reaping can cause aggregators to
emit duplicate messages.

Use the re-fetched group (used to see if the timetamp
changed) instead of the group passed in to forceClose
(the group might have changed since it was selected as
eligible for reaping).

We still retain the last modified check because it
might have been expired using timeoutOnIdle.
2013-02-25 14:36:47 -05:00
Mark Fisher
69fcf5b16a Merge pull request #749 from garyrussell/INT-2936
* INT-2936: Fix TCP Binary DeSerialization with NIO
2013-02-25 13:08:55 -05:00
Gary Russell
f48d175e83 INT-2936 Fix TCP Binary DeSerialization with NIO
Inadvertent sign extension on binary data with bit 7 set
causes early termination of binary deserializers.

The ChannelInputStream (which replaced the piped input
and output streams) failed to mask off the top 24 bits
of "normal" bytes received, causing Deserializers to
believe the stream was closed.

Add a mask of 0xff to bytes read.

Add a test case.
2013-02-25 12:57:17 -05:00
Gary Russell
05cd1694c2 INT-2940 Fix Race Condition in TCP Connection Test
Assertion that server side connection was established could
occur after the connection was established, but before it was
added to the collection.

Add a latch.
2013-02-20 10:44:42 -05:00
Spring Buildmaster
b2be9f643b [artifactory-release] Next development version 2013-02-14 14:29:56 -08:00
Spring Buildmaster
382e1096f4 [artifactory-release] Release version 3.0.0.M1 2013-02-14 14:29:40 -08:00
Gary Russell
c1fe62857b Merge pull request #747 from ferstl/INT-2931 2013-02-14 14:35:06 -05:00
Stefan Ferstl
4585699e62 INT-2931 Fix Router Race Condition
AbstractMessageRouter.getRequiredConversionService() and
IntegrationObjectSupport.getConversionService() try to initialize the
conversion service and may be called from multiple threads. There is
a race condition where this could end up in an uninitialized conversion service
causing NPEs in subsequent method calls.

To solve this issue, the conversion service is initialized with
double-checked locking.

For further details see https://jira.springsource.org/browse/INT-2931

INT-2931 Polishing - Add Test Case

Add a test case that reliably reproduces the issue and verifies
the fix.
2013-02-14 14:32:04 -05:00
Gunnar Hillert
bb5bd1169e Merge pull request #743 from garyrussell/INT-2877
* garyrussell-INT-2877:
  INT-2126 Add TcpConnection Event Publisher
2013-02-14 12:48:23 -05:00
Gary Russell
b045e8c2be INT-2126 Add TcpConnection Event Publisher
Reference: https://jira.springsource.org/browse/INT-2126

* Add TcpConnectionEvent for OPEN, CLOSE, EXCEPTION.
* Add Event Type Enum - Provides type safety for event types.
* Add <int-ip:tcp-connection-event-inbound-channel-adapter />
* Add the ability to filter events (restrict to one or more subclasses)
* Add publishEvent() to TcpConnectionSupport to permit, for example, connection interceptors to publish events via the connection, but the event source can only be the connection used to publish the event.
* Add documentation to Reference Documentation section *What's New*

INT-2871 Provide Mechanism to Find TCP Connections
Reference: https://jira.springsource.org/browse/INT-2871

* Add getOpenConnectionIds() to Abstract Connection Factory
* Add closeConnection(String connectionID)
* Introduce removeClosedConnectionsAndReturnOpenConnectionIds

INT-2877 TCP Extension Improvements
Reference: https://jira.springsource.org/browse/INT-2877

* Make improvements to make extension easier.
* Add setCustomHeaders() to mapper.
* Add mapper to connection factory namespace parser.
* Add plumbing for stateful Deserializers.
* Refactor setting standard headers
* rename setCustomHeaders to supplyCustomHeaders - returning a Map and not exposing the MessageBuilder to subclasses

INT-2872 Remove Deprecated Items in ip Module
Reference: https://jira.springsource.org/browse/INT-2872

* pool-size Attribute
* setScheduler
* TcpSendingMessageHandler.getConnection()
* Deprecated attribute on TCP Connection Factory.
2013-02-14 12:05:08 -05:00
Gunnar Hillert
0374b56ee1 Merge pull request #734 from garyrussell/INT-2853
* garyrussell-INT-2853:
  INT-2853 ObjectToStringTransformer Improvements
2013-02-14 11:05:15 -05:00
Gary Russell
83fc5e449a INT-2853 ObjectToStringTransformer Improvements
* Convert byte[] and char[] to String rather than simply using toString().
* Allow the charset to be configured for byte[] payloads.
* Add tests.
* Add reference documentation updates.
2013-02-14 11:02:48 -05:00
Gunnar Hillert
d8dc140b17 Merge pull request #745 from garyrussell/INT-2929
* garyrussell-INT-2929:
  INT-2929 Fix JMX Occasional Failing Tests
2013-02-14 02:10:56 -05:00
Gary Russell
32ccd988a0 INT-2929 Fix JMX Occasional Failing Tests
ExponentialMovingAverageRateTests are VERY sensitive to
timing, when running on a busy platform.

Add code to skip the assertions if we detect we are
running on a slow machine.
2013-02-14 02:08:53 -05:00
Gunnar Hillert
0ab076ee24 Merge pull request #746 from garyrussell/INT-2906
* garyrussell-INT-2906:
  INT-2906 Upgrade Groovy to 2.1.0
2013-02-14 02:04:07 -05:00