public class JmsPoolXAConnectionFactory extends JmsPoolConnectionFactory implements ObjectFactory, Serializable, javax.jms.XAConnectionFactory
connectionFactory, DEFAULT_MAX_CONNECTIONS, jmsContextSupported, stopped| Constructor and Description |
|---|
JmsPoolXAConnectionFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected PooledXAConnection |
createPooledConnection(javax.jms.Connection connection)
Delegate that creates each instance of an ConnectionPool object.
|
protected javax.jms.XAConnection |
createProviderConnection(PooledConnectionKey key)
Given a
PooledConnectionKey create a JMS Connection using the
configuration from the key and the assigned JMS ConnectionFactory instance. |
protected javax.jms.XAJMSContext |
createProviderContext(String username,
String password,
int sessionMode)
Create a new
JMSContext using the provided credentials and Session mode |
javax.jms.XAConnection |
createXAConnection() |
javax.jms.XAConnection |
createXAConnection(String userName,
String password) |
javax.jms.XAJMSContext |
createXAContext() |
javax.jms.XAJMSContext |
createXAContext(String userName,
String password) |
Object |
getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable<?,?> environment) |
String |
getTmJndiName() |
TransactionManager |
getTransactionManager() |
boolean |
isTmFromJndi() |
protected JmsPoolXAJMSContext |
newPooledConnectionContext(JmsPoolConnection connection,
int sessionMode)
Allows subclasses to create an appropriate JmsPoolJMSContext wrapper for the newly
create JMSContext such as one that provides support for XA Transactions.
|
void |
setConnectionFactory(Object toUse)
Sets the ConnectionFactory used to create new pooled Connections.
|
void |
setTmFromJndi(boolean tmFromJndi)
Allow transaction manager resolution from JNDI (ee deployment)
|
void |
setTmJndiName(String tmJndiName) |
void |
setTransactionManager(TransactionManager transactionManager) |
clear, createConnection, createConnection, createContext, createContext, createContext, createContext, createQueueConnection, createQueueConnection, createTopicConnection, createTopicConnection, getBlockIfSessionPoolIsFullTimeout, getConnectionCheckInterval, getConnectionFactory, getConnectionIdleTimeout, getConnectionsPool, getExplicitProducerCacheSize, getMaxConnections, getMaxSessionsPerConnection, getNumConnections, initConnectionsPool, isBlockIfSessionPoolIsFull, isUseAnonymousProducers, isUseProviderJMSContext, newPooledConnectionWrapper, populateProperties, setBlockIfSessionPoolIsFull, setBlockIfSessionPoolIsFullTimeout, setConnectionCheckInterval, setConnectionIdleTimeout, setExplicitProducerCacheSize, setMaxConnections, setMaxSessionsPerConnection, setUseAnonymousProducers, setUseProviderJMSContext, start, stoppublic TransactionManager getTransactionManager()
public void setTransactionManager(TransactionManager transactionManager)
public void setConnectionFactory(Object toUse)
JmsPoolConnectionFactory
Updates to this value do not affect Connections that were previously created and placed
into the pool. In order to allocate new Connections based off this new ConnectionFactory
it is first necessary to JmsPoolConnectionFactory.clear() the pooled Connections.
setConnectionFactory in class JmsPoolConnectionFactorytoUse - The factory to use to create pooled Connections.protected javax.jms.XAConnection createProviderConnection(PooledConnectionKey key) throws javax.jms.JMSException
JmsPoolConnectionFactoryPooledConnectionKey create a JMS Connection using the
configuration from the key and the assigned JMS ConnectionFactory instance.createProviderConnection in class JmsPoolConnectionFactorykey - The PooledSessionKey to use as configuration for the new JMS Connection.javax.jms.JMSException - if an error occurs while creating the new JMS Connection.protected javax.jms.XAJMSContext createProviderContext(String username, String password, int sessionMode)
JmsPoolConnectionFactoryJMSContext using the provided credentials and Session modecreateProviderContext in class JmsPoolConnectionFactoryusername - The user name to use when creating the context.password - The password to use when creating the context.sessionMode - The session mode to use when creating the context.protected PooledXAConnection createPooledConnection(javax.jms.Connection connection)
JmsPoolConnectionFactorycreatePooledConnection in class JmsPoolConnectionFactoryconnection - The connection that is being added into the pool.protected JmsPoolXAJMSContext newPooledConnectionContext(JmsPoolConnection connection, int sessionMode)
JmsPoolConnectionFactorynewPooledConnectionContext in class JmsPoolConnectionFactoryconnection - The JmsPoolConnection to use in the JMSContext wrapper.sessionMode - The JMS Session acknowledgement mode to use in the JMSContextJmsPoolJMSContext that wraps the given JmsPoolConnectionpublic Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws Exception
getObjectInstance in interface ObjectFactoryExceptionpublic String getTmJndiName()
public void setTmJndiName(String tmJndiName)
public boolean isTmFromJndi()
public void setTmFromJndi(boolean tmFromJndi)
tmFromJndi - controls if TXN manager resolution is from JNDIpublic javax.jms.XAConnection createXAConnection()
throws javax.jms.JMSException
createXAConnection in interface javax.jms.XAConnectionFactoryjavax.jms.JMSExceptionpublic javax.jms.XAConnection createXAConnection(String userName, String password) throws javax.jms.JMSException
createXAConnection in interface javax.jms.XAConnectionFactoryjavax.jms.JMSExceptionpublic javax.jms.XAJMSContext createXAContext()
createXAContext in interface javax.jms.XAConnectionFactoryCopyright © 2017–2019. All rights reserved.