Has anyone got Spring JMS to work with an Oracle AQ queue?
I am trying to connect to AQ based on this article http://blog.nominet.org.uk/tech/2007/10/04/spring-jms-w
You have to supply a JDBC type map when you want to en-queue or de-queue AnyDataType or User Defined Payloads.
The best place to do it, in the Link you have posted will be in OracleAqDestinationFactoryBean.getObject.
In my case, I wanted to de-queue Oracle LCRs which are of XMLType , so I had to do the following in the getObject
public Object getObject() throws Exception {
QueueConnection queueConnection = connectionFactory.createQueueConnection();
AQjmsSession session = (AQjmsSession) queueConnection.createQueueSession(true,
Session.SESSION_TRANSACTED);
Map map = session.getTypeMap();
map.put("SYS.XMLTYPE", Class.forName("oracle.xdb.XMLTypeFactory"));
return session.getQueue(queueUser, queueName);
}
Remember for AnyDataType Payload you have to use OCI JDBC driver, as the thin driver won't do.
More info on custom payload here http://download.oracle.com/docs/cd/B19306_01/server.102/b14257/aq_stage.htm#sthref2705