Chapter 35. Using WebSphere MQ JMS
You also need to add JOnAS's
When starting, JOnAS expects JMS objects to have been created and bound to the registry. Those
objects are connection factories, needed for connecting to WebSphere MQ destinations and other
destinations.
JOnAS automatically tries to access the following factories:
An
•
XAConnectionFactory
An
•
XAQueueConnectionFactory
An
•
XATopicConnectionFactory
A
•
ConnectionFactory
A
•
QueueConnectionFactory
A
•
TopicConnectionFactory
If one of these objects cannot be found, JOnAS prints a message similar to this:
JmsAdminForWSMQ.start : WebSphere MQ XAConnectionFactory
could not be retrieved from JNDI
This does not prevent JOnAS from working. However, if no connection factory is available, no JMS
operations are possible from JOnAS.
If destinations have been declared in the
For example, if the following destinations are declared:
jonas.service.jms.topics
jonas.service.jms.queues
The server expects to find the following JMS objects in the registry:
A
, bound with name "sampleQueue".
•
Queue
A
, bound with name "sampleTopic".
•
Topic
If one of the declared destinations cannot be retrieved, the following message appears and the server
stops:
JOnAS error: org.objectweb.jonas.service.ServiceException:
Cannot init/start service jms':
org.objectweb.jonas.service.ServiceException :
JMS Service Cannot create administered object: java.lang.Exception:
WebSphere MQ Queue creation impossible from JOnAS
Contrary to connection factories, the JOnAS administration tool enables you to create destinations. As
it is not possible to create WebSphere MQ JMS objects from JOnAS, this works only if the destinations
are previously created through WebSphere MQ and bound to the registry.
For example, an attempt to create a queue named "myQueue" through the JonasAdmin tool works
only if:
You have created a queue through the WebSphere MQ Explorer tool.
•
You have created the corresponding JMS
•
"myQueue".
To launch WebSphere MQ administration tool, enter: JMSAdmin
The following prompt appears:
library to WebSphere MQ's classpath.
client.jar
, bound with name "wsmqXACF".
, bound with name "wsmqXAQCF".
, bound with name "wsmqXATCF".
, bound with name "JCF".
, bound with name "JQCF".
, bound with name "JTCF".
jonas.properties
sampleTopic
sampleQueue
Queue
InitCtx>
file, JOnAS also expects to find them.
and bound it to the registry with the name
255
Need help?
Do you have a question about the APPLICATION SERVER - JONAS and is the answer not in the manual?
Questions and answers