Message Queue, v4.4 API Specification

## Package com.sun.messaging.jms.management.server

Provides utility/convenience classes for writing JMX based clients to manage or monitor the MQ broker.

See:
Description

Class Summary
BrokerAttributes: Class containing information on broker attributes.
BrokerClusterInfo: This class contains constants/names for fields in the CompositeData that is returned by the operations of the Cluster Monitor and Cluster Config MBeans.
BrokerNotification: Class containing information on broker related notifications.
BrokerOperations: Class containing information on broker operations.
BrokerState: Class containing information on broker states.
ClusterAttributes: Class containing information on cluster attributes.
ClusterNotification: Class containing information on cluster related notifications.
ClusterOperations: Class containing information on cluster operations.
ConnectionAttributes: Class containing information on connection attributes.
ConnectionNotification: Class containing information on cluster operations.
ConnectionOperations: Class containing information on connection attributes.
ConsumerAttributes: Class containing information on consumer attributes.
ConsumerInfo: This class contains constants/names for fields in the CompositeData that is returned by the operations of the Consumer Manager Monitor MBean.
ConsumerOperations: Class containing information on consumer operations.
DestinationAttributes: Class containing information on destination attributes.
DestinationLimitBehavior: Class containing information on destination limit behavior.
DestinationNotification: Class containing information on consumer notifications.
DestinationOperations: Class containing information on destination operations.
DestinationPauseType: Class containing constants for destination pause type.
DestinationState: Class containing information on destination states.
DestinationType: Class containing information on destination types.
JVMAttributes: Class containing information on JVM attributes.
LogAttributes: Class containing information on log attributes.
LogLevel: Class containing information on log levels
LogNotification: Class containing information on log related notifications.
MQNotification: Class containing information on cluster operations.
MQObjectName: Utility class for manipulating Message Queue MBean Object Names.
ProducerAttributes: Class containing information on producer attributes.
ProducerInfo: This class contains constants/names for fields in the CompositeData that is returned by the operations of the Producer Manager Monitor MBean.
ProducerOperations: Class containing information on producer operations.
ServiceAttributes: Class containing information on service attributes.
ServiceNotification: Class containing information on service notifications.
ServiceOperations: Class containing information on service operations.
ServiceState: Class containing information on service states.
TransactionAttributes: Class containing information on transaction attributes.
TransactionInfo: This class contains constants/names for fields in the CompositeData that is returned by the operations of the Transaction Manager Monitor MBean.
TransactionNotification: Class containing information on transaction notifications.
TransactionOperations: Class containing information on transaction operations.
TransactionState: Class containing constants for transaction states.

## Package com.sun.messaging.jms.management.server Description

Provides utility/convenience classes for writing JMX based clients to manage or monitor the MQ broker. The code example creates a destination on the broker and demonstrates how some of the classes in this package can be used for this.

    import javax.management.*;
    import javax.management.remote.*;
    import com.sun.messaging.AdminConnectionFactory;
    import com.sun.messaging.jms.management.server.*;

    public class SimpleClient {
        public static void main(String[] args) {
            try  {
                AdminConnectionFactory acf;

                /*
                 * Create admin connection factory and connect to JMX Connector
                 * server using administrator username/password.
                 * A JMX connector client object is obtained from this.
                 */
                acf = new AdminConnectionFactory();
                JMXConnector jmxc = acf.createConnection();

                /*
                 * Get MBeanServer interface.
                 */
                MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();

                /*
                 * Create object name of destination config mgr MBean.
                 */
                ObjectName objName
                    = new ObjectName(MQObjectName.DESTINATION_CONFIG_MGR_MBEAN_NAME);

                /*
                 * Create attributes for new destination:
                 *  MaxTotalMsgBytes = 100 Mb
                 *  UseDMQ = true
                 */
                AttributeList attrList = new AttributeList();
                Attribute attr;
                attr = new Attribute(DestinationAttributes.MAX_TOTAL_MSG_BYTES,
                                new Long(100 * 1024 * 1024));
                attrList.add(attr);
                attr = new Attribute(DestinationAttributes.USE_DMQ,
                                Boolean.TRUE);
                attrList.add(attr);

                /*
                 * Setup parameters for create operation and also
                 * it's signature.
                 */
                Object params[] = { DestinationType.QUEUE,
                            "TestQueue",
                            attrList
                    };
                String signature[] = {
                            String.getClass().getName(),
                            String.getClass().getName(),
                            attrList.getClass().getName()
                    };

                /*
                 * Invoke operation to create destination.
                 */
                mbsc.invoke(objName, DestinationOperations.CREATE, params, signature);

                jmxc.close();
            } catch (Exception e)  {
                e.printStackTrace();
            }
        }
    }

Message Queue, v4.4 API Specification

Copyright 2009 Sun Microsystems, Inc.
4150 Network Circle, Santa Clara, CA 95054, U.S.A. All Rights Reserved.