All Examples  JMS Examples  This Package

package examples.jms.sessionpool

Class Index

  • MsgListener
  • TopicPool
  • QueuePool
  • about this package

    This example shows how to establish a pool of server-side message listeners that process incoming messages in parallel, an optional feature described in the JMS v1.0.1 specification. The TopicPool class is a T3Client application that establishes the listener pool and then sends messages to a Topic that the pool has registered to receive. The QueuePool class is a T3Client application that establishes the listener pool and then sends messages to a Queue that the pool has registered to receive.

    The WebLogic Server calls the MsgListener class to process each messages the pool receives. The MsgListener displays the message in the command shell that is running the server.

    Build the example:

    1. Set up your development shell, as described in Setting up your environment.
    2. Compile the client files in this directory as shown in this examples for Windows NT:
        $ javac -d %CLIENT_CLASSES% TopicPool.java QueuePool.java
    3. Compile the server-side files in this directory as shown in this example for Windows NT:
        $ javac -d %SERVER_CLASSES% MsgListener.java
    Run the examples:
    1. Start the WebLogic Server in a new command shell.
    2. In your development shell, run the QueuePool client with the following command:
        $ java examples.jms.sessionpool.QueuePool t3://hostname:port
      where:
      hostname
      Host name of the WebLogic Server
      port
      Port where the WebLogic Server is listening for connections (weblogic.system.ListenPort).
      The server displays messages as they are received from the Queue.
    3. To end the program, enter a quit message.
    4. In your development shell, run the TopicPool client with the following command:
        $ java examples.jms.sessionpool.TopicPool t3://hostname:port
      where:
      hostname
      Host name of the WebLogic Server
      port
      Port where the WebLogic Server is listening for connections (weblogic.system.ListenPort).
      The server displays messages as they are received from the Topic.
    5. To end the program, enter a quit message.