Announcement Announcement Module
No announcement yet.
JMS Consumer with JAXB-MessageListenerAdapter Question Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JMS Consumer with JAXB-MessageListenerAdapter Question

    I have a JMS client and am receiving XML messages. I already have the generated source files from the XSD of the XML file that I will be receiving.

    I am unsure if I should be using the MessageListenerAdapter to convert those XMLS into JAXB Objects as follows. If this is correct, then should the onMessage of com.batch.loa.loaJMSReceiver just deal with OBjectMessages?

    Here is the config.
    <!-- and this is the message listener container -->
    <bean id="jmsContainer" class="org.springframework.jms.listener.DefaultMes sageListenerContainer">
    <property name="connectionFactory" ref="cachingConnectionFactory"/>
    <property name="destination" ref="loaReceiveQueue"/>
    <property name="messageListener" ref="loajmsListener" />
    <!--<property name="concurrentConsumers" value="5" />-->

    <bean id="loajmsListener" class="org.springframework.jms.listener.adapter.Me ssageListenerAdapter">
    <bean class="com.batch.loa.loaJMSReceiver"/>
    <property name="defaultListenerMethod" value="receive"/>
    <property name="messageConverter" ref="jmsMessageConverter"/>


    <bean id="jmsMessageConverter" class=" arshallingMessageConverter">
    <property name="marshaller" ref="marshaller" />
    <property name="unmarshaller" ref="marshaller" />

    <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshalle r">

    <property name="contextPaths">

    Thanks in advance.