    All Examples  This Package  JMS Examples

# Class examples.jms.startup.PoolReceive

    examples.jms.startup.PoolReceive

public class PoolReceive
implements T3StartupDef

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 PoolReceive example shows how to establish a pool of message listeners (MsgListener class) from a startup class. As messages are received from the topic 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.poolReceive=examples.jms.startup.PoolReceive
        weblogic.system.startupArgs.poolReceive=\
           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 files in this directory as shown in this examples for Windows NT:

         $ javac -d %SERVER_CLASSES% MsgListener.java PoolReceive.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 messages are displayed in the shell running WebLogic Server as they are received from the Topic. Send messages at less than 1 second intervals to see the pool in action.

Author:
  Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.

## l

PoolReceive()

##

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

##

PoolReceive

     public PoolReceive()

##

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

startup

     public String startup(String name,

                           Hashtable args) throws Exception

    All Examples  This Package  JMS Examples