类 JmsUtils


  • public abstract class JmsUtils
    extends Object
    Generic utility methods for working with JMS. Mainly for internal use within the framework, but also useful for custom JMS access code.
    从以下版本开始:
    1.1
    作者:
    Juergen Hoeller
    • 构造器详细资料

    • 方法详细资料

      • closeConnection

        public static void closeConnection​(Connection con)
        Close the given JMS Connection and ignore any thrown exception. This is useful for typical finally blocks in manual JMS code.
        参数:
        con - the JMS Connection to close (may be null)
      • closeConnection

        public static void closeConnection​(Connection con,
                                           boolean stop)
        Close the given JMS Connection and ignore any thrown exception. This is useful for typical finally blocks in manual JMS code.
        参数:
        con - the JMS Connection to close (may be null)
        stop - whether to call stop() before closing
      • closeSession

        public static void closeSession​(Session session)
        Close the given JMS Session and ignore any thrown exception. This is useful for typical finally blocks in manual JMS code.
        参数:
        session - the JMS Session to close (may be null)
      • closeMessageProducer

        public static void closeMessageProducer​(MessageProducer producer)
        Close the given JMS MessageProducer and ignore any thrown exception. This is useful for typical finally blocks in manual JMS code.
        参数:
        producer - the JMS MessageProducer to close (may be null)
      • closeMessageConsumer

        public static void closeMessageConsumer​(MessageConsumer consumer)
        Close the given JMS MessageConsumer and ignore any thrown exception. This is useful for typical finally blocks in manual JMS code.
        参数:
        consumer - the JMS MessageConsumer to close (may be null)
      • closeQueueBrowser

        public static void closeQueueBrowser​(QueueBrowser browser)
        Close the given JMS QueueBrowser and ignore any thrown exception. This is useful for typical finally blocks in manual JMS code.
        参数:
        browser - the JMS QueueBrowser to close (may be null)
      • closeQueueRequestor

        public static void closeQueueRequestor​(QueueRequestor requestor)
        Close the given JMS QueueRequestor and ignore any thrown exception. This is useful for typical finally blocks in manual JMS code.
        参数:
        requestor - the JMS QueueRequestor to close (may be null)