JMeter and Oracle AQ - jmeter

Anyone have any experience using JMeter and Oracle AQ? I'm trying to publish messages to the Oracle AQ queue using JMS Publisher but the only information I have is from a bindings file.

First, read this documentation (Oracle® Fusion Middleware Configuring and Managing JMS for Oracle WebLogic Server, Chapter 8: Interoperating with Oracle AQ JMS), it provides you what you need to know about AQ user permission grants, AQ JMS Connection Factories names, and AQ Remote JNDI JMS Destination names. It does say WebLogic, but they use the very same config we do.
Put Oracle JDBC jar (ojdbc6.jar) and Oracle AQ jar (aqapi.jar, found in Weblogic's $WL_HOME/server/lib) in JMeter's lib dir.
Create a jndi.properties file with the following entries:
java.naming.factory.initial=oracle.jms.AQjmsInitialContextFactory
db_url=Your Oracle DB instance JDBC URL
java.naming.security.principal=username_with_aq_permission_grants
java.naming.security.credentials=password
Put the jndi.properties into a jar with
jar cf my-jndi-properties.jar jndi.properties
and put it in that same JMeter lib dir.
Create a JMS Publisher in JMeter, and fill these:
Check "Use jndi.properties file"
Connection Factory: See Table 8-1 and put a AQ JMS Prefix Value. Don't use the generic factories.
Destination: Either Queues/Your_Queue_Name or Topics/Your_Topic_Name
Uncheck "Use Authorization?"
Fill out what else you need.
Have fun.
Thanks David L for the jndi.properties info.

Related

Use same .binding file in another WebSphere MQ

I use WebSphere MQ 7.0, followed necessary steps and configured it. Can I use same .binding file in another WebSphere MQ ?
WebSphere MQ\java\bin\JMSAdmin.config entries as below
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=file:/C:/JNDI-Directory
The .bindings file is the backing store for the FileSystem JNDI provider. You would typically conenct the JMS based applications to this to load the Connection Factories and Destinations.
A single JNDI store can hold multiple objects and they don't all have to represent connections to a single Queuemanager.
So if you're asking do I need another JNDI store for another queuemanager, no not necessarily.

Not able to create jms queues in websphere programatically using standalone java client

I wrote a java client to connect to jms in websphere.
I was able to connect and produce and consume message.
Problem I am facing is when I do Session.createQueue(), websphere jms is not creating a new queue.
Please could some one throw some light on this issue...
Thanks in advance...
If you are working with WebSphere MQ as the messaging provider within WebSphere Application Server the queue will need to be created on the WebSphere MQ QueueManager first. This can be done either via the graphical WMQ Explorer or via the command line using the 'runmqsc' tool.
Information can be found for these via the WMQ InfoCentre - suggest doing a websearch for "WMQ Library" to get the latest link, currently though it is http://www-01.ibm.com/software/integration/wmq/library/index.html
Topics though don't need to be pre-created - though they can be if required. Various properties can be set different to the default.
If the Queue doesn't need to be permanent, for example as a temporary reply to then look into creating a temporary queue from the JMS Connection.
createQueue doesn't create a new queue. It simply creates a javax.jms.Queue object from a vendor specific identifier. javax.jms.Queue objects are just references to existing queues. Typically, you retrieve javax.jms.Queue objects from JNDI; createQueue is only useful in scenarios where using JNDI is not possible or not desirable.
Note: there is one exception to this, namely JMS providers that support autocreation of queues (I think ActiveMQ has such a feature).

Weblogic JMS server configuration: JMS module to talk to JMS Server

I am fairly to new to JMS configuration in JMS.
Here is what i am trying to do.
We have multile JVMs of our applications in a single weblogic domain. We want to have JMS server installed on say one JVM and rest of the JVMs refer to the first JMS Server.
So, the configuration is:
JVM1: JMS Server is installed
JVM2: JMS Module installed
Now I need to configure JVM2 to talk to JMS server on JVM1. How do i do that?
This is on weblogic 11g
I suggest going through the basics of WebLogic 11 JMS configuration and then taking a look into this good guide from Oracle documentation. I know there is a lot of info over there, but in the long run it is better to know what you are doing rather than just copying someone else's configurations.

How do I create an MDB that listens to Oracle AQ queue under JBoss AS?

I need to listen to an Oracle AQ queue in a Java EE application that runs under JBoss AS 5.1.
I managed to create a regular JMS client using Oracle's JMS client library, but since this is a Java EE application, I'd really like to use a MDB.
I can't really find any documentation on this, and I can't find a resource adapter that lets me do this using JCA.
Can anyone tell me what's required to get this to work?
This JBoss Community Posting outlines how to do this.
I am not sure exactly which RAR to use, but my Oracle DB install contains these:
product\11.2.0\dbhome_1\oc4j\j2ee\home\connectors\ojms.rar
product\11.2.0\dbhome_1\oc4j\j2ee\home\connectors\OracleASjms\OracleASjms.rar
This stackoverflow question links to an extensive blog on the topic as well.

What is Foreign JMS provider? What is the typical role of Weblogic in a JMS application?

Currently I am working on a JMS application. But I use plain JMS API and Property file for configurations. My application is running in Weblogic and connects to MQ series server of my client.
Recently I got to know I can use Weblogic for JMS configurations.
Please explain.
What is "Foreign JMS provider"?
Is Weblogic also a JMS server or Foreign JMS provider or Both?
Weblogic provides the JMS Server features fully compliant with all JMS spec elements such as ConnectionFactory and Destinations. On this JMS Server you can connect and send messages to the client's Messaging Server via a configured Destination.
In addition using Weblogic as the JMS Server gives you lot many features such as Message Retry in case of failure, setting message quotas as well as enhanced monitoring of the JMS Server to track errors. The idea is to have more configuration driven settings for performance, deadlocks, tuning, filestore or database store etc.
A full list of such features is given at http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jms/fund.html#wp1071787
A Foreign JMS Provider in Weblogic is the term used to define JMS implementations other than Weblogic JMS. An example is IBM MQ in your case.
Once the Foreign Provider is configured within Weblogic, for all practical purposes within the code - it can be called as if it was on local JNDI lookup. Weblogic will make the remote calls transparent to your code. This allows you to change your destination via configuration on the Weblogic console.
You will need a Messaging Bridge within Weblogic JMS Server to connect a source destination from which messages are received, and a target destination to which messages are sent.
Some essential reading on this is at: http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jms_admin/advance_config.html#wp1075917
and an example of configuring IBM MQ as a Foreign Provider is at http://www.ibm.com/developerworks/websphere/library/techarticles/0604_kesavan/0604_kesavan.html#N1011D

Resources