All Examples  XML Examples  This Package 

Class examples.xml.jms.AdminClient


java.lang.Object

   |

   +----examples.xml.jms.AdminClient


public class AdminClient
extends Object
implements MessageListener
This example shows how to pass XML data within a JMS message. The classes in this package make up a simple workflow system. This class is used to approve or deny messages created from the Client class. Message received from the JMS queue are in the form of XML data. The XML is parsed using a SAX compliant parser and the contents are displayed in the console. This class updates attributes of the XML data based upon whether or not the message has been approved and returns the message to the queue, where it will be received by the Client class.

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

Variable Index

 o JMS_FACTORY
 o JNDI_FACTORY
 o PARSER
 o QUEUE

Constructor Index

 o AdminClient()

Method Index

 o close()
Close JMS objects.
 o init(Context, String)
Create all the necessary objects for sending and receiving messages from a JMS queue.
 o main(String[])
Runs this example from the command line.
 o onMessage(Message)
Called when a message is received from the JMS message queue.
 o send(String, String, String)
Send a message to a JMS queue.

Variables

 o JNDI_FACTORY

 public static final String JNDI_FACTORY

 o JMS_FACTORY

 public static final String JMS_FACTORY

 o QUEUE

 public static final String QUEUE

 o PARSER

 public static final String PARSER

Constructors

 o AdminClient

 public AdminClient()

Methods

 o onMessage

 public void onMessage(Message message)

Called when a message is received from the JMS message queue. (MessageListener interface)

 o init

 public void init(Context ctx,

                  String queueName) throws NamingException, JMSException

Create all the necessary objects for sending and receiving messages from a JMS queue.

 o close

 public void close() throws JMSException

Close JMS objects.

 o main

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

Runs this example from the command line.

 o send

 public void send(String message,

                  String status,

                  String sendTo) throws JMSException

Send a message to a JMS queue.


All Examples  XML Examples  This Package