|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.jms.extensions.JMSHelper
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()
|
Method Summary | |
static void |
createDistributedQueueAsync(javax.naming.Context ctx,
java.lang.String distributedQName,
java.lang.String jndiName,
java.lang.String[] jmsServerNames)
Create a distributed queue and its members on the specified JMS server instances. |
static void |
createDistributedTopicAsync(javax.naming.Context ctx,
java.lang.String distributedTName,
java.lang.String jndiName,
java.lang.String[] jmsServerNames)
Create a distributed topic and its members on the specified JMS server instances. |
static void |
createPermanentQueueAsync(javax.naming.Context ctx,
java.lang.String jmsServerName,
java.lang.String queueName,
java.lang.String jndiName)
Submit an asynchronous request to create a permanent JMS queue. |
static void |
createPermanentTopicAsync(javax.naming.Context ctx,
java.lang.String jmsServerName,
java.lang.String topicName,
java.lang.String jndiName)
Submit an asynchronous request to create a permanent JMS topic. |
static void |
deleteDistributedQueue(javax.naming.Context ctx,
java.lang.String distributedQName)
Delete a distributed queue and all its members. |
static void |
deleteDistributedTopic(javax.naming.Context ctx,
java.lang.String distributedQName)
Delete a distributed topic and all its members. |
static void |
deletePermanentQueue(javax.naming.Context ctx,
java.lang.String jmsServerName,
java.lang.String queueName)
Submit a synchronous request to delete a permanent JMS queue. |
static void |
deletePermanentTopic(javax.naming.Context ctx,
java.lang.String jmsServerName,
java.lang.String topicName)
Submit a synchronous request to delete a permanent JMS topic. |
static JMSConnectionRuntimeMBean |
getJMSConnectionRuntimeMBean(javax.naming.Context ctx,
javax.jms.Connection connection)
Retrieve the JMS connection runtime MBean for the associated JMS connection. |
static JMSDestinationRuntimeMBean |
getJMSDestinationRuntimeMBean(javax.naming.Context ctx,
javax.jms.Destination destination)
Retrieve the JMS destination runtime MBean for the associated JMS destination. |
static JMSDestinationRuntimeMBean |
getJMSDestinationRuntimeMBean(javax.naming.Context ctx,
java.lang.String jmsServerName,
java.lang.String destinationName)
Retrieve the JMS destination runtime MBean for the specified JMS destination name on the specified JMS server. |
static JMSConsumerRuntimeMBean |
getJMSMessageConsumerRuntimeMBean(javax.naming.Context ctx,
javax.jms.MessageConsumer messageConsumer)
Retrieve the JMS consumer runtime MBean for the associated JMS message consumer. |
static JMSProducerRuntimeMBean |
getJMSMessageProducerRuntimeMBean(javax.naming.Context ctx,
javax.jms.MessageProducer messageProducer)
Retrieve the JMS producer runtime MBean for the associated JMS message producer. |
static JMSQueueMBean |
getJMSQueueConfigMBean(javax.naming.Context ctx,
javax.jms.Queue jmsQueue)
Retrieve the JMS queue configuration MBean for the associated JMS queue. |
static JMSQueueMBean |
getJMSQueueConfigMBean(javax.naming.Context ctx,
java.lang.String jmsServerName,
java.lang.String queueName)
Retrieve the JMS queue configuration MBean for the specified JMS queue name on the specified JMS server. |
static JMSServerMBean |
getJMSServerConfigMBean(javax.naming.Context ctx,
java.lang.String jmsServerName)
Retrieve the JMS server configuration MBean for the specified JMS server name. |
static JMSServerRuntimeMBean |
getJMSServerRuntimeMBean(javax.naming.Context ctx,
javax.jms.Destination destination)
Retrieve the JMS server runtime MBean hosting the associated JMS destination. |
static JMSServerRuntimeMBean |
getJMSServerRuntimeMBean(javax.naming.Context ctx,
java.lang.String mbeanName)
Retrieve the JMS server runtime MBean for the specified JMS server name. |
static JMSSessionRuntimeMBean |
getJMSSessionRuntimeMBean(javax.naming.Context ctx,
javax.jms.Session session)
Retrieve the JMS session runtime MBean for the associated JMS session. |
static JMSTemplateMBean |
getJMSTemplateConfigMBean(javax.naming.Context ctx,
java.lang.String template)
Retrieve the JMS template configuration MBean for the specified JMS template name. |
static JMSTopicMBean |
getJMSTopicConfigMBean(javax.naming.Context ctx,
java.lang.String jmsServerName,
java.lang.String topicName)
Retrieve the JMS topic configuration MBean for the specified JMS topic name on the specified JMS server. |
static JMSTopicMBean |
getJMSTopicConfigMBean(javax.naming.Context ctx,
javax.jms.Topic jmsTopic)
Retrieve the JMS topic configuration MBean for the associated JMS topic. |
java.lang.String |
newJMSMessageIDToOld(java.lang.String messageId)
Convert WebLogic JMS 6.0 JMSMessageID format to the pre-6.0 format. |
java.lang.String |
oldJMSMessageIDToNew(java.lang.String messageId,
long timeStamp)
Convert WebLogic JMS pre-6.0 JMSMessageID format into the 6.0 format. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public JMSHelper()
Method Detail |
public static void createPermanentQueueAsync(javax.naming.Context ctx, java.lang.String jmsServerName, java.lang.String queueName, java.lang.String jndiName) throws javax.jms.JMSException
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.
ctx
- JNDI initial context.jmsServerName
- name of the JMS serverqueueName
- name of the JMS queuejndiName
- name used to lookup the destination
within the JNDI namespace.createPermanentTopicAsync(javax.naming.Context, java.lang.String, java.lang.String, java.lang.String)
,
QueueSession.createQueue(java.lang.String)
public static void createPermanentTopicAsync(javax.naming.Context ctx, java.lang.String jmsServerName, java.lang.String topicName, java.lang.String jndiName) throws javax.jms.JMSException
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.
ctx
- JNDI initial context.jmsServerName
- name of the JMS servertopicName
- name of the JMS topicjndiName
- name used to lookup the destination
within the JNDI namespace.createPermanentQueueAsync(javax.naming.Context, java.lang.String, java.lang.String, java.lang.String)
,
TopicSession.createTopic(java.lang.String)
public static void deletePermanentQueue(javax.naming.Context ctx, java.lang.String jmsServerName, java.lang.String queueName) throws weblogic.jms.common.ConfigurationException
A thrown exception does not necessarily indicate that the method call failed.
ctx
- JNDI initial context.jmsServerName
- name of the JMS serverqueueName
- name of the JMS queueweblogic.jms.extensions.JMSHelper#deletePermanentTopicAsync
public static void deletePermanentTopic(javax.naming.Context ctx, java.lang.String jmsServerName, java.lang.String topicName) throws weblogic.jms.common.ConfigurationException
A thrown exception does not necessarily indicate that the method call failed.
ctx
- JNDI initial context.jmsServerName
- name of the JMS servertopicName
- name of the JMS topicweblogic.jms.extensions.JMSHelper#deletePermanentQueueAsync
,
TopicSession.createTopic(java.lang.String)
public static void createDistributedQueueAsync(javax.naming.Context ctx, java.lang.String distributedQName, java.lang.String jndiName, java.lang.String[] jmsServerNames) throws javax.jms.JMSException
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.
ctx
- the JNDI context to use to access the admin serverdistributedQName
- the name of the distributed queue to createjndiName
- the name to give the distributed queue in JNDIjmsServerNames
- a list of the names of the JMS server where
distributed queue members should be created. This parameter must not
be null.public static void createDistributedTopicAsync(javax.naming.Context ctx, java.lang.String distributedTName, java.lang.String jndiName, java.lang.String[] jmsServerNames) throws javax.jms.JMSException
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.
ctx
- the JNDI context to use to access the admin serverdistributedTName
- the name of the distributed topic to createjndiName
- the name to give the distributed topic in JNDIjmsServerNames
- a list of the names of the JMS server where
distributed topic members should be created. This parameter must not
be null.public static void deleteDistributedQueue(javax.naming.Context ctx, java.lang.String distributedQName) throws javax.jms.JMSException
public static void deleteDistributedTopic(javax.naming.Context ctx, java.lang.String distributedQName) throws javax.jms.JMSException
public static JMSTemplateMBean getJMSTemplateConfigMBean(javax.naming.Context ctx, java.lang.String template) throws javax.jms.JMSException
ctx
- JNDI initial context.template
- name of the JMS TemplateJMSTemplateMBean
public static JMSTopicMBean getJMSTopicConfigMBean(javax.naming.Context ctx, javax.jms.Topic jmsTopic) throws javax.jms.JMSException
ctx
- JNDI initial context.jmsTopic
- javax.jms.TopicJMSTopicMBean
public static JMSTopicMBean getJMSTopicConfigMBean(javax.naming.Context ctx, java.lang.String jmsServerName, java.lang.String topicName) throws javax.jms.JMSException
ctx
- JNDI initial context.jmsServerName
- name of the JMS servertopicName
- name of the JMS topicJMSTopicMBean
public static JMSQueueMBean getJMSQueueConfigMBean(javax.naming.Context ctx, javax.jms.Queue jmsQueue) throws javax.jms.JMSException
ctx
- JNDI initial context.jmsQueue
- javax.jms.QueueJMSQueueMBean
public static JMSQueueMBean getJMSQueueConfigMBean(javax.naming.Context ctx, java.lang.String jmsServerName, java.lang.String queueName) throws javax.jms.JMSException
ctx
- JNDI initial context.jmsServerName
- name of the JMS serverjmsQueue
- name of the JMS queueJMSQueueMBean
public static JMSServerMBean getJMSServerConfigMBean(javax.naming.Context ctx, java.lang.String jmsServerName) throws javax.jms.JMSException
ctx
- JNDI initial context.jmsServerName
- name of the JMS serverJMSServerMBean
public static JMSConnectionRuntimeMBean getJMSConnectionRuntimeMBean(javax.naming.Context ctx, javax.jms.Connection connection) throws javax.jms.JMSException
ctx
- JNDI initial context.connection
- javax.jms.ConnectionJMSConnectionRuntimeMBean
public static JMSProducerRuntimeMBean getJMSMessageProducerRuntimeMBean(javax.naming.Context ctx, javax.jms.MessageProducer messageProducer) throws javax.jms.JMSException
ctx
- JNDI initial context.messageProducer
- javax.jms.MessageProducerJMSProducerRuntimeMBean
public static JMSConsumerRuntimeMBean getJMSMessageConsumerRuntimeMBean(javax.naming.Context ctx, javax.jms.MessageConsumer messageConsumer) throws javax.jms.JMSException
ctx
- JNDI initial context.messageConsumer
- javax.jms.MessageConsumerJMSConsumerRuntimeMBean
public static JMSSessionRuntimeMBean getJMSSessionRuntimeMBean(javax.naming.Context ctx, javax.jms.Session session) throws javax.jms.JMSException
ctx
- JNDI initial contextsession
- javax.jms.SessionJMSSessionRuntimeMBean
public static JMSServerRuntimeMBean getJMSServerRuntimeMBean(javax.naming.Context ctx, javax.jms.Destination destination) throws javax.jms.JMSException
ctx
- JNDI initial contextdestination
- javax.jms.DestinationJMSServerRuntimeMBean
public static JMSDestinationRuntimeMBean getJMSDestinationRuntimeMBean(javax.naming.Context ctx, java.lang.String jmsServerName, java.lang.String destinationName) throws javax.jms.JMSException
ctx
- JNDI initial contextjmsServerName
- name of the JMS serverdestinationName
- name of the JMS destinationJMSDestinationRuntimeMBean
public static JMSDestinationRuntimeMBean getJMSDestinationRuntimeMBean(javax.naming.Context ctx, javax.jms.Destination destination) throws javax.jms.JMSException
ctx
- JNDI initial contextdestination
- javax.jms.DestinationJMSDestinationRuntimeMBean
public static JMSServerRuntimeMBean getJMSServerRuntimeMBean(javax.naming.Context ctx, java.lang.String mbeanName) throws javax.jms.JMSException
ctx
- JNDI initial contextmbeanName
- name of the JMS serverJMSServerRuntimeMBean
public java.lang.String oldJMSMessageIDToNew(java.lang.String messageId, long timeStamp) throws javax.jms.JMSException
messageId
- old JMSMessageID.timestamp
- timestamp of message.newJMSMessageIDToOld(java.lang.String)
public java.lang.String newJMSMessageIDToOld(java.lang.String messageId) throws javax.jms.JMSException
messageId
- old JMSMessageID.oldJMSMessageIDToNew(java.lang.String, long)
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs81 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |