All Examples  This Package  JMS Examples

Class examples.jms.startup.ServerReceive

examples.jms.startup.ServerReceive

public class ServerReceive
This example shows how to establish a JMS message consumer from a WebLogic Startup Class. Startup classes are loaded and executed when the server is first started. The ServerReceive startup class establishes a single message listener. As messages are received from the tropic they are displayed in shell running the WebLogic Server. You can use the TopicSend client to send messages to the Topic.

Configure the server:

  1. Add the following properties to your weblogic.properties file:
     weblogic.system.startupClass.serverReceive=examples.jms.startup.ServerReceive
     weblogic.system.startupArgs.serverReceive=\
        connectionFactory=javax.jms.TopicConnectionFactory,\
        topic=javax.jms.exampleTopic
Build the example:
  1. Set up your development shell, as described in Setting up your environment.
  2. Compile the file in this directory as shown in this examples for Windows NT:
      $ javac -d %SERVER_CLASSES% ServerReceive.java
Run the example:
  1. Start the WebLogic Server in a new command shell.
  2. Start the TopicSend client in your development shell and send messages to the topic. The ServerReceive startup class displays messages in the shell running WebLogic Server as they are received from the Topic.
Author:
Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.

Constructor Index

 o ServerReceive()

Method Index

 o onMessage(Message)
 o setServices(T3ServicesDef)
The setServices() method passes to the startup class the handle of an object that can be used to access WebLogic services.
 o startup(String, Hashtable)

Constructors

 o ServerReceive
 public ServerReceive()

Methods

 o setServices
 public void setServices(T3ServicesDef services)
The setServices() method passes to the startup class the handle of an object that can be used to access WebLogic services. This makes another reference to the services object so it can be used later.

Parameters:
services - Services stub
 o startup
 public String startup(String name,
                       Hashtable args) throws Exception
 o onMessage
 public void onMessage(Message msg)

All Examples  This Package  JMS Examples