org.apache.activemq.pool
Class XaPooledConnectionFactory

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

public class XaPooledConnectionFactory
extends PooledConnectionFactory
implements javax.naming.spi.ObjectFactory, java.io.Serializable, javax.jms.QueueConnectionFactory, javax.jms.TopicConnectionFactory

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

See Also:
Serialized Form

Constructor Summary
XaPooledConnectionFactory()
           
XaPooledConnectionFactory(ActiveMQConnectionFactory connectionFactory)
           
XaPooledConnectionFactory(java.lang.String brokerURL)
           
 
Method Summary
protected  ConnectionPool createConnectionPool(ActiveMQConnection connection)
          Delegate that creates each instance of an ConnectionPool object.
 javax.jms.QueueConnection createQueueConnection()
           
 javax.jms.QueueConnection createQueueConnection(java.lang.String userName, java.lang.String password)
           
 javax.jms.TopicConnection createTopicConnection()
           
 javax.jms.TopicConnection createTopicConnection(java.lang.String userName, java.lang.String password)
           
 java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable<?,?> environment)
           
 java.lang.String getTmJndiName()
           
 javax.transaction.TransactionManager getTransactionManager()
           
 boolean isTmFromJndi()
           
 void setBrokerUrl(java.lang.String url)
           
 void setTmFromJndi(boolean tmFromJndi)
          Allow transaction manager resolution from JNDI (ee deployment)
 void setTmJndiName(java.lang.String tmJndiName)
           
 void setTransactionManager(javax.transaction.TransactionManager transactionManager)
           
 
Methods inherited from class org.apache.activemq.pool.PooledConnectionFactory
clear, createConnection, createConnection, createConnection, getConnectionFactory, getExpiryTimeout, getIdleTimeout, getMaxConnections, getMaximumActiveSessionPerConnection, getNumConnections, getTimeBetweenExpirationCheckMillis, isBlockIfSessionPoolIsFull, isCreateConnectionOnStartup, 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()

XaPooledConnectionFactory

public XaPooledConnectionFactory(ActiveMQConnectionFactory connectionFactory)

XaPooledConnectionFactory

public XaPooledConnectionFactory(java.lang.String brokerURL)
Method Detail

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()

setTransactionManager

public void setTransactionManager(javax.transaction.TransactionManager transactionManager)

createConnectionPool

protected ConnectionPool createConnectionPool(ActiveMQConnection 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 java.lang.Object getObjectInstance(java.lang.Object obj,
                                          javax.naming.Name name,
                                          javax.naming.Context nameCtx,
                                          java.util.Hashtable<?,?> environment)
                                   throws java.lang.Exception
Specified by:
getObjectInstance in interface javax.naming.spi.ObjectFactory
Throws:
java.lang.Exception

setBrokerUrl

public void setBrokerUrl(java.lang.String url)

getTmJndiName

public java.lang.String getTmJndiName()

setTmJndiName

public void setTmJndiName(java.lang.String tmJndiName)

isTmFromJndi

public boolean isTmFromJndi()

setTmFromJndi

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

Parameters:
tmFromJndi -

createQueueConnection

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

createQueueConnection

public javax.jms.QueueConnection createQueueConnection(java.lang.String userName,
                                                       java.lang.String password)
                                                throws javax.jms.JMSException
Specified by:
createQueueConnection in interface javax.jms.QueueConnectionFactory
Throws:
javax.jms.JMSException

createTopicConnection

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

createTopicConnection

public javax.jms.TopicConnection createTopicConnection(java.lang.String userName,
                                                       java.lang.String password)
                                                throws javax.jms.JMSException
Specified by:
createTopicConnection in interface javax.jms.TopicConnectionFactory
Throws:
javax.jms.JMSException


Copyright © 2005-2013 Red Hat, Inc.. All Rights Reserved.