Class ConnectionFactoryProxy

  • All Implemented Interfaces:
    javax.jms.ConnectionFactory

    public class ConnectionFactoryProxy
    extends java.lang.Object
    implements javax.jms.ConnectionFactory
    Proxy connection factory to wrap around provided XAConnectionFactory.
    Author:
    Gytis Trikleris
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.jms.Connection createConnection()
      Get XA connection from the provided factory and wrap it with ConnectionProxy.
      javax.jms.Connection createConnection​(java.lang.String userName, java.lang.String password)
      Get XA connection from the provided factory with credentials and wrap it with ConnectionProxy.
      javax.jms.JMSContext createContext()  
      javax.jms.JMSContext createContext​(int sessionMode)  
      javax.jms.JMSContext createContext​(java.lang.String userName, java.lang.String password)  
      javax.jms.JMSContext createContext​(java.lang.String userName, java.lang.String password, int sessionMode)  
      • Methods inherited from class java.lang.Object

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

      • ConnectionFactoryProxy

        public ConnectionFactoryProxy​(javax.jms.XAConnectionFactory xaConnectionFactory,
                                      TransactionHelper transactionHelper)
        Parameters:
        xaConnectionFactory - factory to get XA connection instances, not null.
        transactionHelper - utility to make transaction resources registration easier.
    • Method Detail

      • createConnection

        public javax.jms.Connection createConnection()
                                              throws javax.jms.JMSException
        Get XA connection from the provided factory and wrap it with ConnectionProxy.
        Specified by:
        createConnection in interface javax.jms.ConnectionFactory
        Returns:
        XA connection wrapped with ConnectionProxy.
        Throws:
        javax.jms.JMSException - if failure occurred creating XA connection.
      • createConnection

        public javax.jms.Connection createConnection​(java.lang.String userName,
                                                     java.lang.String password)
                                              throws javax.jms.JMSException
        Get XA connection from the provided factory with credentials and wrap it with ConnectionProxy.
        Specified by:
        createConnection in interface javax.jms.ConnectionFactory
        Parameters:
        userName -
        password -
        Returns:
        XA connection wrapped with ConnectionProxy.
        Throws:
        javax.jms.JMSException - if failure occurred creating XA connection.
      • createContext

        public javax.jms.JMSContext createContext()
        Specified by:
        createContext in interface javax.jms.ConnectionFactory
      • createContext

        public javax.jms.JMSContext createContext​(java.lang.String userName,
                                                  java.lang.String password)
        Specified by:
        createContext in interface javax.jms.ConnectionFactory
      • createContext

        public javax.jms.JMSContext createContext​(java.lang.String userName,
                                                  java.lang.String password,
                                                  int sessionMode)
        Specified by:
        createContext in interface javax.jms.ConnectionFactory
      • createContext

        public javax.jms.JMSContext createContext​(int sessionMode)
        Specified by:
        createContext in interface javax.jms.ConnectionFactory