Class JmsConnectionHandler

java.lang.Object
org.bedework.util.jms.JmsConnectionHandler
All Implemented Interfaces:
org.bedework.util.logging.Logged

public class JmsConnectionHandler extends Object implements org.bedework.util.logging.Logged
This is a class to ease setting up of JMS connections..
Author:
Mike Douglass
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int
     
    static final boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    javax.jms.MessageConsumer
     
    org.bedework.util.logging.BwLogger
     
    javax.jms.MessageProducer
     
    javax.jms.Session
     
    void
    open(String queueName)
    Open a connection to the named queue ready to create a producer or consumer.
    javax.jms.Message
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.bedework.util.logging.Logged

    audit, debug, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, trace, warn
  • Field Details

    • ackMode

      public static int ackMode
    • useTransactions

      public static final boolean useTransactions
      See Also:
  • Constructor Details

    • JmsConnectionHandler

      public JmsConnectionHandler(Properties pr)
  • Method Details

    • open

      public void open(String queueName) throws NotificationException
      Open a connection to the named queue ready to create a producer or consumer.
      Parameters:
      queueName - the queue
      Throws:
      NotificationException - on fatal error
    • close

      public void close()
    • getSession

      public javax.jms.Session getSession()
      Returns:
      jms session
    • getProducer

      public javax.jms.MessageProducer getProducer() throws NotificationException
      Returns:
      a message producer
      Throws:
      NotificationException - on fatal error
    • getConsumer

      public javax.jms.MessageConsumer getConsumer() throws NotificationException
      Returns:
      a message consumer
      Throws:
      NotificationException - on fatal error
    • receive

      public javax.jms.Message receive() throws NotificationException
      Returns:
      next message
      Throws:
      NotificationException - on fatal error
    • getLogger

      public org.bedework.util.logging.BwLogger getLogger()
      Specified by:
      getLogger in interface org.bedework.util.logging.Logged