Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sachin-handiekar/1337883 to your computer and use it in GitHub Desktop.
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
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