Sams Teach Yourself BEA WebLogic Server 7.0 in 21 Days

In order to configure a destination on a WebLogic Server, you first need to know exactly what your system requirements are.

A number of steps involved are in configuring a destination. You first need to configure a JMS server, in which you define the queues or topics you wish to use. You then create a connection factory, in which you specify the name of the queue or topic.

The steps for configuring a queue for running your sample are as follows:

  1. Start the WebLogic Server for your domain. Open the Administration Console using the URL http://localhost:7001/console.

  2. Type in the user ID and password (in this case, "user" and "password" respectively, unless you specified a different ID and password during installation).

  3. When you are logged in, you will see on the left toolbar a link to JMS under the Services link of your domain. Expand the JMS link, and click Servers.

  4. Click the link Configure a New JMSServer (see Figure 15.6).

    Figure 15.6. Administration Console window to create a new JMS server: the first link.

  5. Enter learnweblogicserver in the Name text box, and click the Create button (see Figure 15.7).

    Figure 15.7. Giving your JMS server a name.

  6. The left frame shows the name of your JMS server, below the Servers link. Also, a new page is shown where the name of your JMS server is not editable. This page has two links: Configure Destinations and Configure Session Pools. Click the Configure Destinations link.

  7. You now see a page that gives you the option to create either a JMS queue or a JMS topic (see Figure 15.8). Click the link to create a JMS queue.

    Figure 15.8. The first step in creating your destination.

  8. Enter OrderedItemsQueue for the name of the queue and learnweblogic7.jms.ordereditemsqueue for the JNDI name in the appropriate text boxes (see Figure 15.9). Click the Create button.

    Figure 15.9. Creating a queue named OrderedItemsQueue.

With this step, you have successfully created a queue called OrderedItemsQueue. You can similarly create as many queues as required. Follow the same steps to create a CookedItemsQueue, with the JNDI name learnweblogic7.jms.cookeditemsqueue. After you have done this, you should see a screen listing the two queues you created, similar to the one in Figure 15.10.

Figure 15.10. A listing of the queues created.

Now, configure a queue connection factory. Following are the steps:

  1. Click the Connection Factories link in the left frame of the Administration Console. A screen will be displayed with the link Configure a New JMS Connection Factory (see Figure 15.11). Click this link.

    Figure 15.11. Creating a connection factory.

  2. Enter learnweblogicConnectionFactory as the name of the connection factory and learnweblogic7.jms.QueueConnectionFactory as the JNDI name for the queue connection factory (see Figure 15.12). Now click the Create button.

    Figure 15.12. Specifying the name and JNDI name for the queue connection factory.

  3. Click the Targets tab. You will see two multiple-selection boxes, with the names of your server listed on the left. For example, in Figure 15.13 you see the server myserver on the left side. Select this server name, click the right arrow, and then click the Apply button. Once you have clicked the Apply button, a listing of the JMS connection factories successfully deployed is displayed in the left frame of the page.

    Figure 15.13. Specifying target servers.

You have now configured your queues and connection factories. Make a note of each of the JNDI names. You will need them during development of the application. You will see a little later the details of developing a JMS application in the restaurant example.

Категории