Can I use JMQ 2.0 in a java application?

Is it possible to have a stand alone iMQ client? I have a requirement where one of my applications which needs to communicate with iMQ runs on a different machine than the iMQ itself. I also need to have a separate JNDI repository for this application to look up administered objects. So in short I need to create a JNDI entry for an already existing Queue (or queueconnectionfactory) on an existing iMQ server. Also I need to know which libraries (jars) to copy to my application machine so that they can successfully access iMQ. I know I can do this for MQ series.

[580 byte] By [christenscreen] at [2007-11-25 8:06:54]
# 1

iMQ 2.0 does support both:

- installed only the client jar files

- using JNDI to store the connections objects

It is possible to have a standalone client. All of the jar files you

need for a client is available in the client runtime package

On solaris: you need to install the SUNWjqapi package on the client

system

On Linux:you will need the following libraries:

fscontext.jarjmq.jarjnet.jar ldapbp.jar

jaas.jar jms.jarjsse.jar providerutil.jar

jcert.jar jndi.jar ldap.jar

jms.jar -> is the jar which has the jms interfaces

jmq.jar -> has the iMQ jms implementation

jsse.jar -> is used for SSL comminication

other jars are used for ldap

On Windows: run the iMQ 2.0 installer and select a custom install

when the "select components" dialog is displayed, select

"client Runtime"

Once you install the client runtime, your clients will need

to connect to the remote broker. This can be done by:

1. specifying the broker name on the command line

(if you have changed the brokers portmapper port,

you may also need to specific the port with JMQBrokerHostPort)

the default port for the portmapper):

java -DJMQBrokerHostName=<brokerhost> <your class file> <your args>

e.g.

java -DJMQBrokerHostName=myhost MyApplication

2. Specifiy the broker host in an administered Connection Object

for directions on how to create an administered object, see:

Chapter 7 of the admininstrators guide

(doc/en/userguides/admin.pdf)

For directions on using administered objects, see

Chapter 3 of the developers guide

(doc/en/userguides/developer.pdf)

If you are using JMQ2.0 and planning to use http to communicate

with the broker, you will need to add one additional jar file:

jmqutil.jar

This restriction is lifted once the JMQ 2.0 SP1 patch is applied.

christenscreen at 2007-7-1 13:57:20 > top of Java-index,Application & Integration Servers,Sun Java System Message Queue...