Monday, December 28, 2009

How to set up JMS adapter for Oracle JMS

The J2EE Connector architecture defines a standard architecture for connecting the J2EE platform to heterogeneous Enterprise Information Systems (EISs).A resource adapter is a system-level software driver used by an application server or an application client to connect to an EIS.Here we will be creating a resource provider and try to connect to the underlaying appliactions.


To set up a jms adapter for oracle you first need to configure your resource for the connectivity.YOu need to go the the following directory.

SOA_HOME/j2ee/instance_name/config /application.xml

there you will find a line

data-sources path=”data-sources.xml”

we must take the bakcup for the file before making any changes.

SO now open the file and add follwing lines




Here arpitdemo is just the name of the resource you can name it any thing as per your wish or requirement.

jdbc/AQ points to the datasource configuration which is used for this resource provider.

So now we will make a corresponding entry in our datasource configuration for this resource provider.Go to the following

SOA_HOME/j2ee/instance_name/config /data-sources.xml

Take the backup of data-source.xml file and now try to modify it.

Add the following entry in to the data-sorce.xml



Save the file



In this datasource configuration

the jndi name that we have provided is the same that we have defined for our resource provider.
Replace with your Oracle Database SID. replace "yourUser" and "yourPassword" with your AQ user/password Save and exit.

now we need to make an entry in our oc4j-ra.xml file for the implementation.oc4j-ra.xml is the OC4J specific deployment descriptor for a resource adapter.

Now go to the following location

SOA_HOME/j2ee/OC4J_BPEL/application-deployments/default/JMSAdapter/oc4j-ra.xml

Again make a backup of the file and make an entry in the oc4j-ra.xml as




Here the arpitdemo resource is the one that we created earlier in application.xml. It is represented above as “java:comp/resource/arpitdemo/QueueConnectionFactories/myQCF”. The name myQCF is a user-defined name, and can be anything. We need to provide the username/password correctly.

Then save the change and restart your server to implement the changes.

No comments: