Class InboundConsumer

  • All Implemented Interfaces:
    jakarta.jms.ServerSessionPool, InboundConsumerMBean

    public class InboundConsumer
    extends Object
    implements jakarta.jms.ServerSessionPool, InboundConsumerMBean
    An InboundConsumer instance is responsible for consuming messages from a given JORAM destination and through a given JORAM connection.
    • Field Detail

      • logger

        private static final Logger logger
      • DEBUG

        private static final boolean DEBUG
      • workManager

        private jakarta.resource.spi.work.WorkManager workManager
        Application server's WorkManager instance.
      • endpointFactory

        jakarta.resource.spi.endpoint.MessageEndpointFactory endpointFactory
        Application's endpoints factory.
      • cnx

        private jakarta.jms.XAConnection cnx
        The provided connection to the underlying JORAM server.
      • subName

        private String subName
        The durable subscription name, if provided.
      • transacted

        private boolean transacted
        true if message consumption occurs in a transaction.
      • maxWorks

        private int maxWorks
        Maximum number of Work instances to be submitted (0 for infinite).
      • ackMode

        private int ackMode
      • closeDurSub

        private boolean closeDurSub
        for closing durable subscription
      • cnxConsumer

        private jakarta.jms.ConnectionConsumer cnxConsumer
        Wrapped ConnectionConsumer instance.
      • serverSessions

        private int serverSessions
        Number of created server sessions.
      • pool

        private Vector<jakarta.jms.ServerSession> pool
        Pool of server sessions.
    • Constructor Detail

      • InboundConsumer

        public InboundConsumer​(jakarta.resource.spi.work.WorkManager workManager,
                               jakarta.resource.spi.endpoint.MessageEndpointFactory endpointFactory,
                               jakarta.jms.XAConnection cnx,
                               jakarta.jms.Destination dest,
                               String selector,
                               boolean durable,
                               String subName,
                               boolean transacted,
                               int maxWorks,
                               int maxMessages,
                               int ackMode,
                               boolean closeDurSub)
                        throws jakarta.resource.ResourceException
        Constructs an InboundConsumer instance.
        Parameters:
        workManager - Application server's WorkManager instance.
        endpointFactory - Application's endpoints factory.
        cnx - Connection to the JORAM server.
        dest - Destination to get messages from.
        selector - Selector for filtering messages.
        durable - true for durably subscribing.
        subName - Durable subscription name.
        transacted - true if deliveries will occur in a XA transaction.
        maxWorks - Max number of Work instances to be submitted.
        Throws:
        jakarta.resource.NotSupportedException - If the activation parameters are invalid.
        jakarta.resource.spi.SecurityException - If the target destination is not readable.
        jakarta.resource.spi.CommException - If the connection with the JORAM server is lost.
        jakarta.resource.ResourceException - Generic exception.