Class ConnectionFactoryProxy

java.lang.Object
org.jboss.narayana.jta.jms.ConnectionFactoryProxy
All Implemented Interfaces:
jakarta.jms.ConnectionFactory

public class ConnectionFactoryProxy extends Object implements jakarta.jms.ConnectionFactory
Proxy connection factory to wrap around provided XAConnectionFactory.
Author:
Gytis Trikleris
  • Constructor Details

    • ConnectionFactoryProxy

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

    • createConnection

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

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

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

      public jakarta.jms.JMSContext createContext(String userName, String password)
      Specified by:
      createContext in interface jakarta.jms.ConnectionFactory
    • createContext

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

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