All Examples  This Package  JMS Examples

Class examples.jms.trader.TraderReceive

examples.jms.trader.TraderReceive

public class TraderReceive
This example sends a "buy" or "sell" message to a JMS Topic from the Java servlet TraderServlet. The TraderReceive client receives the messages and invokes an EJBean to process the messages.
Author:
Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.

Variable Index

 o EJB_HOME
 o JMS_FACTORY
 o JNDI_FACTORY
 o TOPIC

Constructor Index

 o TraderReceive()

Method Index

 o close()
Close JMS objects.
 o init(Context, String)
Create all the necessary objects for receiving messages from a JMS Topic.
 o main(String[])
 o onMessage(Message)

Variables

 o JNDI_FACTORY
 public static final String JNDI_FACTORY
 o JMS_FACTORY
 public static final String JMS_FACTORY
 o EJB_HOME
 public static final String EJB_HOME
 o TOPIC
 public static final String TOPIC

Constructors

 o TraderReceive
 public TraderReceive()

Methods

 o onMessage
 public void onMessage(Message msg)
 o init
 public void init(Context ctx,
                  String topicName) throws NamingException, JMSException, RemoteException, CreateException
Create all the necessary objects for receiving messages from a JMS Topic. The session is transacted so that calling the EJB occurs in the same transaction as dequeueing the message.

 o close
 public void close() throws JMSException
Close JMS objects.

 o main
 public static void main(String args[]) throws Exception

All Examples  This Package  JMS Examples