This content has been marked as final. Show 14 replies
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.
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 ?
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:
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)
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
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 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??
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.
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