Package org.jboss.narayana.jta.jms
Class ConnectionFactoryProxy
java.lang.Object
org.jboss.narayana.jta.jms.ConnectionFactoryProxy
- All Implemented Interfaces:
jakarta.jms.ConnectionFactory
Proxy connection factory to wrap around provided
XAConnectionFactory
.- Author:
- Gytis Trikleris
-
Constructor Summary
ConstructorDescriptionConnectionFactoryProxy
(jakarta.jms.XAConnectionFactory xaConnectionFactory, TransactionHelper transactionHelper) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.jms.Connection
Get XA connection from the provided factory and wrap it withConnectionProxy
.jakarta.jms.Connection
createConnection
(String userName, String password) Get XA connection from the provided factory with credentials and wrap it withConnectionProxy
.jakarta.jms.JMSContext
jakarta.jms.JMSContext
createContext
(int sessionMode) jakarta.jms.JMSContext
createContext
(String userName, String password) jakarta.jms.JMSContext
createContext
(String userName, String password, int sessionMode)
-
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.JMSExceptionGet XA connection from the provided factory and wrap it withConnectionProxy
.- Specified by:
createConnection
in interfacejakarta.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 withConnectionProxy
.- Specified by:
createConnection
in interfacejakarta.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 interfacejakarta.jms.ConnectionFactory
-
createContext
- Specified by:
createContext
in interfacejakarta.jms.ConnectionFactory
-
createContext
- Specified by:
createContext
in interfacejakarta.jms.ConnectionFactory
-
createContext
public jakarta.jms.JMSContext createContext(int sessionMode) - Specified by:
createContext
in interfacejakarta.jms.ConnectionFactory
-