    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.

##

JMS_FACTORY
JNDI_FACTORY
PARSER
QUEUE

##

AdminClient()

##

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

##

JNDI_FACTORY

     public static final String JNDI_FACTORY

JMS_FACTORY

     public static final String JMS_FACTORY

QUEUE

     public static final String QUEUE

PARSER

     public static final String PARSER

##

AdminClient

     public AdminClient()

##

onMessage

     public void onMessage(Message message)

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

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.

close

     public void close() throws JMSException

  Close JMS objects.

main

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

  Runs this example from the command line.

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