org.apache.activemq.jms.pool
Class XaPooledConnectionFactory

java.lang.Object
  extended by org.apache.activemq.jms.pool.PooledConnectionFactory
      extended by org.apache.activemq.jms.pool.XaPooledConnectionFactory
All Implemented Interfaces:
Serializable, ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory, ObjectFactory
Direct Known Subclasses:
JcaPooledConnectionFactory, XaPooledConnectionFactory

public class XaPooledConnectionFactory
extends PooledConnectionFactory
implements ObjectFactory, Serializable, QueueConnectionFactory, TopicConnectionFactory

A pooled connection factory that automatically enlists sessions in the current active XA transaction if any.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.activemq.jms.pool.PooledConnectionFactory
stopped
 
Constructor Summary
XaPooledConnectionFactory()
           
 
Method Summary
protected  ConnectionPool createConnectionPool(Connection connection)
          Delegate that creates each instance of an ConnectionPool object.
 QueueConnection createQueueConnection()
           
 QueueConnection createQueueConnection(String userName, String password)
           
 TopicConnection createTopicConnection()
           
 TopicConnection createTopicConnection(String userName, String password)
           
 Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment)
           
 String getTmJndiName()
           
 TransactionManager getTransactionManager()
           
 boolean isTmFromJndi()
           
 void setTmFromJndi(boolean tmFromJndi)
          Allow transaction manager resolution from JNDI (ee deployment)
 void setTmJndiName(String tmJndiName)
           
 void setTransactionManager(TransactionManager transactionManager)
           
 
Methods inherited from class org.apache.activemq.jms.pool.PooledConnectionFactory
clear, createConnection, createConnection, createConnection, getConnectionFactory, getConnectionsPool, getExpiryTimeout, getIdleTimeout, getMaxConnections, getMaximumActiveSessionPerConnection, getNumConnections, getTimeBetweenExpirationCheckMillis, initConnectionsPool, isBlockIfSessionPoolIsFull, isCreateConnectionOnStartup, newPooledConnection, setBlockIfSessionPoolIsFull, setConnectionFactory, setCreateConnectionOnStartup, setExpiryTimeout, setIdleTimeout, setMaxConnections, setMaximumActiveSessionPerConnection, setTimeBetweenExpirationCheckMillis, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.ConnectionFactory
createConnection, createConnection
 

Constructor Detail

XaPooledConnectionFactory

public XaPooledConnectionFactory()
Method Detail

getTransactionManager

public TransactionManager getTransactionManager()

setTransactionManager

public void setTransactionManager(TransactionManager transactionManager)

createConnectionPool

protected ConnectionPool createConnectionPool(Connection connection)
Description copied from class: PooledConnectionFactory
Delegate that creates each instance of an ConnectionPool object. Subclasses can override this method to customize the type of connection pool returned.

Overrides:
createConnectionPool in class PooledConnectionFactory
Returns:
instance of a new ConnectionPool.

getObjectInstance

public Object getObjectInstance(Object obj,
                                Name name,
                                Context nameCtx,
                                Hashtable<?,?> environment)
                         throws Exception
Specified by:
getObjectInstance in interface ObjectFactory
Throws:
Exception

getTmJndiName

public String getTmJndiName()

setTmJndiName

public void setTmJndiName(String tmJndiName)

isTmFromJndi

public boolean isTmFromJndi()

setTmFromJndi

public void setTmFromJndi(boolean tmFromJndi)
Allow transaction manager resolution from JNDI (ee deployment)

Parameters:
tmFromJndi -

createQueueConnection

public QueueConnection createQueueConnection()
                                      throws JMSException
Specified by:
createQueueConnection in interface QueueConnectionFactory
Throws:
JMSException

createQueueConnection

public QueueConnection createQueueConnection(String userName,
                                             String password)
                                      throws JMSException
Specified by:
createQueueConnection in interface QueueConnectionFactory
Throws:
JMSException

createTopicConnection

public TopicConnection createTopicConnection()
                                      throws JMSException
Specified by:
createTopicConnection in interface TopicConnectionFactory
Throws:
JMSException

createTopicConnection

public TopicConnection createTopicConnection(String userName,
                                             String password)
                                      throws JMSException
Specified by:
createTopicConnection in interface TopicConnectionFactory
Throws:
JMSException


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.