I have a situation where I need to send a message to Tibco Business Connect receiver that only accepts a map in an ObjectMessage form. Is it possible to force the JMS message type to be an ObjectMessage even when my payload is a HashMap?
I have a situation where I need to send a message to Tibco Business Connect receiver that only accepts a map in an ObjectMessage form. Is it possible to force the JMS message type to be an ObjectMessage even when my payload is a HashMap?
You should be able to inject your own MessageConverter implementation that always returns an ObjectMessage. Let me know how it goes.
-Mark
Mark Fisher
Spring Integration Lead
SpringSource, a division of VMware
http://www.springsource.com
http://www.springsource.org/spring-integration
http://blog.springsource.com/main/author/markf
In my message converter, I overrode the toMessage method and performed the Serializable check before delegating back to super. That worked.
That sounds good. So you are still able to support TextMessage and BytesMessage, but you are making sure that you always create an ObjectMessage instead of MapMessage, right?
Out of curiosity, what's the rationale for the ObjectMessage for Maps?
Mark Fisher
Spring Integration Lead
SpringSource, a division of VMware
http://www.springsource.com
http://www.springsource.org/spring-integration
http://blog.springsource.com/main/author/markf