The following interface and implementation classes illustrate how this looks within the queue domain. Once again, the topic source code is nearly identical. The Connection , QueueConnection , and TopicConnection interfaces represent an active connection to a JMS provider. They are the conduit through which communication flows. A client uses them to create a Session with the JMS provider.
Connection objects support concurrent use.
The following code illustrates the implementation within the queue domain. Sessions The Session , QueueSession , and TopicSession interfaces represent a single threaded context for sending and receiving messages. A client uses them to create one or more MessageProducers or MessageConsumers . They also provide a factory for creating messages and define a serial order for the messages they consume or produce. Sessions provide a natural way for clients to organize interactions with a provider.