Created
November 3, 2011 21:45
-
-
Save sachin-handiekar/1337883 to your computer and use it in GitHub Desktop.
A custom Oracle AQ MessageListener Container (XML Type payload) for Spring JMS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sachinhandiekar.oracle.aq; | |
import javax.jms.Destination; | |
import javax.jms.JMSException; | |
import javax.jms.MessageConsumer; | |
import javax.jms.Session; | |
import oracle.jms.AQjmsSession; | |
import oracle.xdb.XMLType; | |
import org.springframework.jms.listener.DefaultMessageListenerContainer; | |
public class OracleXMLMessageListenerContainer extends DefaultMessageListenerContainer { | |
protected MessageConsumer createConsumer(Session session, Destination destination) throws JMSException { | |
return ((AQjmsSession) session).createConsumer(destination, null, XMLType.getORADataFactory(), null, false); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment