Class SessionPool

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

public class SessionPool extends AbstractPool<PooledObject<jakarta.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, jakarta.jms.Connection connection, MessageProducerPoolFactory producerPoolFactory)
  • Method Details

    • toString

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

      protected PooledObject<jakarta.jms.Session> create(Object... args)
      Description copied from class: AbstractPool
      Create an object for the pool.
      Specified by:
      create in class AbstractPool<PooledObject<jakarta.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<jakarta.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<jakarta.jms.Session>>
      Parameters:
      pooledObject - the object