Package jakarta.jms

Interface QueueSession

All Superinterfaces:
AutoCloseable, Runnable, Session

public interface QueueSession extends Session
A QueueSession object provides methods for creating QueueReceiver, QueueSender, QueueBrowser, and TemporaryQueue objects.

If there are messages that have been received but not acknowledged when a QueueSession terminates, these messages will be retained and redelivered when a consumer next accesses the queue.

A QueueSession is used for creating Point-to-Point specific objects. In general, use the Session object. The QueueSession is used to support existing code. Using the Session object simplifies the programming model, and allows transactions to be used across the two messaging domains.

A QueueSession cannot be used to create objects specific to the publish/subscribe domain. The following methods inherit from Session, but must throw an IllegalStateException if they are used from QueueSession:

  • createDurableSubscriber
  • createDurableConsumer
  • createSharedConsumer
  • createSharedDurableConsumer
  • createTemporaryTopic
  • createTopic
  • unsubscribe
Since:
JMS 1.0
Version:
Jakarta Messaging 2.0
See Also: