Commit Graph

248 Commits

Author SHA1 Message Date
Pid
5212ea13ef INT-3124 Add JMX MBean Tree Inbound Adapter
Add an MBeanTreePollingMessageSource that produces a graph of simple objects representing the JMX tree (INT-3124).

The DefaultMBeanObjectConverter converts MBean objects into a graph of Lists, Maps and arrays or primitives.

Formatting tidy, per feedback.

Feedback incorporated: split setter/attributes, more tests, inner bean constructor, logging changes.

Overloaded setter methods with different parameter types are now named separately, the endpoint attributes reflect this and tests are added to reflect this.

An inner bean can be supplied to provide an alternative MBeanObjectConverter.

Log a warning instead of a more destructive UnsupportedOperationException where there's incomplete parsing in the DefaultMBeanObjectConverter and add a trace level for exception debugging.

Minor test change and doc/reference update

Added attribute filter interface as suggested. Three implementations are provided 'all', 'named only' and 'not named'

actually add notnamedfield filter (doh).

Polishing
2013-09-03 13:06:01 -04:00
Gary Russell
693a1e17a0 INT-3119 Add Documentation Re SpEL Customization
- Custom PropertyAccessors
- Custom Functions

Polishing - PR Comments
2013-09-03 10:15:54 -04:00
Gary Russell
b63768ec32 INT-2995 Fix Leftover Docbook Conflict Marker 2013-08-30 19:05:36 -04:00
Artem Bilan
4609b861d1 INT-2995: Fix HttpHeaders inconsistency
Previously, 'If-Modified-Since' and 'If-Unmodified-Since' HTTP headers were incorrectly processed
within from/to HTTP headers mapping, because Spring-Web `HttpHeaders` has a confusing method name, see:
https://jira.springsource.org/browse/SPR-10600

* fix 'If-Modified-Since' and 'If-Unmodified-Since' processing independently from `HttpHeaders`
* add fallback to formatted string for date ware HTTP headers
* add Spring Integration HTTP proxy scenario test

JIRA: https://jira.springsource.org/browse/INT-2995
2013-08-30 16:28:14 -04:00
Eric Bottard
7dabe1334c Fix Reference Manual Typo 2013-08-29 09:59:27 -04:00
Artem Bilan
afe56ca6d5 INT-2243: Delayer: Add 'expression' Support
Previously, the `<delayer>` provided a `delay-header-name` attribute.
In complex cases there was need to precede it with `<header-enricher>`.

* Add support for an 'expression' attribute and sub-element
* Deprecate `delay-header-name`
* Make `DelayHandler.DelayedMessageWrapper` *public* to allow access for Messages in the Store
* Add tests
* Add 'What's new' section
* Polishing Delayer's doc regarding new abilities

JIRA: https://jira.springsource.org/browse/INT-2243, https://jira.springsource.org/browse/INT-3049

INT-2243: ban delay-header-name with expression

INT-2243 Polishing

INT-2243: fall-back to default on Eval Exception

INT-2243: DelayedMessageWrapper refactoring

* Make `DelayedMessageWrapper` Spring Data Mongo mapping compatible.
In terms of Spring Data - add Persistence Constructor

INT-2243 add 'ignore-expression-failures' support

* Add `ignore-expression-failures` to the `<delayer>`
* Add tests for `ignore-expression-failures`
* Add a note to the RM
* Describe SpEL side-effects for `DelayHandler`

Doc Polishing
2013-08-20 16:54:42 -04:00
Gary Russell
573c692957 INT-2994 Advice Chain Config via Annotations
Allow configuration of request handler advice chain using

- ServiceActivator
- Filter
- Splitter
- Transformer

annotations.

Also, with splitter, allow setting discardWithinAdvice (See
INT-2938).

INT-2994 Polishing: PR Comments

- Change adviceChain attribute to an array
- Use a boolean for the discardWithinAdvice attribute

INT-2994 Handler Advice Doc Polishing

Add a paragraph about Advice Order.
2013-08-20 12:10:25 -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
Gary Russell
28943357f4 INT-2901 Add Namespace Prefix
Avoid confusion with the core header enricher.
2013-08-18 23:15:19 -04:00
Gary Russell
d5b607a396 INT-2901 Fix Mail HeaderEnricher Doc
The move from attributes to child elements was not reflected
in the reference manual.
2013-08-18 14:47:51 -04:00
Artem Bilan
41fe514469 INT-3067 Xslt method=text StringResult coercion
Previously there was a need to add `result-type="StringResult"`
to <int-xml:xslt-transformer> for xslt output `method='text'`
in case payload was non-standard type (e.g. `File`), if we wanted to get
result as text.

* Add coercion to `StringResult` code, if `Transformer`'s property `method` is 'text' and there is no explicit `resultFactory` provided.
* Add documentation to reference manual

JIRA: https://jira.springsource.org/browse/INT-3067
2013-08-17 13:17:08 -04:00
Gary Russell
0699fdc6cf INT-1807 Add Mechanism For Headers with TCP
TCP streams have no standard message structure. Therefore, the
TCP implementation previously only transferred the message
payload.

If someone wanted to convey header information, they would have
to write their own wrapper and/or use Java serialization for
the entire message.

This change provides a strategy to allow users to determine
which headers are transferred, and how.

A MessageConvertingMessageMapper is now provided that invokes
any MessageConverter. A MapMessageConverter is provided that
converts the payload, and selected heades to a Map with two
entries ("payload") and ("headers").

A MapJsonSerializer is provided that converts a Map to/from
JSON. Jackson can't delimit multiple objects in a stream
so another serializer is required to encode/decode structure.
A ByteArrayLfSerializer is used by default, inserting a
linefeed between JSON objects.

The combination of these elements now allows header
information to be transferred over TCP. Of course, users
can implment their own (de)serializer to format the
bits on the wire exactly as needed by their application.

INT-1807 Polishing

Add a test that uses a Map MessageConverter with a
Java (de)serializer.

INT-1807: Polishing

INT-1807: Rebased and polished

Change `MapJsonSerializer` to use `JsonObjectMapper` abstraction

Doc Polishing
2013-08-16 16:54:00 -04:00
Gary Russell
4832130ef2 INT-3082 (S)FTP Remove Deprecated 'cache-sessions'
The 'cache-sessions' attribute was deprecated in 2.1 in favor
of using a configured CachingConnectionFactory to provide more
flexibility, such as setting the cache size.

Remove the attribute from the schemas.

Update tests.

Add docs.

Update Migration Guide on the project Wiki.
2013-08-16 13:12:46 -04:00
Gary Russell
77bdbed9a7 INT-3064 Change MessageHeaders.Id Strategy
Use `com.eaio.uuid` by default and document how to replace
the default strategy.

Provide JDK and a simple incrementing incrementing implementation.

Add code to detect multiple contexts in the same classloaded using
the same strategy.

Add code to detect multiple IdGenerator beans and emit a WARN
instead of DEBUG, which is the case for no beans.
2013-08-15 16:11:18 -04:00
Gary Russell
93aa1f5cd4 INT-3090 Document File IGNORE and Temporary File
IGNORE applies to the temporary and final file names.
2013-08-14 18:17:57 -04:00
Gary Russell
5cbdfe9e43 INT-3099 Add IMAP Idle Application Events
Allow an application to be informed of problems on the IMAP idle
thread by emitting an event containing the exception.

Introduce IntegrationApplicationEvent hierarchy for all
events emitted by SI components.

INT-3099 Polishing (PR Comments)

Separate TCP events into discrete subclasses.
2013-08-14 17:42:57 -04:00
Gary Russell
754273b0a0 INT-3102 Document File DirectoryScanner Limitation
Must be prototype if used in multiple places.
2013-08-14 17:31:48 -04:00
Gary Russell
54e24ce97d INT-3030 Add Error Channel to RMI Inbound Gateway
INT-3030 Polishing; Docs, Tests

Add test cases for error channel support.

Dynamically discover available RMI port.

Add What's New and `<important/>` to reference.
2013-08-13 17:56:57 -04:00
Michael Bannister
ef3feb687b INT-3105 Add 'task-executor' to JMS MDCA
Add task-attribute to int-jms:message-driven-channel-adapter.

Polishing

Fix white space; add author tags; use class name in parser.
2013-08-12 17:16:26 -04:00
Gary Russell
9f3eba1f0a INT-3061 Update Reference Copyright 2013-08-07 18:55:45 -04:00
Artem Bilan
7d96dc7969 INT-2865: Stored Procedure SqlReturnType support
JIRA: https://jira.springsource.org/browse/INT-2865
2013-07-15 00:35:53 -04:00
Gary Russell
d1d367a97f INT-2938 Filter - Provide Option for Discard
Provide an option to determine whether or not the discard
(and exception throwing if configured) occurs within the
advice chain (default), or after it completes.

INT-2938 Filter Discard Advice Option - Schema

Schema, parser, tests for option on filter element.

INT-2938 Polishing - PR Comments + Doc

INT-2938 Add to "What's New"

INT-2938 Polishing - Javadoc Typo

while merging: simplified to use boolean var only
2013-05-23 12:07:26 -04:00
Gary Russell
fe3e4a26db INT-3026 Header Enrichment Using Gateways
Add link to wiki page to reference doc.
2013-05-21 14:53:47 -04:00
Artem Bilan
ecf15a9834 INT-2755: Support 'id' For <chain> Child Elements
* Introduce XSD 'id' attribute for all `<chain>` sub-components
* Register `<chain>` sub-components as Beans with names based on `<chain>` 'id'
* Generate aliases for sub-components based on element 'id'
* Add `<chain>` parser test to check sub-components as Beans within `BeanFactory`
* Ignore `NestedChainParserTests` as abnormal and confused for SI-configs
* Now `<chain>` sub-components are trackable by `MessageHistory`
* Now `<chain>` sub-components are eligible for JMX export
* Polishing some failed tests

https://jira.springsource.org/browse/INT-2755
https://jira.springsource.org/browse/INT-2321

INT-2755: Register as Beans only if 'id' provided

INT-2755: Set 'componentName' for handlers with 'id'

When components within `<chain>` are configured with an 'id' attribute
the 'componentName' of the handler is  constructed as:
chainHandler.componentName + '.' + handler.componentName.
Otherwise it is as was before.

INT-2755: Polishing

INT-2755: changes according PR's comments

* Add INFO about preference of `id` attribute for `<chain>` in the `ChainParser`
* Change `<chain>`'s sub-components `id` generation algorithm
* Configure `<chain>`'s sub-component `componentName` in the `ChainParser` instead of in the `MessageHandlerChain`
* Add `componentName` property to the `JpaOutboundGatewayFactoryBean`
* Add a note to the Reference Manual

INT-2755: Localize duplicate 'id' within chain

INT-2755: remove child beans aliasing

* Polishing tests
* Polishing docs

INT-2755 Polishing: Handle Nested Chain Bean Names

Previously named beans within a nested chain did not get unique
bean names.

INT-2755: Polishing nested chains

Doc Polishing
2013-05-21 12:26:27 -04:00
Gary Russell
f2fef2a7e9 INT-2855 File Tailing Inbound Channel Adapter
Two implementations:

  - native 'tail' command (e.g. tail -F -n 0 /foo/bar)
  - Apache commons-io Tailer

Further changes:

 - Add documentation to section "what's new"
 - Add a JUnit @Rule so the OSDFTMP test doesn't fail on Windows
2013-05-20 11:16:00 -04:00
Gary Russell
81bfaeb8a9 INT-3002 Fix Content-Type Mapping
https://jira.springsource.org/browse/INT-3002

The AMQP outbound endpoint behaves differently when configured
as a gateway compared to when it is configured an adapter.

With the adapter, the header mapper is invoked after the message
converter (via the MPP callback).

With the gateway, the mapper is invoked before the converter.

The SimpleMessageConverter unconditionally sets the content-type,
overriding any mapped content type.

Change the code to invoke the header mapper after the converter
to match the adapter logic.

Remove the TODO. The method now exists, but Using a MPP in the
gateway case does not provide access to headers on the reply.

Add test cases.
2013-05-07 13:24:57 -04:00
Artem Bilan
bb77f508ec INT-2455: Support HTTP Outbound 'encode-uri' Flag
The `<http:outbound-channel-adapter>` and `<http:outbound-gateway>` now provide
an `encode-uri` option that controls whether the request uri is encoded
(default `true`).

It can be useful in some scenarios with a non standard URL, e.g. RabbitMQ REST API:
'http://foo.RabbitMQ.com/api/queues/%2f/bar.queue' where we must not
encode the '%'.

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

INT-2455: Polishing based on PR comments

INT-2455: 'encode-uri' in the Reference Manual
2013-04-30 11:48:53 -04:00
Artem Bilan
a103e43c6a INT-2831: Add Jackson 2 support
Add Jackson 2 support while retaining backward compatibility as much as possible.

Introduce a new abstraction for JSON conversion.

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

INT-2831: Polishing

* remove `JsonObjectMapperFactoryBean`
* add @Deprecated constructors to `ObjectToJsonTransformer` and `JsonToObjectTransformer`

Polishing

Docs, compiler warnings.
2013-04-30 09:33:19 -04:00
Gunnar Hillert
88165c8881 INT-2980 Jdbc Message Store: Polling Wrong Message
* Add Join to JDBC Query
* Add MySql-specific tests
* INT-2987 - MessageStore MySQL - Support Fractional Seconds
  - Update MySql Connector version to 5.1.24
  - Add DDL scripts for MySql versions 5.6.4 and higher

INT-2980 - Check also for Regions

* Add test

INT-2980/INT-2987 - Add Documentation

INT-2980 - Doc: Add info to What's New Section
2013-04-24 11:21:21 -04:00
Gary Russell
14a7953ff6 INT-2892 Add 'local-filter' to (S)FTP Adapters
Allow the replacement of the default AcceptOnceFileListFilter.
2013-04-24 00:11:28 -04:00
Gary Russell
7908655883 INT-2982 Add Syslog Inbound Channel Adapter
* Supports UDP/TCP syslog messages.
* See docbook patch for more information.

For reference see: https://jira.springsource.org/browse/INT-2982
2013-04-23 23:36:36 -04:00
Gary Russell
c224d445ac INT-2981 - Add Rename (mv) to (S)FTP Gateway
* (S)FTP Change Commands, Options to Enums
* INT-2981 Add Support For 'mv' To File/Remote/GW
* INT-2981 (S)FTP Namespace Support and Docs
* INT-2981 Create Remote Dirs if Needed
* INT-2981 Add 'mv' Command to What's New
* INT-2981 Polishing - PR Comments
* Add javadocs to enums.
* Polish schemas to use an enumerated type for available gateway commands
2013-04-16 16:26:29 -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
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
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
Gary Russell
e8333ae737 Fix Typo in Reference
s/Adivce/Advice/
2013-03-26 11:48:35 -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
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
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
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
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
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
Artem Bilan
8c07856fa1 INT-2899: Remove Redundant Logic from Aggregator
Previously, `AggregatingMessageHandler#setExpireGroupsUponCompletion` had additional logic
for removing complete MessageGroups. It could produce some overhead on application start-up with big persistent `MessageStore`.
This logic played a role to remove empty groups from a `MessageStore`.
Since `AbstractCorrelatingMessageHandler#forceComplete` has an ability to to remove empty groups too,
this logic became redundant.
So, to clean `MessageStore` from empty complete groups, it's sufficient to use a `MessageGroupStoreReaper`.

* Remove logic iterating over the `MessageStore` from `AggregatingMessageHandler#setExpireGroupsUponCompletion`
* Polishing `AggregatorSupportedUseCasesTests.java` to use `store.expireMessageGroups(0)`
* Introduce `empty-group-min-timeout` xml-attribute, populating `AbstractCorrelatingMessageHandler#minimumTimeoutForEmptyGroups`
* Add parser tests for `empty-group-min-timeout` attribute

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

INT-2899: Documentation about changes of ACMH

* rename new XSD-attribute to `empty-group-min-timeout`
* add to Reference Manual description about `empty-group-min-timeout`
* add 'What's new' for `empty-group-min-timeout`
* add 2.2-3.0 Migration Guide note

INT-2899 Doc Polishing
2013-02-12 14:27:31 -05:00
Gunnar Hillert
731b338c84 INT-2728 Stored Proc Fix Missing Schema Attribute
INT-2728 - Stored Proc - Add 'return-value-required' attribute

* For Stored Procedure Inbound Channel Adapter: Add 'return-value-required' attribute
* Add tests

For reference: https://jira.springsource.org/browse/INT-2728

INT-2878 Polishing

Add a default false assertion to the parser tests.
2013-02-12 11:51:52 -05:00
Artem Bilan
77fae8844a INT-2888 Fix MapToObjectTransformerParser CL Issue
In the parent-child environment configuration that relies on class names may produce
a `ClassNotFoundException`.

* remove usage of `ClassLoader` in the `MapToObjectTransformerParser` and allow to use the `ConversionService` from application context
* remove deprecation from `MapToObjectTransformer`
* refactor `MapToObjectTransformer` to use `IntegrationObjectSupport#getConversionService()`
* remove fallback to the `beanFactory#getConversionService()` in the `ExpressionUtils`

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

INT-2928: Do Not Fallback to BF's ConversionService

* Polishing according PR's comments
* Important note about `conversionService` & `integrationConversionService` beans
* Link a JIRA about elimination of `BeanFactory`'s `ConversionService` usage
* Add a note to the 2.2-3.0 Migration Guide

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

INT-2888 Doc Polishing
2013-02-12 10:51:36 -05:00
Gunnar Hillert
208d022ca6 INT-2769 Document Filename Generation Options
INT-2769 - Document filename-generator + filename-generator-expression

For reference see: https://jira.springsource.org/browse/INT-2769

INT-2769 Polishing
2013-02-11 11:17:17 -05:00
Gary Russell
8fd5995f78 INT-2923 3.0 Reference Changes
Move 2.2. "What's New" to Change History Appendix.
2013-02-07 16:39:33 -05:00
Gary Russell
88782b8a34 INT-2921 Add 2013 to Reference Manual Copyright 2013-02-06 18:30:52 -05:00
Gary Russell
86d6d970d1 INT-2682 JMS GW - Support Expression for replyDest
Currently supports destination and destination name.

* Add support for replyDestinationExpression.
* Add Docs for JMS Outbound Gateway Attributes.
* Change method name for consistency.
2013-02-05 09:48:35 -05:00
Gary Russell
3902c96a20 INT-2874 Fix JSON/JMS Incompatibility
2.2.0 changed ObjectToJsonTransformr to add content-type to
simplify AMQP applications.

However, in a JMS environment, the DefaultJmsHeaderMapper attempted
to map (and failed) to map the header, emitting a warning log entry.

JMS does not allow '-' in property names.

Add code such that:

1. If the ObjectToJsonTransformer is configured to use a
content-type of an empty String (after trimming), suppress the
addition of the header to the output message. For consistency, if
the inbound message already has a content type header, and the transformer
is configured with an empty String, remove the header.

2. Change the DefaultJmsHeaderMapper to map the MessageHeaders.CONTENT_TYPE
header (content-type) to/from a JMS compliant property name (content_type).

INT-2874 PR Comments

Move constant to JmsHeaderMapper interface and rename.

Fix failing test (explicit set content-type to "").

INT-2874 Documentation Updates

Add docbook and schema documentation clarifying the behavior
of the transformer with respect to setting the `content-type`
header.

INT-2874 Polishing - Remove Header Removal

After further discussion, we decided to not remove an
existing header, if 'content-type' is set to "".

This is because there was no way to handle the case of
NOT adding a header when none present, while retaining a
header if it was already present.

added test for empty content-type attrib and no existing header (while merging)
2013-01-23 13:00:42 -05:00