Announcement Announcement Module
Collapse
No announcement yet.
spring jdbc extensions - oracle AQ - Custom ADT - Message Converter returning null Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring jdbc extensions - oracle AQ - Custom ADT - Message Converter returning null

    The application consumes messages from an Oracle AQ. I have configured the application context and included the section of interest below:

    HTML Code:
    <bean id="messageDelegate" class="com.<my_company>.service.SumaAlertMessageDelegate" /> 
         
    	<jms:listener-container connection-factory="sumaAlertJmsConnectionFactory"
    		transaction-manager="transactionManager" message-converter="listenerMessageConverter"
    		container-class="org.springframework.data.jdbc.jms.listener.oracle.AdtMessageListenerContainer">
    		<jms:listener destination="ALERT_FROM_SUMA_TST" ref="messageDelegate" method="handleMessage"/>
    	</jms:listener-container>
        
        <bean id="listenerMessageConverter"
                class="org.springframework.data.jdbc.jms.support.converter.oracle.MappingAdtMessageConverter">
            <constructor-arg>
                <bean class="org.springframework.data.jdbc.jms.support.oracle.StructDatumMapper">
                    <constructor-arg index="0" value="MQUEUE.SUMA_ALERT_TYPE"/>
                    <constructor-arg index="1" value="com.<my_company>.oracle.aq.SUMA_ALERT_TYPE"/>
                </bean>
            </constructor-arg>
        </bean>
    I am able to consume the message from the AQ. But the message converter seems to return null for the custom object. I verified that I am consuming (without the message converter) the message and the type consumed was of type oracle.jms.AQjmsAdtMessage

    The class specified SUMA_ALERT_TYPE implements java.sql.SQLData. Looks like this implementation may be causing a problem. How would I resolve this if I have to use the Message Converter specified? Once I know how to get the content of the SUMA_ALERT_TYPE, I have to then unmarshall the message content and do some further processing with the unmarshalled object.

    The attributes of the SUMA_ALERT_TYPE are - String sql_type, String message.
    While the Oracle AQ queue table consists of a whole bunch of columns one of which is SUMA_ALERT_TYPE.

    Trying to go through documentation of this mapping converter but am not sure I completely follow. Any help is greately appreciated. Without the content of the message I cannot proceed further. Please help!!

    Thanks
    Suraj

  • #2
    Do you remember if you solved the problem? I'm getting null values for the fields which are INTEGER's for others I'm getting proper non-null values.

    Greetings,

    Lukasz

    Comment

    Working...
    X