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 by BEA Systems. All Rights Reserved.
-
EJB_HOME
-
-
JMS_FACTORY
-
-
JNDI_FACTORY
-
-
TOPIC
-
-
TraderReceive()
-
-
close()
- Close JMS objects.
-
init(Context, String)
- Create all the necessary objects for receiving messages from a JMS Topic.
-
main(String[])
-
-
onMessage(Message)
-
JNDI_FACTORY
public static final String JNDI_FACTORY
JMS_FACTORY
public static final String JMS_FACTORY
EJB_HOME
public static final String EJB_HOME
TOPIC
public static final String TOPIC
TraderReceive
public TraderReceive()
onMessage
public void onMessage(Message msg)
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.
close
public void close() throws JMSException
- Close JMS objects.
main
public static void main(String args[]) throws Exception
All Examples This Package JMS Examples