Spring JMS and Oracle AQ

Has anyone gotten Spring JMS to work with 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-with-oracle-aq/

but I get this error now JMS-137: factory payload should be specified for recipients with ADT payloads

Any help with this is much appreciated

Thanks Damien

+3
source share
3 answers

, , factory, , . . - XMLTYPE, factory:

queueReceiver = ((AQjmsSession) queueSession).
   createReceiver(queue, XMLType.getORADataFactory());
+3

JDBC, AnyDataType .

, , OracleAqDestinationFactoryBean.getObject.

Oracle LCR, XMLType, 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);
}

, AnyDataType OCI JDBC, .

http://download.oracle.com/docs/cd/B19306_01/server.102/b14257/aq_stage.htm#sthref2705

+1

Here's how you can solve this if using Spring: http://blog.javaforge.net/post/30858904340/oracle-advanced-queuing-spring-custom-types

In a springless environment, just create your own message consumer, as described in the blog post above.

0
source

Source: https://habr.com/ru/post/1780446/


All Articles