|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbitronix.tm.resource.common.ResourceBean
bitronix.tm.resource.jms.PoolingConnectionFactory
public class PoolingConnectionFactory
Implementation of a JMS ConnectionFactory wrapping vendor's XAConnectionFactory implementation.
| Constructor Summary | |
|---|---|
PoolingConnectionFactory()
|
|
| Method Summary | |
|---|---|
void |
close()
Release this XAResourceProducer's internal resources. |
javax.jms.Connection |
createConnection()
|
javax.jms.Connection |
createConnection(String userName,
String password)
|
XAStatefulHolder |
createPooledConnection(Object xaFactory,
ResourceBean bean)
Create a XAStatefulHolder that will be placed in an XAPool. |
void |
endRecovery()
Release internal resources held after call to startRecovery(). |
XAResourceHolder |
findXAResourceHolder(XAResource xaResource)
Find in the XAResourceHolders created by this XAResourceProducer the one which this
XAResource belongs to. |
boolean |
getCacheProducersConsumers()
|
long |
getInPoolSize()
|
String |
getPassword()
|
Reference |
getReference()
PoolingConnectionFactory must alway have a unique name so this method builds a reference to this object
using the unique name as RefAddr. |
boolean |
getTestConnections()
|
long |
getTotalPoolSize()
|
String |
getUser()
|
void |
init()
Initialize the pool by creating the initial amount of connections. |
boolean |
isFailed()
|
void |
reset()
|
void |
setCacheProducersConsumers(boolean cacheProducersConsumers)
|
void |
setFailed(boolean failed)
Mark this resource producer as failed or not. |
void |
setPassword(String password)
|
void |
setTestConnections(boolean testConnections)
|
void |
setUser(String user)
|
XAResourceHolderState |
startRecovery()
Prepare the recoverable XAResource producer for recovery. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface bitronix.tm.resource.common.XAResourceProducer |
|---|
getUniqueName |
| Methods inherited from interface bitronix.tm.resource.jms.PoolingConnectionFactoryMBean |
|---|
getMaxPoolSize, getMinPoolSize, isDisabled, setDisabled |
| Constructor Detail |
|---|
public PoolingConnectionFactory()
| Method Detail |
|---|
public void init()
init in interface XAResourceProducerpublic boolean getCacheProducersConsumers()
public void setCacheProducersConsumers(boolean cacheProducersConsumers)
public boolean getTestConnections()
public void setTestConnections(boolean testConnections)
public String getUser()
public void setUser(String user)
public String getPassword()
public void setPassword(String password)
public javax.jms.Connection createConnection()
throws javax.jms.JMSException
createConnection in interface javax.jms.ConnectionFactoryjavax.jms.JMSException
public javax.jms.Connection createConnection(String userName,
String password)
throws javax.jms.JMSException
createConnection in interface javax.jms.ConnectionFactoryjavax.jms.JMSExceptionpublic String toString()
toString in class Object
public XAResourceHolderState startRecovery()
throws RecoveryException
XAResourceProducerXAResource producer for recovery.
startRecovery in interface XAResourceProducerXAResourceHolderState object that can be used to call recover().
RecoveryException - thrown when a XAResourceHolderState cannot be acquired.
public void endRecovery()
throws RecoveryException
XAResourceProducerstartRecovery().
endRecovery in interface XAResourceProducerRecoveryException - thrown when an error occured while releasing reserved resources.public void setFailed(boolean failed)
XAResourceProducer
setFailed in interface XAResourceProducerfailed - true is the resource must be considered failed, false it it must be considered sane.public boolean isFailed()
isFailed in interface PoolingConnectionFactoryMBeanpublic void close()
XAResourceProducerXAResourceProducer's internal resources.
close in interface XAResourceProducer
public XAStatefulHolder createPooledConnection(Object xaFactory,
ResourceBean bean)
throws Exception
XAResourceProducerXAStatefulHolder that will be placed in an XAPool.
createPooledConnection in interface XAResourceProducerxaFactory - the vendor's resource-specific XA factory.bean - the resource-specific bean describing the resource parameters.
XAStatefulHolder that will be placed in an XAPool.
Exception - thrown when the XAStatefulHolder cannot be created.public XAResourceHolder findXAResourceHolder(XAResource xaResource)
XAResourceProducerXAResourceHolders created by this XAResourceProducer the one which this
XAResource belongs to.
findXAResourceHolder in interface XAResourceProducerxaResource - the XAResource to look for.
XAResourceHolder or null if the XAResource does not belong to this
XAResourceProducer.
public Reference getReference()
throws NamingException
PoolingConnectionFactory must alway have a unique name so this method builds a reference to this object
using the unique name as RefAddr.
getReference in interface ReferenceablePoolingConnectionFactory.
NamingExceptionpublic long getInPoolSize()
getInPoolSize in interface PoolingConnectionFactoryMBeanpublic long getTotalPoolSize()
getTotalPoolSize in interface PoolingConnectionFactoryMBean
public void reset()
throws Exception
reset in interface PoolingConnectionFactoryMBeanException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||