Class AuthenticatedConnectionFactory

  • All Implemented Interfaces:
    javax.jms.ConnectionFactory

    public class AuthenticatedConnectionFactory
    extends java.lang.Object
    implements javax.jms.ConnectionFactory
    Implementation of an authenticated ConnectionFactory. Use Cases for this are primarily around WebLogic's JMS authentication or Spring wrapped connectionFactories.
    Author:
    Ikasan Development Team
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.jms.ConnectionFactory connectionFactory
      JMS Connection Factory instance
      protected java.lang.String connectionFactoryName
      JMS Connection Factory name - used if connectionFactory instance not passed
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.jms.Connection createConnection()  
      javax.jms.Connection createConnection​(java.lang.String username, java.lang.String password)  
      protected javax.jms.ConnectionFactory getConnectionFactory​(java.util.Properties properties)  
      protected javax.naming.InitialContext getInitialContext()
      Factory method (for convenience of testing) for getting the initial context
      protected javax.naming.InitialContext getInitialContext​(java.util.Properties properties)
      Factory method (for convenience of testing) for getting the initial context
      protected java.util.Properties getProperties()
      Factory method (for convenience of testing) for getting the properties
      void setConnectionFactory​(javax.jms.ConnectionFactory connectionFactory)  
      void setConnectionFactoryName​(java.lang.String connectionFactoryName)  
      void setPassword​(java.lang.String password)  
      void setProperties​(java.util.Properties properties)  
      void setUsername​(java.lang.String username)  
      • Methods inherited from class java.lang.Object

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

      • connectionFactory

        protected javax.jms.ConnectionFactory connectionFactory
        JMS Connection Factory instance
      • connectionFactoryName

        protected java.lang.String connectionFactoryName
        JMS Connection Factory name - used if connectionFactory instance not passed
    • Constructor Detail

      • AuthenticatedConnectionFactory

        public AuthenticatedConnectionFactory()
    • Method Detail

      • setConnectionFactory

        public void setConnectionFactory​(javax.jms.ConnectionFactory connectionFactory)
      • setConnectionFactoryName

        public void setConnectionFactoryName​(java.lang.String connectionFactoryName)
      • setProperties

        public void setProperties​(java.util.Properties properties)
      • setUsername

        public void setUsername​(java.lang.String username)
      • setPassword

        public void setPassword​(java.lang.String password)
      • createConnection

        public javax.jms.Connection createConnection()
                                              throws javax.jms.JMSException
        Specified by:
        createConnection in interface javax.jms.ConnectionFactory
        Throws:
        javax.jms.JMSException
      • createConnection

        public javax.jms.Connection createConnection​(java.lang.String username,
                                                     java.lang.String password)
                                              throws javax.jms.JMSException
        Specified by:
        createConnection in interface javax.jms.ConnectionFactory
        Throws:
        javax.jms.JMSException
      • getConnectionFactory

        protected javax.jms.ConnectionFactory getConnectionFactory​(java.util.Properties properties)
      • getInitialContext

        protected javax.naming.InitialContext getInitialContext()
                                                         throws javax.naming.NamingException
        Factory method (for convenience of testing) for getting the initial context
        Returns:
        Throws:
        javax.naming.NamingException
      • getInitialContext

        protected javax.naming.InitialContext getInitialContext​(java.util.Properties properties)
                                                         throws javax.naming.NamingException
        Factory method (for convenience of testing) for getting the initial context
        Parameters:
        properties -
        Returns:
        Throws:
        javax.naming.NamingException
      • getProperties

        protected java.util.Properties getProperties()
        Factory method (for convenience of testing) for getting the properties
        Returns: