-
15. Re: Oracle AQ and JBoss ESB
tschungelbuch Oct 16, 2008 3:59 AM (in response to tschungelbuch)Then it seems you have a wrong or outdated aqapi13.jar.
File Dates in mine is Sun Feb 17 07:24:30 CET 2008.
Kind regards
Tschungelbuch -
16. Re: Oracle AQ and JBoss ESB
sm0k3rz Oct 16, 2008 6:33 AM (in response to tschungelbuch)Ok , thanks to all,
It's a version problem...
Now i'm starting to play with Oracle ----> Esb -
17. Re: Oracle AQ and JBoss ESB
sm0k3rz Oct 16, 2008 10:18 AM (in response to tschungelbuch)Hi, to all.. now it semms that comuniction betwen Oracle and Esb is ok..
but there's a proble on message's payload that cause jms-108 error:
JMS-108: ObjectMessage not permitted with payload 's type SYS.AQ$_JMS_TEXT_MESSAGE.
The ESb JMS driver wich type of payload need for dequeeng? -
18. Re: Oracle AQ and JBoss ESB
tschungelbuch Oct 16, 2008 12:36 PM (in response to tschungelbuch)You can only use sys.aq$_jms_message with the esb.
See sample below, which works for me:DECLARE text VARCHAR2(32767); AGENT sys.aq$_agent := sys.aq$_agent(' ', NULL, 0); mt sys.aq$_jms_text_message; message sys.aq$_jms_message; enqueue_options dbms_aq.enqueue_options_t; message_properties dbms_aq.message_properties_t; msgid RAW(16); BEGIN mt := sys.aq$_jms_text_message.construct; text := CONCAT (text, 'Create the report!'); mt.set_text(text); message := sys.aq$_jms_message.construct(mt); message.set_replyto(AGENT); message.set_type('whatevertype'); message.set_userid('whateveruser'); message.set_appid('plsql_enq'); message.set_groupid('st'); message.set_groupseq(1); message.set_boolean_property('import', TRUE); message.set_string_property('color', 'RED'); message.set_string_property('ReportType', '820'); message.set_short_property('year', 1999); message.set_long_property('mileage', 300000); message.set_double_property('price', 16999.99); message.set_byte_property('password', 127); dbms_aq.enqueue ( queue_name => 'action_request', enqueue_options => enqueue_options, message_properties => message_properties, payload => message, msgid => msgid ) ; END; /
-
19. Re: Oracle AQ and JBoss ESB
sm0k3rz Oct 17, 2008 10:58 AM (in response to tschungelbuch)Dear tschungelbuch,
can you send me the jboss-esb.xml so i can check what wrong in my configuration...
for insert message i use this script...DECLARE enqueue_options DBMS_AQ.enqueue_options_t; message_properties DBMS_AQ.message_properties_t; message_handle RAW(16); MESSAGE SYS.aq$_jms_message; BEGIN MESSAGE := SYS.aq$_jms_message.construct(0); MESSAGE.set_text('Hello'); MESSAGE.set_userid('Userid_if_reqd'); MESSAGE.set_string_property('JMS_OracleDeliveryMode', 2); DBMS_AQ.enqueue(queue_name => 'action_request', enqueue_options => enqueue_options, message_properties => message_properties, payload => MESSAGE, msgid => message_handle); COMMIT; END;
My oracle version is 9.2.0.7.
Thanks. -
20. Re: Oracle AQ and JBoss ESB
tschungelbuch Oct 20, 2008 9:11 AM (in response to tschungelbuch)This is the provider definition part:
<jms-provider name ="JBossOracleQ" connection-factory ="QueueConnectionFactory" jndi-context-factory ="org.jboss.soa.esb.oracle.aq.AQInitialContextFactory"> <property name="java.naming.factory.initial" value="org.jboss.soa.esb.oracle.aq.AQInitialContextFactory"/> <property name="java.naming.oracle.aq.user" value="${STX_AQ_USER}"/> <property name="java.naming.oracle.aq.password" value="${STX_AQ_PASSWORD}"/> <property name="java.naming.oracle.aq.server" value="${STX_AQ_SERVER}"/> <property name="java.naming.oracle.aq.instance" value="${STX_AQ_INSTANCE}"/> <property name="java.naming.oracle.aq.schema" value="${STX_AQ_SCHEMA}"/> <property name="java.naming.oracle.aq.port" value="${STX_AQ_PORT}"/> <property name="java.naming.oracle.aq.driver" value="${STX_AQ_DRIVER}"/> <jms-bus busid="oracle.aq.in.xmt1stx"> <jms-message-filter dest-type="QUEUE" dest-name="oracle_2_esb" /> </jms-bus> <jms-bus busid="oracle.aq.out.xmt1stx"> <jms-message-filter dest-type="QUEUE" dest-name="B" /> </jms-bus> </jms-provider>
and this is the service part:<service category = "Oracle.Aq.c.xmt1stx" name = "Oracle.Aq.s.xmt1stx" description = "Service Listener to receive jms messages from oracle aq" > <listeners> <jms-listener name = "oracle_aq_in.xmt1stx" busidref = "oracle.aq.in.xmt1stx" maxThreads = "1" is-gateway = "true" /> <jms-listener name = "oracle_aq_out.xmt1stx" busidref = "oracle.aq.out.xmt1stx" maxThreads = "1" /> </listeners> <actions mep="OneWay"> <action name ="displayAction" class ="com.gscf.common.oracle.aq.OracleAqHandler" process ="displayMessage"> <property name="exceptionMethod" value="exceptionHandler"/> </action> <action name ="workAction" class ="com.gscf.common.oracle.aq.OracleAqHandler" process ="workWithMessage"> <property name="exceptionMethod" value="exceptionHandler"/> <property name="M-820-IGF-Category" value="M-820-IGF.c.xmt1stx" /> <property name="M-820-IGF-Service" value="M-820-IGF.s.xmt1stx" /> </action> <action name = "notificationAction" class = "org.jboss.soa.esb.actions.Notifier"> <property name="okMethod" value="notifyOK" /> <property name="notification-details"> <NotificationList type="OK"> <target class="NotifyConsole" /> <target class="NotifyQueues"> <messageProp name="oracle.aq.response" value="esb_2_oracle" /> <queue jndiName = "ESB_2_ORACLE" connection-factory = "QueueConnectionFactory" jndi-context-factory = "org.jboss.soa.esb.oracle.aq.AQInitialContextFactory"> <property name="java.naming.factory.initial" value="org.jboss.soa.esb.oracle.aq.AQInitialContextFactory"/> <property name = "java.naming.oracle.aq.user" value = "${STX_AQ_USER}"/> <property name = "java.naming.oracle.aq.password" value = "${STX_AQ_PASSWORD}"/> <property name = "java.naming.oracle.aq.server" value = "${STX_AQ_SERVER}"/> <property name = "java.naming.oracle.aq.instance" value = "${STX_AQ_INSTANCE}"/> <property name = "java.naming.oracle.aq.schema" value = "${STX_AQ_SCHEMA}"/> <property name = "java.naming.oracle.aq.port" value = "${STX_AQ_PORT}"/> <property name = "java.naming.oracle.aq.driver" value = "${STX_AQ_DRIVER}"/> </queue> </target> </NotificationList> </property> </action> </actions> </service>
-
21. Re: Oracle AQ and JBoss ESB
sm0k3rz Oct 22, 2008 8:37 AM (in response to tschungelbuch)Now it work..
Thanks to all!!!
Regard.