org.springframework.jms.support
Class JmsUtils

java.lang.Object
  extended byorg.springframework.jms.support.JmsUtils

public abstract class JmsUtils
extends Object

Generic utility methods for working with JMS.

Since:
1.1
Author:
Juergen Hoeller

Constructor Summary
JmsUtils()
           
 
Method Summary
static void closeConnection(Connection con)
          Close the given JMS Connection and ignore any thrown exception.
static void closeMessageConsumer(MessageConsumer consumer)
          Close the given JMS MessageConsumer and ignore any thrown exception.
static void closeSession(Session session)
          Close the given JMS Session and ignore any thrown exception.
static JmsException convertJmsAccessException(JMSException ex)
          Convert the specified checked JMSException to a Spring runtime JmsException equivalent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmsUtils

public JmsUtils()
Method Detail

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.

Parameters:
con - the JMS Connection to close

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.

Parameters:
session - the JMS Session to close

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.

Parameters:
consumer - the JMS MessageConsumer to close

convertJmsAccessException

public static JmsException convertJmsAccessException(JMSException ex)
Convert the specified checked JMSException to a Spring runtime JmsException equivalent.

Parameters:
ex - the original checked JMSException to convert
Returns:
the Spring runtime JmsException wrapping ex.


Copyright (C) 2003-2004 The Spring Framework Project.