org.jcoderz.commons.util
Class JmsUtil

java.lang.Object
  extended by org.jcoderz.commons.util.JmsUtil

public final class JmsUtil
extends Object

Collects some JMS utility functions.


Method Summary
static void close(Connection connection)
          Closes the jms connection (safe).
static void close(MessageProducer producer)
          Closes the jms message producer (safe).
static void close(Session session)
          Closes the jms session (safe).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

close

public static void close(Session session)
Closes the jms session (safe). This method tries to close the given session and if an JMSException occurs a message with the level Level.FINE is logged. It's safe to pass a null reference for the argument.

Parameters:
session - The jms session that should be closed.

close

public static void close(Connection connection)
Closes the jms connection (safe). This method tries to close the given connection and if an JMSException occurs a message with the level Level.FINE is logged. It's safe to pass a null reference for the argument.

Parameters:
connection - The connection to be closed.

close

public static void close(MessageProducer producer)
Closes the jms message producer (safe). This method tries to close the given message producer and if an JMSException occurs a message with the level Level.FINE is logged. It's safe to pass a null reference for the argument.

Parameters:
producer - The message producer to be closed.


Copyright 2007 The jCoderZ Project.