Package org.apache.activemq.pool
Class PooledConnectionFactory
- java.lang.Object
-
- org.apache.activemq.jms.pool.PooledConnectionFactory
-
- org.apache.activemq.pool.PooledConnectionFactory
-
- All Implemented Interfaces:
ConnectionFactory
,QueueConnectionFactory
,TopicConnectionFactory
,Referenceable
,JNDIStorableInterface
,Service
public class PooledConnectionFactory extends PooledConnectionFactory implements JNDIStorableInterface, Service
Add Service and Referenceable and TransportListener to @link{org.apache.activemq.jms.pool.PooledConnectionFactory}
-
-
Field Summary
Fields Modifier and Type Field Description static String
POOL_PROPS_PREFIX
-
Fields inherited from class org.apache.activemq.jms.pool.PooledConnectionFactory
connectionFactory, stopped
-
-
Constructor Summary
Constructors Constructor Description PooledConnectionFactory()
PooledConnectionFactory(String brokerURL)
PooledConnectionFactory(ActiveMQConnectionFactory activeMQConnectionFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
buildFromProperties(Properties props)
protected ConnectionPool
createConnectionPool(Connection connection)
Delegate that creates each instance of an ConnectionPool object.Properties
getProperties()
Get the properties from this instance for storing in JNDIReference
getReference()
protected Connection
newPooledConnection(ConnectionPool connection)
protected void
populateProperties(Properties props)
Called by any superclass that implements a JNDIReferencable or similar that needs to collect the properties of this class for storage etc.void
setProperties(Properties properties)
set the properties for this instance as retrieved from JNDI-
Methods inherited from class org.apache.activemq.jms.pool.PooledConnectionFactory
clear, createConnection, createConnection, createConnection, createQueueConnection, createQueueConnection, createTopicConnection, createTopicConnection, getBlockIfSessionPoolIsFullTimeout, getConnectionFactory, getConnectionsPool, getConnectionTimeout, getExpiryTimeout, getIdleTimeout, getMaxConnections, getMaximumActiveSessionPerConnection, getNumConnections, getTimeBetweenExpirationCheckMillis, initConnectionsPool, isBlockIfSessionPoolIsFull, isCreateConnectionOnStartup, isReconnectOnException, isUseAnonymousProducers, setBlockIfSessionPoolIsFull, setBlockIfSessionPoolIsFullTimeout, setConnectionFactory, setConnectionTimeout, setCreateConnectionOnStartup, setExpiryTimeout, setIdleTimeout, setMaxConnections, setMaximumActiveSessionPerConnection, setReconnectOnException, setTimeBetweenExpirationCheckMillis, setUseAnonymousProducers, start, stop
-
-
-
-
Field Detail
-
POOL_PROPS_PREFIX
public static final String POOL_PROPS_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PooledConnectionFactory
public PooledConnectionFactory()
-
PooledConnectionFactory
public PooledConnectionFactory(ActiveMQConnectionFactory activeMQConnectionFactory)
-
PooledConnectionFactory
public PooledConnectionFactory(String brokerURL)
-
-
Method Detail
-
buildFromProperties
protected void buildFromProperties(Properties props)
-
populateProperties
protected void populateProperties(Properties props)
Description copied from class:PooledConnectionFactory
Called by any superclass that implements a JNDIReferencable or similar that needs to collect the properties of this class for storage etc. This method should be updated any time there is a new property added.- Overrides:
populateProperties
in classPooledConnectionFactory
- Parameters:
props
- a properties object that should be filled in with this objects property values.
-
setProperties
public void setProperties(Properties properties)
Description copied from interface:JNDIStorableInterface
set the properties for this instance as retrieved from JNDI- Specified by:
setProperties
in interfaceJNDIStorableInterface
-
getProperties
public Properties getProperties()
Description copied from interface:JNDIStorableInterface
Get the properties from this instance for storing in JNDI- Specified by:
getProperties
in interfaceJNDIStorableInterface
- Returns:
- the properties that should be stored in JNDI
-
getReference
public Reference getReference() throws NamingException
- Specified by:
getReference
in interfaceReferenceable
- Throws:
NamingException
-
newPooledConnection
protected Connection newPooledConnection(ConnectionPool connection)
- Overrides:
newPooledConnection
in classPooledConnectionFactory
-
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 classPooledConnectionFactory
- Returns:
- instance of a new ConnectionPool.
-
-