Announcement Announcement Module
No announcement yet.
JmsTemplate and generics Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JmsTemplate and generics

    I'm a bit unhappy with the API of JmsTemplate and MessageConverter and wanted to ask whether it would be possible to make some changes for Spring 4.0. Basically because MessageConverter is not generic #receiveAndConvert has to do a cast, and #convertAndSend is not type safe. Making MessageConverter generic itself doesn't fix the problem because there can only be one MessageConverter per JmsTemplate. It would have to be passed as an argument so that type propagation works correctly. As this likely will have to wait for Spring 4 which has Java 8 / lambdas as a topic MessageConverter should probably be split into two interfaces (one for sending, one for receiving).

    I asked the same question in the spring-framework-contrib mailing list but got no response. Should I just sumbit a proposal as a pull request?

  • #2
    I would suggest you start by opening an 'Improvement' JIRA issue

    If you are interested in contributing a solution, include a note thereof, with a summary, in the JIRA description.

    The contribution guidelines are here


    • #3
      Ok, will do.