Package org.jboss.narayana.jta.jms
Class ConnectionFactoryProxy
- java.lang.Object
-
- org.jboss.narayana.jta.jms.ConnectionFactoryProxy
-
- All Implemented Interfaces:
javax.jms.ConnectionFactory
public class ConnectionFactoryProxy extends java.lang.Object implements javax.jms.ConnectionFactoryProxy connection factory to wrap around providedXAConnectionFactory.- Author:
- Gytis Trikleris
-
-
Constructor Summary
Constructors Constructor Description ConnectionFactoryProxy(javax.jms.XAConnectionFactory xaConnectionFactory, TransactionHelper transactionHelper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.jms.ConnectioncreateConnection()Get XA connection from the provided factory and wrap it withConnectionProxy.javax.jms.ConnectioncreateConnection(java.lang.String userName, java.lang.String password)Get XA connection from the provided factory with credentials and wrap it withConnectionProxy.javax.jms.JMSContextcreateContext()javax.jms.JMSContextcreateContext(int sessionMode)javax.jms.JMSContextcreateContext(java.lang.String userName, java.lang.String password)javax.jms.JMSContextcreateContext(java.lang.String userName, java.lang.String password, int sessionMode)
-
-
-
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.JMSExceptionGet XA connection from the provided factory and wrap it withConnectionProxy.- Specified by:
createConnectionin interfacejavax.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.JMSExceptionGet XA connection from the provided factory with credentials and wrap it withConnectionProxy.- Specified by:
createConnectionin interfacejavax.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:
createContextin interfacejavax.jms.ConnectionFactory
-
createContext
public javax.jms.JMSContext createContext(java.lang.String userName, java.lang.String password)- Specified by:
createContextin interfacejavax.jms.ConnectionFactory
-
createContext
public javax.jms.JMSContext createContext(java.lang.String userName, java.lang.String password, int sessionMode)- Specified by:
createContextin interfacejavax.jms.ConnectionFactory
-
createContext
public javax.jms.JMSContext createContext(int sessionMode)
- Specified by:
createContextin interfacejavax.jms.ConnectionFactory
-
-