SpringSource/spring-integration — pull request #699 by garyrussell (2013-01-08 20:37:13+00:00)
Title: INT-2874 Fix JSON/JMS Incompatibility

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

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).