This tutorial explains the steps to configure Java Message Service (JMS) Queues and Topics in an Oracle WebLogic Server Instance. At the end of this tutorial, you will be able to::
Place
the cursor over this icon to load and view all the screenshots for this tutorial.
(Caution: Because this action loads all screenshots simultaneously, response
may be slow depending on your Internet connection.)
Note: Alternatively, you can place the cursor
over each individual icon in the following steps to load and view only the screenshot
associated with that step.
The screenshots are provided to give you an idea of how to configure and administer specific
functionality in Oracle WebLogic Server and may not reflect the specific environment
that you are using.
Overview
A JMS server implements the JMS infrastructure on a WebLogic server. Destinations (queues or topics) are targeted to a WebLogic server that has the JMS server configured.
In this tutorial you learn to configure a JMS server, a queue, and a topic . You will then post messages to the queue and topic and monitor them in the Administration Console. For reference.
You are an application server administrator in the Dizzyworld
Corporation. You have installed and configured the Oracle WebLogic Server for your
enterprise. For information on how to install and configure Oracle WebLogic Server, please refer to these OBEs:
The Dizzyworld system architects decided to explore the JMS services by configuring a JMS server, a JMS module with JMS queue and JMS topic resources, and by deploying a simple messaging.war application to post messages to the queue and the topic..
Prerequisites
Before you start the tasks, make sure that your system environment
meets the following requirements:
Prerequisite tutorials:
Before starting this tutorial, you should complete the following prerequisite tutorials:
The system should have installed the following products:
Oracle WebLogic Server
Download the test_jms.zip file and save it in your machine where you would be performing the tasks.:Then extract the content in your local drive. In this sample, the files are extracted into /home/oracle/labs/wls103/testjms folder. The extract contains two files:
File Name
Description
1.
messaging.war
A simple Web application file used for testing the JMS queue and topics configured.
2.
deploy_testjms.py
A WLST script used for deploying the Web application.
The basic domain in this case consists of an Administration Server and a
Managed Server (dizzy1). To start the two servers, perform
the following steps:
1.
Invoke a new shell window and navigate to the bin subfolder under the folder where you have configured the domain For example:
$ cd /u01/app/oracle/product/Middleware/user_projects/domains/dizzyworld/bin .
2.
Run the startWebLogic.sh script to start the Administration Server..
3.
When prompted :with “Enter username to boot WebLogic server”, enter the administrative user name you have setup when you created the domain. In this case user name “admin” is shown. Then enter the password for admin user when prompted with “Enter password to boot WebLogic server”.
4.
This will start the Administration Server. Leave this shell window running..
5.
To start the Managed Server (dizzy1) in the domain, invoke another shell window and navigate to the bin subfolder in your domain
6.
Execute the following command: to start the managed server.
When prompted :with “Enter username to boot WebLogic server”, enter the administrative user name you have setup when you created the domain. In this case user name “admin” is shown. Then enter the password for admin user when prompted with “Enter password to boot WebLogic server”
8.
This would start up the Managed Server. Once again, leave this window as it is..
Open a new shell window, navigate to the folder where you have the messaging.war application (for example: /home/labs/wls103/testjms folder).
2.
Set WL_HOME environment variable to point to the location where you have installed WLS 10.3..
3.
Run WL_HOME/server/bin/setWLSEnv.sh script to set up the environment variables.
4.
Run the command java weblogic.WLST deploy_testjms.py to deploy the testds.war application.
5.
Open a Web browser and navigate to http://localhost:7003/messaging
Using the application, post several messages to the standard queue and to the topic. Do not add messages to the distributed queue .
6.
In the Admin console navigate to dizzyworld > Services > Messaging > JMS Modules. In the JMS Modules table, click dizzyworldModule. In the Summary of Resources table, click dizzyworldQueue . and then click the Monitoring tab. Notice that the Messages High and Messages Total column show non zero values indicating new messages have been recieved. .
7.
Repeat these steps to view the number to messages sent to the dizzyworldTopic .
Note: On the topic (unlike the queue), Messages High value remains zero, since there are no consumers connected to the topic, posted messages are automatically deleted from the server. For a queue, messages are saved on the server until they are consumed..