Class SessionPool

java.lang.Object
io.micronaut.jms.pool.AbstractPool<PooledObject<javax.jms.Session>>
io.micronaut.jms.pool.SessionPool

public class SessionPool extends AbstractPool<PooledObject<javax.jms.Session>>
Pool for ensuring maximum reuse of Sessions within an application.
Since:
1.0.0
Author:
Elliott Pope
See Also:
  • Constructor Details

    • SessionPool

      public SessionPool(int initialSize, int maxSize, javax.jms.Connection connection, MessageProducerPoolFactory producerPoolFactory)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • create

      protected PooledObject<javax.jms.Session> create(Object... args)
      Description copied from class: AbstractPool
      Create an object for the pool.
      Specified by:
      create in class AbstractPool<PooledObject<javax.jms.Session>>
      Parameters:
      args - the arguments to be provided to the create method.
      Returns:
      a new object of type <T> for the pool.
    • reset

      protected void reset(PooledObject<javax.jms.Session> pooledObject)
      Description copied from class: AbstractPool
      Reset the provided object so it can be returned to the pool for reuse.
      Specified by:
      reset in class AbstractPool<PooledObject<javax.jms.Session>>
      Parameters:
      pooledObject - the object