org.apache.camel.component.sjms.jms
Class SessionPool

java.lang.Object
  extended by org.apache.camel.component.sjms.jms.ObjectPool<javax.jms.Session>
      extended by org.apache.camel.component.sjms.jms.SessionPool

public class SessionPool
extends ObjectPool<javax.jms.Session>

TODO Add Class documentation for SessionPool


Field Summary
 
Fields inherited from class org.apache.camel.component.sjms.jms.ObjectPool
logger
 
Constructor Summary
SessionPool(int poolSize)
          TODO Add Constructor Javadoc
SessionPool(int poolSize, ConnectionResource connectionResource)
          TODO Add Constructor Javadoc
 
Method Summary
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.
 
Methods inherited from class org.apache.camel.component.sjms.jms.ObjectPool
borrowObject, borrowObject, drainPool, fillPool, getLock, getMaxSize, returnObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionPool

public SessionPool(int poolSize,
                   ConnectionResource connectionResource)
TODO Add Constructor Javadoc


SessionPool

public SessionPool(int poolSize)
TODO Add Constructor Javadoc

Parameters:
poolSize -
Method Detail

createObject

protected javax.jms.Session createObject()
                                  throws Exception
Description copied from class: ObjectPool
Implement to create new objects of type T when the pool is initialized empty.

Specified by:
createObject in class ObjectPool<javax.jms.Session>
Returns:
Throws:
Exception

destroyObject

protected void destroyObject(javax.jms.Session session)
                      throws Exception
Description copied from class: ObjectPool
Clean up pool objects

Specified by:
destroyObject in class ObjectPool<javax.jms.Session>
Throws:
Exception

getAcknowledgeMode

public final SessionAcknowledgementType getAcknowledgeMode()
Gets the SessionAcknowledgementType value of acknowledgeMode for this instance of SessionPool.

Returns:
the DEFAULT_ACKNOWLEDGE_MODE

setAcknowledgeMode

public final void setAcknowledgeMode(SessionAcknowledgementType acknowledgeMode)
Sets the SessionAcknowledgementType value of acknowledgeMode for this instance of SessionPool.

Parameters:
acknowledgeMode - Sets SessionAcknowledgementType, default is AUTO_ACKNOWLEDGE

isTransacted

public final boolean isTransacted()
Gets the boolean value of transacted for this instance of SessionPool.

Returns:
the transacted

setTransacted

public final void setTransacted(boolean transacted)
Sets the boolean value of transacted for this instance of SessionPool.

Parameters:
transacted - Sets boolean, default is TODO add default

getConnectionResource

public ConnectionResource getConnectionResource()
Gets the ConnectionFactoryResource value of connectionResource for this instance of SessionPool.

Returns:
the connectionResource

createXaResource

protected XAResource createXaResource(javax.jms.XASession session)
                               throws javax.jms.JMSException
Throws:
javax.jms.JMSException


Apache Camel