Announcement Announcement Module
Collapse
No announcement yet.
Converting TextMessage to DomainObjects... Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Converting TextMessage to DomainObjects...

    Hi -

    Planning to have a pool of MDBs deployed in WebLogic 10.x

    The MDBs will consume messages from MQ via a Foreign JMS setup. The payload to the MDB will be an XML doc sent in a TextMessage. I'm looking for a good way to convert the XML document to a Domain Object representation in a Java class.

    I've been researching the receiveAndConvert method of the JMSTemplate class, but apparently that's only for SYNCHRONOUS receive of JMS messages...

    What are my options in Spring for making use of MessageConverters for Asynchronous communication - how do you deal with converting TextMessages to Java object in your MDBs?! Are there any samples?

  • #2
    Anybody!?

    Could someone give an example on what you do in your MDBs?! I would guess that if there is no support in Spring for this, maybe I just need to delegate to a custom component that knows how to parse it out from XML to Java?!

    Though I'd hate to start developing something that may already be in the framework... a little clarification, please.

    James

    Comment


    • #3
      Originally posted by jdepaul View Post
      Could someone give an example on what you do in your MDBs?! I would guess that if there is no support in Spring for this, maybe I just need to delegate to a custom component that knows how to parse it out from XML to Java?!

      Though I'd hate to start developing something that may already be in the framework... a little clarification, please.

      James
      it might not be wise to use TextMessage especially when the XML file will be using UTF-8 encoding. For such cases IMHO - it's better to use BytesMessage instead.

      As for parsing to and from XML - easy to do with JAXB.

      Comment

      Working...
      X