Oracle

weblogic.jms.extensions
Class JMSHelper

java.lang.Object
  extended by weblogic.jms.extensions.JMSRuntimeHelper
      extended by weblogic.jms.extensions.JMSHelper

Deprecated. 9.0.0.0 Replaced with JMSModuleHelper.

public final class JMSHelper
extends JMSRuntimeHelper

This class contains JMS helper methods for locating JMS runtime (i.e., monitoring) and configuration JMX MBeans. It also contains helper methods for dynamically creating and deleting standalone JMS destinations (queues and topics), as well as for dynamically creating and deleting distributed destinations (DD). The DD methods will also create or delete a DD's queue or topic members on each specified JMS server instance, as well as a JMS template that will be used as the template for all the member destinations.

Note: BEA recommends that the use of the create queue/topic methods and create distributed queue/distributed topic methods be strictly limited, as they directly modify the configuration (config.xml) file and provide minimal feedback for detecting success or failure.


Constructor Summary
JMSHelper()
          Deprecated.  
 
Method Summary
static void createDistributedQueueAsync(Context ctx, String distributedQName, String jndiName, String[] jmsServerNames)
          Deprecated. Create a distributed queue and its members on the specified JMS server instances.
static void createDistributedTopicAsync(Context ctx, String distributedTName, String jndiName, String[] jmsServerNames)
          Deprecated. Create a distributed topic and its members on the specified JMS server instances.
static void createPermanentQueueAsync(Context ctx, String jmsServerName, String queueName, String jndiName)
          Deprecated. Submit an asynchronous request to create a permanent JMS queue.
static void createPermanentTopicAsync(Context ctx, String jmsServerName, String topicName, String jndiName)
          Deprecated. Submit an asynchronous request to create a permanent JMS topic.
static void deleteDistributedQueue(Context ctx, String distributedQName)
          Deprecated. Delete a distributed queue and all its members.
static void deleteDistributedTopic(Context ctx, String distributedQName)
          Deprecated. Delete a distributed topic and all its members.
static void deletePermanentQueue(Context ctx, String jmsServerName, String queueName)
          Deprecated. Submit a synchronous request to delete a permanent JMS queue.
static void deletePermanentTopic(Context ctx, String jmsServerName, String topicName)
          Deprecated. Submit a synchronous request to delete a permanent JMS topic.
static weblogic.management.configuration.JMSQueueMBean getJMSQueueConfigMBean(Context ctx, Queue jmsQueue)
          Deprecated. Retrieve the JMS queue configuration MBean for the associated JMS queue.
static weblogic.management.configuration.JMSQueueMBean getJMSQueueConfigMBean(Context ctx, String jmsServerName, String queueName)
          Deprecated. Retrieve the JMS queue configuration MBean for the specified JMS queue name on the specified JMS server.
static weblogic.management.configuration.JMSServerMBean getJMSServerConfigMBean(Context ctx, String jmsServerName)
          Deprecated. Retrieve the JMS server configuration MBean for the specified JMS server name.
static weblogic.management.configuration.JMSTemplateMBean getJMSTemplateConfigMBean(Context ctx, String template)
          Deprecated. Retrieve the JMS template configuration MBean for the specified JMS template name.
static weblogic.management.configuration.JMSTopicMBean getJMSTopicConfigMBean(Context ctx, String jmsServerName, String topicName)
          Deprecated. Retrieve the JMS topic configuration MBean for the specified JMS topic name on the specified JMS server.
static weblogic.management.configuration.JMSTopicMBean getJMSTopicConfigMBean(Context ctx, Topic jmsTopic)
          Deprecated. Retrieve the JMS topic configuration MBean for the associated JMS topic.
 
Methods inherited from class weblogic.jms.extensions.JMSRuntimeHelper
getJMSConnectionRuntimeMBean, getJMSDestinationRuntimeMBean, getJMSDestinationRuntimeMBean, getJMSMessageConsumerRuntimeMBean, getJMSMessageProducerRuntimeMBean, getJMSServerRuntimeMBean, getJMSSessionRuntimeMBean, newJMSMessageIDToOld, oldJMSMessageIDToNew
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSHelper

public JMSHelper()
Deprecated. 
Method Detail

createPermanentQueueAsync

public static void createPermanentQueueAsync(Context ctx,
                                             String jmsServerName,
                                             String queueName,
                                             String jndiName)
                                      throws JMSException
Deprecated. 
Submit an asynchronous request to create a permanent JMS queue. This method updates the following:

Note: The createPermanentQueueAsync() method call can fail without throwing an exception. In addition, a thrown exception does not necessarily indicate that the method call failed.

The time required to create the destination on the JMS server and propagate the information on the JNDI namespace can be significant. The propagation delay increases if the environment contains multiple servers. It is recommended that you test for the existence of the queue using the session createQueue() method, rather than performing a JNDI lookup. By doing so, you can avoid some of the propagation-specific delays.

Parameters:
ctx - JNDI initial context.
jmsServerName - name of the JMS server
queueName - name of the JMS queue
jndiName - name used to lookup the destination within the JNDI namespace.
Throws:
javax.jms.JMSException - if a JMS error occurs
JMSException
Since:
WebLogic Server 6.0
See Also:
JMSHelper.createPermanentTopicAsync(javax.naming.Context, java.lang.String, java.lang.String, java.lang.String), QueueSession

createPermanentTopicAsync

public static void createPermanentTopicAsync(Context ctx,
                                             String jmsServerName,
                                             String topicName,
                                             String jndiName)
                                      throws JMSException
Deprecated. 
Submit an asynchronous request to create a permanent JMS topic. This method is similar to the createPermanentQueueAsync() method, except that it creates topics rather than queues. Once the topic is created, you can test for its existence using the session createTopic() method, rather than performing a JNDI lookup, to avoid some of the propagation-specific delays.

Note: Like the createPermanentQueueAsync() method, the createPermanentTopicAsync() method call can fail without throwing an exception. In addition, a thrown exception does not necessarily indicate that the method call failed.

Parameters:
ctx - JNDI initial context.
jmsServerName - name of the JMS server
topicName - name of the JMS topic
jndiName - name used to lookup the destination within the JNDI namespace.
Throws:
javax.jms.JMSException - if a JMS error occurs
JMSException
Since:
WebLogic Server 6.0
See Also:
JMSHelper.createPermanentQueueAsync(javax.naming.Context, java.lang.String, java.lang.String, java.lang.String), TopicSession

deletePermanentQueue

public static void deletePermanentQueue(Context ctx,
                                        String jmsServerName,
                                        String queueName)
                                 throws weblogic.jms.common.ConfigurationException
Deprecated. 
Submit a synchronous request to delete a permanent JMS queue. This method updates the specified domain's configuration file to remove the queue entry.

A thrown exception does not necessarily indicate that the method call failed.

Parameters:
ctx - JNDI initial context.
jmsServerName - name of the JMS server
queueName - name of the JMS queue
Throws:
weblogic.jms.common.ConfigurationException - if a JMS error occurs
Since:
WebLogic Server 8.1
See Also:
JMSHelper.deletePermanentTopic(javax.naming.Context, java.lang.String, java.lang.String)

deletePermanentTopic

public static void deletePermanentTopic(Context ctx,
                                        String jmsServerName,
                                        String topicName)
                                 throws weblogic.jms.common.ConfigurationException
Deprecated. 
Submit a synchronous request to delete a permanent JMS topic. This method is similar to the deletePermanentQueue() method, except that it deletes topics rather than queues.

A thrown exception does not necessarily indicate that the method call failed.

Parameters:
ctx - JNDI initial context.
jmsServerName - name of the JMS server
topicName - name of the JMS topic
Throws:
weblogic.jms.common.ConfigurationException - if a JMS error occurs
Since:
WebLogic Server 8.1
See Also:
JMSHelper.deletePermanentQueue(javax.naming.Context, java.lang.String, java.lang.String), TopicSession

createDistributedQueueAsync

public static void createDistributedQueueAsync(Context ctx,
                                               String distributedQName,
                                               String jndiName,
                                               String[] jmsServerNames)
                                        throws JMSException
Deprecated. 
Create a distributed queue and its members on the specified JMS server instances. A member queue will be created on each of the JMS servers specified, and the name given to each member will be a combination of the name of the distributed destination and the name of the JMS server where it is created.

A JMS template will also be created for the distributed destination with the same name as the destination, and this template will be used as the template for all of the member destinations.

Parameters:
ctx - the JNDI context to use to access the admin server
distributedQName - the name of the distributed queue to create
jndiName - the name to give the distributed queue in JNDI
jmsServerNames - a list of the names of the JMS server where distributed queue members should be created. This parameter must not be null.
Throws:
JMSException

createDistributedTopicAsync

public static void createDistributedTopicAsync(Context ctx,
                                               String distributedTName,
                                               String jndiName,
                                               String[] jmsServerNames)
                                        throws JMSException
Deprecated. 
Create a distributed topic and its members on the specified JMS server instances. A member topic will be created on each of the JMS servers specified, and the name given to each member will be a combination of the name of the distributed destination and the name of the JMS server where it is created.

A JMS template will also be created for the distributed destination with the same name as the destination, and this template will be used as the template for all of the member destinations.

Parameters:
ctx - the JNDI context to use to access the admin server
distributedTName - the name of the distributed topic to create
jndiName - the name to give the distributed topic in JNDI
jmsServerNames - a list of the names of the JMS server where distributed topic members should be created. This parameter must not be null.
Throws:
JMSException

deleteDistributedQueue

public static void deleteDistributedQueue(Context ctx,
                                          String distributedQName)
                                   throws JMSException
Deprecated. 
Delete a distributed queue and all its members. This method will iterate through all the members, and delete the member queues as well as the distributed queue itself. In addition, the default JMS template -- which has the same name as the distributed queue itself -- will be deleted.

Throws:
JMSException

deleteDistributedTopic

public static void deleteDistributedTopic(Context ctx,
                                          String distributedQName)
                                   throws JMSException
Deprecated. 
Delete a distributed topic and all its members. This method will iterate through all the members, and delete the member topics as well as the distributed topic itself. In addition, the default JMS template -- which has the same name as the distributed topic itself -- will be deleted.

Throws:
JMSException

getJMSTemplateConfigMBean

public static weblogic.management.configuration.JMSTemplateMBean getJMSTemplateConfigMBean(Context ctx,
                                                                                           String template)
                                                                                    throws JMSException
Deprecated. 
Retrieve the JMS template configuration MBean for the specified JMS template name.

Parameters:
ctx - JNDI initial context.
template - name of the JMS Template
Throws:
javax.jms.JMSException - if a JMS error occurs
JMSException
Since:
WebLogic Server 8.1
See Also:
weblogic.management.configuration.JMSTemplateMBean

getJMSTopicConfigMBean

public static weblogic.management.configuration.JMSTopicMBean getJMSTopicConfigMBean(Context ctx,
                                                                                     Topic jmsTopic)
                                                                              throws JMSException
Deprecated. 
Retrieve the JMS topic configuration MBean for the associated JMS topic.

Parameters:
ctx - JNDI initial context.
jmsTopic - javax.jms.Topic
Throws:
javax.jms.JMSException - if a JMS error occurs
JMSException
Since:
WebLogic Server 8.1
See Also:
weblogic.management.configuration.JMSTopicMBean

getJMSTopicConfigMBean

public static weblogic.management.configuration.JMSTopicMBean getJMSTopicConfigMBean(Context ctx,
                                                                                     String jmsServerName,
                                                                                     String topicName)
                                                                              throws JMSException
Deprecated. 
Retrieve the JMS topic configuration MBean for the specified JMS topic name on the specified JMS server.

Parameters:
ctx - JNDI initial context.
jmsServerName - name of the JMS server
topicName - name of the JMS topic
Throws:
javax.jms.JMSException - if a JMS error occurs
JMSException
Since:
WebLogic Server 8.1
See Also:
weblogic.management.configuration.JMSTopicMBean

getJMSQueueConfigMBean

public static weblogic.management.configuration.JMSQueueMBean getJMSQueueConfigMBean(Context ctx,
                                                                                     Queue jmsQueue)
                                                                              throws JMSException
Deprecated. 
Retrieve the JMS queue configuration MBean for the associated JMS queue.

Parameters:
ctx - JNDI initial context.
jmsQueue - javax.jms.Queue
Throws:
javax.jms.JMSException - if a JMS error occurs
JMSException
Since:
WebLogic Server 8.1
See Also:
weblogic.management.configuration.JMSQueueMBean

getJMSQueueConfigMBean

public static weblogic.management.configuration.JMSQueueMBean getJMSQueueConfigMBean(Context ctx,
                                                                                     String jmsServerName,
                                                                                     String queueName)
                                                                              throws JMSException
Deprecated. 
Retrieve the JMS queue configuration MBean for the specified JMS queue name on the specified JMS server.

Parameters:
ctx - JNDI initial context.
jmsServerName - name of the JMS server
queueName - name of the JMS queue
Throws:
javax.jms.JMSException - if a JMS error occurs
JMSException
Since:
WebLogic Server 8.1
See Also:
weblogic.management.configuration.JMSQueueMBean

getJMSServerConfigMBean

public static weblogic.management.configuration.JMSServerMBean getJMSServerConfigMBean(Context ctx,
                                                                                       String jmsServerName)
                                                                                throws JMSException
Deprecated. 
Retrieve the JMS server configuration MBean for the specified JMS server name.

Parameters:
ctx - JNDI initial context.
jmsServerName - name of the JMS server
Throws:
javax.jms.JMSException - if a JMS error occurs
JMSException
Since:
WebLogic Server 8.1
See Also:
weblogic.management.configuration.JMSServerMBean

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs103
Copyright 1996,2008, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.