This example shows the steps to create a simple JMS queue in
WebLogic Server 11g for testing purposes. For example, to use with
the two sample programs QueueSend.java and QueueReceive.java which
will be shown in later examples.
Additional, detailed information on JMS can be found in the
following Oracle documentation:
Oracle® Fusion Middleware Configuring and Managing
JMS for Oracle WebLogic Server
11g Release 1 (10.3.6)
Part Number E13738-06
A JMS queue in Weblogic Server is associated with a number of
additional resources:
A JMS server acts as a management container for resources within JMS
modules. Some of its responsibilities include the maintenance of
persistence and state of messages and subscribers. A JMS server is
required in order to create a JMS module.
A JMS module is a definition which contains JMS resources such as
queues and topics. A JMS module is required in order to create a JMS
queue.
JMS modules are targeted to one or more WLS instances or a cluster.
Resources within a JMS module, such as queues and topics are also
targeted to a JMS server or WLS server instances. A subdeployment is a
grouping of targets. It is also known as advanced targeting.
A connection factory is a resource that enables JMS clients to
create connections to JMS destinations.
A JMS queue (as opposed to a JMS topic) is a point-to-point
destination type. A message is written to a specific queue or
received from a specific queue.
The objects used in this example are:
Object Name |
Type |
JNDI Name |
TestJMSServer |
JMS Server |
|
TestJMSModule |
JMS Module |
|
TestSubDeployment |
Subdeployment |
|
TestConnectionFactory |
Connection Factory |
jms/TestConnectionFactory |
TestJMSQueue |
JMS Queue |
jms/TestJMSQueue |
The following steps are done in the WebLogic Server Console,
beginning with the left-hand navigation menu.
The JMS server should now be visible in the list with Health OK.
A subdeployment is not necessary for the JMS queue to work, but it
allows you to easily target subcomponents of the JMS module to a
single target or group of targets. We will use the subdeployment in
this example to target the following connection factory and JMS
queue to the JMS server we created earlier.
The connection factory should be listed on the following page with
TestSubdeployment and TestJMSServer as the target.
The TestJMSQueue should be listed on the following page with
TestSubdeployment and TestJMSServer.
Confirm the resources for the TestJMSModule. Using the Domain
Structure tree, navigate to soa_domain > Services > Messaging
> JMS Modules then select TestJMSModule
You should see the following resources
The JMS queue is now complete and can be accessed using the JNDI
names
jms/TestConnectionFactory and
jms/TestJMSQueue.
In the following blog post in this series, I will show you how to
write a message to this queue, using the WebLogic sample Java program
QueueSend.java.
Thank you for the helpful article :).
was quite helpfull..thanks
Not to forget to Activate the Weblogic after making all these changes. I got the
Caused by: javax.naming.NameNotFoundException: Unable to resolve 'jms.TestConnectionFactory'. Resolved 'jms' error after doing the remaining steps.
Thanks for sharing.
gooD
Indeed the most simplest and concise online doc i have seen... keep it up, and look forward for more such blogs from you.
Good One
nice.
nice
more explanatory and helpful, Thanks.
thanks for article
Very helpful article for beginners.
Thank you so much.
By far the most simple explanation to create a JMS Queue in weblogic. But not sure why so many intermediary configurations like JMS Servers, JMS modules, etc to create a simple JMS Queue. But anyway, the tutorial was helpful. Thanks!
This article is really helpful, especially for beginners.
Thanks a lot.
Good one
Keep up the good work.
I have heard that setting up a JMS Queue is pretty tough the first time you try it. I managed to get it set up and working in about 20 minutes with no headaches. Thank you for this!
Excellent
very helpful for the beginners
Thankyou!!!