Class AuthenticatedXAConnectionFactory

  • All Implemented Interfaces:
    javax.jms.ConnectionFactory, javax.jms.XAConnectionFactory

    public class AuthenticatedXAConnectionFactory
    extends java.lang.Object
    implements javax.jms.XAConnectionFactory, javax.jms.ConnectionFactory
    Implementation of an authenticated XAConnectionFactory. 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 java.lang.String connectionFactoryName
      JMS Connection Factory name - used if connectionFactory instance not passed
      protected javax.jms.XAConnectionFactory xaConnectionFactory
      JMS XA Connection Factory instance
    • 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)  
      javax.jms.XAConnection createXAConnection()  
      javax.jms.XAConnection createXAConnection​(java.lang.String username, java.lang.String password)  
      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
      protected javax.jms.XAConnectionFactory getXAConnectionFactory​(java.util.Properties properties)  
      void setPassword​(java.lang.String password)  
      void setProperties​(java.util.Properties properties)  
      void setUsername​(java.lang.String username)  
      void setXAConnectionFactory​(javax.jms.XAConnectionFactory xaConnectionFactory)  
      void setXAConnectionFactoryName​(java.lang.String connectionFactoryName)  
      • Methods inherited from class java.lang.Object

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

      • xaConnectionFactory

        protected javax.jms.XAConnectionFactory xaConnectionFactory
        JMS XA Connection Factory instance
      • connectionFactoryName

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

      • AuthenticatedXAConnectionFactory

        public AuthenticatedXAConnectionFactory()
    • Method Detail

      • setXAConnectionFactory

        public void setXAConnectionFactory​(javax.jms.XAConnectionFactory xaConnectionFactory)
      • setXAConnectionFactoryName

        public void setXAConnectionFactoryName​(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)
      • createXAConnection

        public javax.jms.XAConnection createXAConnection()
                                                  throws javax.jms.JMSException
        Specified by:
        createXAConnection in interface javax.jms.XAConnectionFactory
        Throws:
        javax.jms.JMSException
      • createXAConnection

        public javax.jms.XAConnection createXAConnection​(java.lang.String username,
                                                         java.lang.String password)
                                                  throws javax.jms.JMSException
        Specified by:
        createXAConnection in interface javax.jms.XAConnectionFactory
        Throws:
        javax.jms.JMSException
      • getXAConnectionFactory

        protected javax.jms.XAConnectionFactory getXAConnectionFactory​(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:
      • 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