psdi.common.emailstner

Class JMSConfig

  • java.lang.Object
    • psdi.common.emailstner.JMSConfig


  • public class JMSConfig
    extends java.lang.Object
    An utility class for getting JMS managed objects like ConnectionFactory and Queue/Topic from the JNDI tree. This class is designed such that there is one JMSConfig object per JNDI tree. The JNDI tree is uniquely located by the Context.PROVIDER_URL and the Context.INITIAL_CONTEXT_FACTORY entries in the env object.
    • Constructor Summary

      Constructors 
      Constructor and Description
      JMSConfig() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static javax.naming.Context getContext()
      Get the context
      static javax.jms.QueueSender getQSender(javax.jms.QueueSession qsession, java.lang.String queueName, MXLogger logger)
      Get the queue sender
      static javax.jms.QueueSession getQSession(java.lang.String factoryName, MXLogger logger)
      Get the queue session
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JMSConfig

        public JMSConfig()
    • Method Detail

      • getContext

        public static javax.naming.Context getContext()
                                               throws javax.naming.NamingException
        Get the context
        Returns:
        Context
        Throws:
        javax.naming.NamingException
      • getQSession

        public static javax.jms.QueueSession getQSession(java.lang.String factoryName,
                                                         MXLogger logger)
                                                  throws java.lang.Exception
        Get the queue session
        Parameters:
        factoryName -
        Returns:
        session
        Throws:
        java.lang.Exception
      • getQSender

        public static javax.jms.QueueSender getQSender(javax.jms.QueueSession qsession,
                                                       java.lang.String queueName,
                                                       MXLogger logger)
                                                throws java.lang.Exception
        Get the queue sender
        Parameters:
        qsession -
        queueName -
        Returns:
        queue sender
        Throws:
        java.lang.Exception