Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.jms.extensions
Class JMSHelper

    java.lang.Object
      |
      +--weblogic.jms.extensions.JMSHelper

public final class JMSHelper
extends java.lang.Object

JMS extension methods for dynamically creating permanent queues and topics, and converting between WebLogic JMS 6.0 and pre-6.0 JMSMessageID formats. It is recommended that the use of the create methods be strictly limited, as they directly modify the configuration file and provide minimal feedback for detecting success or failure.

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

Constructor Summary
`JMSHelper()`

Method Summary
`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 weblogic.management.configuration.RepositoryMBean` | `getRepositoryForDomain(java.lang.String domainName, MBeanHome mBeanHome)` Get the repository for the given domain, this is used to save changes to the configuration file.
`java.lang.String` | `newJMSMessageIDToOld(java.lang.String messageId)` Convert WebLogic JMS 6.0 JMSMessageID format to pre-6.0 format.
`java.lang.String` | `oldJMSMessageIDToNew(java.lang.String messageId, long timeStamp)` Convert WebLogic JMS pre-6.0 JMSMessageID format into 6.0 format.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JMSHelper

    public JMSHelper()

Method Detail

### getRepositoryForDomain

    public static weblogic.management.configuration.RepositoryMBean getRepositoryForDomain(java.lang.String domainName,
                                                                                           MBeanHome mBeanHome)
                                                  throws javax.management.InstanceNotFoundException,
                                                         javax.management.MalformedObjectNameException

  Get the repository for the given domain, this is used to save changes to the configuration file. Hack around CR34475 - no other way to know the repository that contains a given domain.

  See Also:
    `weblogic.management.console.MBeans#getRepositoryForDomain`

### createPermanentQueueAsync

    public static void createPermanentQueueAsync(javax.naming.Context ctx,
                                                 java.lang.String jmsServerName,
                                                 java.lang.String queueName,
                                                 java.lang.String jndiName)
                                          throws javax.jms.JMSException

  Submit an asynchronous request to create a permanent JMS queue. This method updates the following:
  - Configuration file associated with the specified domain to include the dynamically created queue.
  - JNDI namespace to advertise the destination.

  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 perform a JNDI lookup. By doing so, you can avoid some of the propagation-specific delay.

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

### createPermanentTopicAsync

    public static void createPermanentTopicAsync(javax.naming.Context ctx,
                                                 java.lang.String jmsServerName,
                                                 java.lang.String topicName,
                                                 java.lang.String jndiName)
                                          throws javax.jms.JMSException

  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 perform a JNDI lookup, to avoid some of the propagation-specific delay.

  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.
    `queueName` - name of the queue.
    `jndiName` - name used to lookup the destination within the JNDI namespace.
  Throws:
    javax.jms.JMSException - if a JMS error occurs
  See Also:
    `createPermanentQueueAsync(javax.naming.Context, java.lang.String, java.lang.String, java.lang.String)`, `TopicSession.createTopic(java.lang.String)`

### oldJMSMessageIDToNew

    public java.lang.String oldJMSMessageIDToNew(java.lang.String messageId,
                                                 long timeStamp)
                                          throws javax.jms.JMSException

  Convert WebLogic JMS pre-6.0 JMSMessageID format into 6.0 format.

  Parameters:
    `messageId` - old JMSMessageID.
    `timestamp` - timestamp of message.
  Throws:
    javax.jms.JMSException - if a JMS error occurs
  See Also:
    `newJMSMessageIDToOld(java.lang.String)`

### newJMSMessageIDToOld

    public java.lang.String newJMSMessageIDToOld(java.lang.String messageId)
                                          throws javax.jms.JMSException

  Convert WebLogic JMS 6.0 JMSMessageID format to pre-6.0 format.

  Parameters:
    `messageId` - old JMSMessageID.
  Throws:
    javax.jms.JMSException - if a JMS error occurs
  See Also:
    `oldJMSMessageIDToNew(java.lang.String, long)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs70
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference