2 Replies Latest reply on Nov 2, 2010 8:39 AM by Tim Marks

    Oracle AQ and helloworld_action quickstart

    Tim Marks Newbie

      System consists of jboss-6.0.0.20100216-M2, jbossesb-4.8 and Oracle 10.2g

       

      My first attempt at integrating Oracle Advance Queueing (AQ) led me to the helloworld_action quickstart.

      Of course, I read the directions in oracle-aq/readme.txt (FYI - the directions are not clear; however I found the missing directory paths and jars in the jbossesb-4.8 src code).

      After creating and starting the queues in Oracle...and reading other posts...I was able to deploy the esb without any errors.

      I then modified the client program to call the new queue..and ran it.

      Using the JBoss admin console, I can see the messages are making it to the queue. However, the messages are not making it to oracle.

      (I verified my database settings in jboss-esb.xml were correct). (NOTE - I also have a datasource pointing to the same Oracle database)

       

      Is there another step needed to get the message from JBoss to the database?

      What changes are required (if any) to deployment.xml, jbm-queue-service.xml and jbmq-queue-service.xml?

      In jboss-esb.xml, instead of specifying the database connection settings, is there a way to point to the existing datasource?

      Is anyone using Oracle AQ with JBoss for queue persistence?

       

      Thanks in advance.

       

       

      FYI - here is my jboss-esb.xml

       

      <?xml version = "1.0" encoding = "UTF-8"?>
      <jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">

       

          <providers>
                <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
                      <property name="java.naming.factory.initial"    value="org.jboss.soa.esb.oracle.aq.AQInitialContextFactory"/>
                                      <property name="java.naming.oracle.aq.user"     value="aaaa"/>
                                      <property name="java.naming.oracle.aq.password" value="aaaa"/>
                                      <property name="java.naming.oracle.aq.server"   value="192.168.0.150"/>
                                      <property name="java.naming.oracle.aq.instance" value="myinstance"/>
                                      <property name="java.naming.oracle.aq.schema"   value="aaaa"/>
                                      <property name="java.naming.oracle.aq.port"     value="1521"/>
                                      <property name="java.naming.oracle.aq.driver"   value="thin"/>
                    <jms-bus busid="timquickstartGwChannel">
                        <jms-message-filter dest-type="QUEUE" dest-name="Q_ACTION_REQUEST" />
                    </jms-bus>
                    <jms-bus busid="timquickstartEsbChannel">
                        <jms-message-filter dest-type="QUEUE" dest-name="Q_B" />
                    </jms-bus>

       

                </jms-provider>
            </providers>

       

            <services>

       

              <service category="HelloWorld_ActionESB"
                       name="SimpleListener"
                       description="Hello World" >
                  <listeners>
                      <jms-listener name="JMS-Gateway"
                          busidref="timquickstartGwChannel"
                          is-gateway="true"
                      />
                      <jms-listener name="JMS-ESBListener"
                                    busidref="timquickstartEsbChannel"
                      />
                  </listeners>
                  <actions>
                     <action name="displayAction"
                              class="org.jboss.soa.esb.samples.quickstart.helloworldaction.MyJMSListenerAction"
                              process="displayMessage">
                              <property name="exceptionMethod" value="exceptionHandler"/>
                     </action>
                                 <action name="playAction"
                                              class="org.jboss.soa.esb.samples.quickstart.helloworldaction.MyJMSListenerAction"
                                              process="playWithMessage">

       

                              <property name="exceptionMethod" value="exceptionHandler"/>
                                 </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="quickstart" value="hello_world_action" />
                                                         <queue jndiName="HELLO_WORLD_ACTION" connection-factory="ConnectionFactory">
                                                              <property name="java.naming.factory.initial"    value="org.jboss.soa.esb.oracle.aq.AQInitialContextFactory"/>
      <property name="java.naming.oracle.aq.user"     value="aaaa"/>
      <property name="java.naming.oracle.aq.password" value="aaaa"/>
      <property name="java.naming.oracle.aq.server"   value="192.168.0.150"/>
      <property name="java.naming.oracle.aq.instance" value="myinstance"/>
      <property name="java.naming.oracle.aq.schema"   value="aaaa"/>
      <property name="java.naming.oracle.aq.port"     value="1521"/>
      <property name="java.naming.oracle.aq.driver"   value="thin"/>
                                                         </queue>
                                               </target>
                                         </NotificationList>
                                 </property>
                                      </action>
                  </actions>
              </service>
            </services>

       

      </jbossesb>

        • 1. Re: Oracle AQ and helloworld_action quickstart
          Gilbert Standen Newbie

          Hi Tim,

          I am also working on this (oracle DBA).    I have modified the jboss-esb.xml in the oracleaq directory but I don't understand what is meant by this step in the readme.txt:   "3. Copy the jndi.properties and the jboss-esb.xml in the helloworld_action directory".  Does it mean to copy the jboss-esb.xml that I modified in the oracleaq directory one directory up to the helloworld_action directory?  I tried that and then ran ant deploy from helloworld_action directory but I don't see any messages persisting in the queues.  Thanks for your post btw.

          • 2. Re: Oracle AQ and helloworld_action quickstart
            Tim Marks Newbie

            Gilbert-

            Sounds like we did it the same way.

            In the helloworld_action/oracle-aq directory, modify jboss-esb.xml as needed...then copy it (up one) to the helloworld_action directory.

            (In jbossesb-4.8, there is no jndi.properties in the oracle-aq directory; reading other posts indicated it was not needed.)

             

            Unfortunately, I have yet to get this to work, My service gets deployed without errors; but nothing makes it to the database.

            As a work around, I will use the default jboss queue mechanism, and have my first action write the message to Oracle AQ.

             

            If anyone has successfully used Oracle AQ as a replacement for the JBoss MQ, your words of wisdom would be greatly appreciated!