14 Replies Latest reply: Oct 5, 2013 10:03 PM by ParthD RSS

    Use ODI with JMS Queue

      I'm new user in ODI and also JMS. I successfuly use odi to integrate data from two oracle database applications. I'm trying to integrate applications using JMS Queues (or Topics) and I failed to create odi "data server" for this technology. Can someone help me to do this or give me a sample to follow it?
        • 1. Re: Use ODI with JMS Queue
          Christophe Dupupet-Oracle
          The first element will be to make sure that you have all the necessary JMS drivers (usually a series of JAR files) in the oracledi/drivers directory. These are usually provided by the ESB vendor.
          The second thing to consider here is the type of message format you receive in the queue (or topic). Most configurations use an XML format for the messages, but others use a structure similar to that of a flat file. This will tell you if you want to use the JMS XML technology or the JMS technology.
          The next step is that you usually want to use LDAP to authenticate to your ESB. The parameters for that will be in the "JNDI" folder. If you are using an XML structure for the messages, you will have to specify a dtd file to describe the format:
          example of JNDI parameters:
          - JNDI protocol: LDAP
          - JNDI driver: com.sun.jndi.ldap.LdapCtxFactory
          - JNDI URL: ldap://terminus/dc=myname?d=../demo/xml/GEO_DIM.dtd&s=GEO where GEO is the name of the internal schema that will be created by ODI. This is an optional parameter though.
          Please note that not all ESBs require the same parameters though, you might want to check with your ESB documentation as well.

          Best regards

          • 2. Re: Use ODI with JMS Queue
            Thanks Chris for information. but i'm trying to use standard jms drivers... i create a sample java application posting messages (xml flat text) in jms queues and consuming these messages using Message Driven Beans. I deploy this application on Oracle Application Server and it works as needed. My goal now is to connect ODI as consumer that subscribe to jms queue, extract message, transform this message and then repost it to the jms queue. Which driver do you think is needed for this please ?
            • 3. Re: Use ODI with JMS Queue
              Hi there,
              You can actually create 2 different types of connections to a JMS Queue or Topic. Flat or XML. The simplest to start with is flat. This will basically cause ODI to view the contents of the queue as simple flat file data. Note, this is a bit advanced use of ODI, so I would perhaps go through connecting to an RDBMS first before walking through this. It will make more sense.

              To set this up, you will need to:
              1. Copy the necessary client files from OC4J, place them in the <ODI_HOME>/oracledi/drivers directory and restart ODI. The files you need are:
              - <OC4J_HOME>/j2ee/home/oc4jclient.jar
              - <OC4J_HOME>/j2ee/home/lib/javax77.jar
              - <OC4J_HOME>/j2ee/home/lib/jta.jar
              Sop copy those files and restart ODI.

              2. Create a physical connection (Topology Application/Physical Architecture/Technologies -> right click JMS Queues and select "Insert Data Server")
              3. In the Description tab, simpl fill in the Name field.
              4. In the JNDI tab , fille in the following:
              - JNDI Authentication - Simple
              - JNDI User: application user - this is the equivalent of javax.naming.Context.SECURITY_PRINCIPAL
              - Password: application password - this is the equivalent of javax.naming.Context.SECURITY_CREDENTIALS
              - JNDI Driver: This is the equivalent of javax.naming.Context.INITIAL_CONTEXT_FACTORY, so enter com.evermind.server.rmi.RMIInitialContextFactory
              - JNDI Url: This is the equivalent of javax.naming.Context.PROVIDER_URL, so put in ormi://<hostname>[:<port>]/<application>. For instance, with the basic OC4J install, I put in ormi://localhost/default.
              - JNDI Resource: This is the JNDI lookup key for your Queue Connection factory. For example, for the default OC4J installation, I put in jms/QueueConnectionFactory
              5. Click the Test button and click OK in the window that pops up. You should get a message box saying that your connection was successful.
              6. Click Apply or OK and a new window will pop up. In this window, go to the Context tab and click the Add button and in the row that appears, click on the right most field (it says <Undefined> and replace <undefined> with a logical name for your connection. Hit Enter and click OK)
              7. You've now connected to the Queue, to create the Queue object in ODI, go to the Designer window, go to models and create a new model.
              8. Set the name to whatever makes sense to you. Set the technology to JMS Queue and the Logical Schema to the logical connection name you created in step 6. In the Reverse tab, select Global from the Context dropdown menu.
              9. Click OK. You now have a container for any Queues that are in this connection.
              10. To point to the queue, right click your new model and select Insert Datastore.
              11. In the new window, name your datastore whatever you'd like. Set the resource name to the JNDI resource name for the queue (for example, with the default OC4J configuration, you could set this to jms/demoQueue.
              12. In the Files tab, set the File Format to fixed, and set the record separator to Windows or Unix (it doesn't really matter which one you pick)
              13. In the Columns tab, click the add button to add a column. Name the column something like DATA and set is to a String of size 1000.
              14. Click OK. You'll now be able to right click this new datastore and view data, granted in a very simple format. You can create a more complex flat file structure if you' like but this gives you a quick and easy to view the contents of the queue.

              I'd suggest trying to connect this way, post if you were successful and I will then post how to connect to an XML structured queue (it's a little teenie bit different)
              • 4. Re: Use ODI with JMS Queue
                Hi Nick,

                Thanks for your help, it works very well. Is it possible to have more information about Xml Queues?

                Another question if is possible, how can i configure ODI to automatically process message as done by Message Driven Bean?
                • 5. Re: Use ODI with JMS Queue

                  I followed the steps given but i am gettin the followin error

                  java.sql.SQLException: Cannot load connection class because of underlying exception: 'javax.jms.JMSException: Cannot find the Connection Factory (jms/QueueConnectionFactory) in JNDI'.

                  the values i specified are

                  JNDI driver : com.evermind.server.rmi.RMIInitialContextFactory
                  JNDI url : ormi://localhost/default
                  JNDI resource : jms/QueueConnectionFactory
                  • 6. Re: Use ODI with JMS Queue
                    go in the Enterprise manager in OC4J and check in the administration tab and specially in JNDI that jms/QueueConnectionFactory exists. If not create it.
                    • 7. Re: Use ODI with JMS Queue
                      I am getting following error while creater dataserver.
                      java.sql.SQLException: Cannot load connection class because of underlying exception: 'javax.jms.JMSException: Cannot create the initial JNDI context (detail : javax.naming.NoInitialContextException: Cannot instantiate class: com.sunopsis.networkctx.NetworkInitCtxFactory [Root exception is java.lang.ClassNotFoundException: com.sunopsis.networkctx.NetworkInitCtxFactory])'.

                      I am using following parameter
                      JNDI Driver: com.sunopsis.networkctx.NetworkInitCtxFactory
                      JNDI URL:ormi://OASDV01:7777/Default
                      JNDI Resource: jms/QueueConnectionFactory
                      I have checked JNDI resource is defined in OC4J.
                      What protocol we need to select for JNDI.
                      I have select it as Undefined.
                      Any thoughts on that??
                      • 8. Re: Use ODI with JMS Queue

                        You didn't need to select a protocol if you are using a technology which is not in the list...
                        So your problem can't come from here.

                        I have a question for you.
                        Did you import in ../OracleDI/Drivers the driver(s) which is(are) about com.sunopsis.networkctx.NetworkInitCtxFactory ?
                        Cause it looks like a class is not defined.

                        For Example with my Sonic ESB I have imported 5 or 6 jar files.

                        Hope to help you.

                        • 9. Re: Use ODI with JMS Queue

                          Could you please tell me how did you configured JMS Queue with ODI?

                          • 10. Re: Use ODI with JMS Queue
                            Hi, This is the sort of thing that I've got to do and I would really appreciate it if you could let me know how you did it?


                            • 11. Re: Use ODI with JMS Queue
                              Hi followed your procedure and all worked well?

                              1) How about managing queue insertion after a data change?
                              2) How about dealing with xml files into the queue?

                              Thanks In Advance

                              • 12. Re: Use ODI with JMS Queue

                                For using XML structures for JMS XML, create a Data Server under JMS XML in Topology as the above JMS Data Server. Just add the XML information to the end of the url.

                                For example:

                                file:/c:\JNDI?d=mypath/myDtd.dtd&s=mySchemaName&re=myRootElement&JMS_D ESTINATION=myQueuenName
                                • 13. Re: Use ODI with JMS Queue

                                  We have successfully setup and running ODI with JMS XML in windows. Recently we moved to Linux server and trying to configure the ODI server. I am able to configure successfully the JMS XML server and reversed the Model. but when trying to view the data (right click and view data option) from a XML data store it raises error as

                                  we are using /oracleadmin as out root folder in Linux. But wondering how it is displaying as 'C:\oracleadmin' . Is there any other setup required ?

                                  java.sql.SQLException: Cannot load connection class because of underlying exception: 'java.sql.SQLException: Cannot load connection class because of underlying exception: 'javax.jms.JMSException: Cannot create the initial JNDI context (detail : javax.naming.NameNotFoundException; remaining name 'C:\oracleadmin')'.'.

                                  Thanks in Advance,


                                  Edited by: ManoOracle on Sep 23, 2009 5:29 AM

                                  Edited by: ManoOracle on Sep 23, 2009 5:30 AM
                                  • 14. Re: Use ODI with JMS Queue

                                    I am trying to configure JMS queue for jboss server in ODI...can anyone tell me the data server details for the same. Any idea which jar files need to be added to ODI for jboss . In my data server odi is not finding the protocol and factory