public class SessionPool extends ObjectPool<javax.jms.Session>
logger| Constructor and Description |
|---|
SessionPool(int poolSize)
TODO Add Constructor Javadoc
|
SessionPool(int poolSize,
ConnectionResource connectionResource)
TODO Add Constructor Javadoc
|
| Modifier and Type | Method and Description |
|---|---|
protected javax.jms.Session |
createObject()
Implement to create new objects of type T when the pool is initialized
empty.
|
protected XAResource |
createXaResource(javax.jms.XASession session) |
protected void |
destroyObject(javax.jms.Session session)
Clean up pool objects
|
SessionAcknowledgementType |
getAcknowledgeMode()
Gets the SessionAcknowledgementType value of acknowledgeMode for this instance of SessionPool.
|
ConnectionResource |
getConnectionResource()
Gets the ConnectionFactoryResource value of connectionResource for this instance of SessionPool.
|
boolean |
isTransacted()
Gets the boolean value of transacted for this instance of SessionPool.
|
void |
setAcknowledgeMode(SessionAcknowledgementType acknowledgeMode)
Sets the SessionAcknowledgementType value of acknowledgeMode for this instance of SessionPool.
|
void |
setTransacted(boolean transacted)
Sets the boolean value of transacted for this instance of SessionPool.
|
borrowObject, borrowObject, drainPool, fillPool, getLock, getMaxSize, returnObjectpublic SessionPool(int poolSize,
ConnectionResource connectionResource)
public SessionPool(int poolSize)
poolSize - protected javax.jms.Session createObject()
throws Exception
ObjectPoolcreateObject in class ObjectPool<javax.jms.Session>Exceptionprotected void destroyObject(javax.jms.Session session)
throws Exception
ObjectPooldestroyObject in class ObjectPool<javax.jms.Session>Exceptionpublic final SessionAcknowledgementType getAcknowledgeMode()
public final void setAcknowledgeMode(SessionAcknowledgementType acknowledgeMode)
acknowledgeMode - Sets SessionAcknowledgementType, default is AUTO_ACKNOWLEDGEpublic final boolean isTransacted()
public final void setTransacted(boolean transacted)
transacted - Sets boolean, default is TODO add defaultpublic ConnectionResource getConnectionResource()
protected XAResource createXaResource(javax.jms.XASession session) throws javax.jms.JMSException
javax.jms.JMSExceptionApache Camel