All Examples  This Package  JMS Examples

Class examples.jms.topic.TopicSend

examples.jms.topic.TopicSend

public class TopicSend
The classes in this package work together to show how to establish a connection to a JMS Topic and receive messages from a Topic. This class is used to send messages to the Topic.
Author:
Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.

Variable Index

 o JMS_FACTORY
 o JNDI_FACTORY
 o msg
 o tcon
 o tconFactory
 o topic
 o TOPIC
 o tpublisher
 o tsession

Constructor Index

 o TopicSend()

Method Index

 o close()
Close JMS objects.
 o getInitialContext(String)
 o init(Context, String)
Create all the necessary objects for sending messages to a JMS Topic.
 o main(String[])
 o readAndSend(TopicSend)
 o send(String)
Send a message to a JMS Topic.

Variables

 o JNDI_FACTORY
 public static final String JNDI_FACTORY
 o JMS_FACTORY
 public static final String JMS_FACTORY
 o TOPIC
 public static final String TOPIC
 o tconFactory
 protected TopicConnectionFactory tconFactory
 o tcon
 protected TopicConnection tcon
 o tsession
 protected TopicSession tsession
 o tpublisher
 protected TopicPublisher tpublisher
 o topic
 protected Topic topic
 o msg
 protected TextMessage msg

Constructors

 o TopicSend
 public TopicSend()

Methods

 o init
 public void init(Context ctx,
                  String topicName) throws NamingException, JMSException
Create all the necessary objects for sending messages to a JMS Topic.

 o send
 public void send(String message) throws JMSException
Send a message to a JMS Topic.

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

 o main
 public static void main(String args[]) throws Exception
 o readAndSend
 protected static void readAndSend(TopicSend ts) throws IOException, JMSException
 o getInitialContext
 protected static InitialContext getInitialContext(String url) throws NamingException

All Examples  This Package  JMS Examples