Although sessions is used to create temporary destinations, which is the only for convenience. their scope is actually the entire connection. Their lifetime is that of their connection, and any of the connection ' s sessions are allowed to create a messageconsumer fo R them.
Temporary destinations (Temporaryqueue or Temporarytopic objects) is destinations that is system-generated uniquely for Their connection. Only their own connection are allowed to create messageconsumers for them.
One typical use for a temporary destination are as the Jmsreplyto destination for service requests.
Each temporaryqueue or Temporarytopic object is unique. It cannot be copied.
Since temporary destinations may allocate resources outside the JVM, they should is deleted if they is no longer needed. They would be automatically deleted when they was garbage collected or when their connection was closed.
Temporaryqueue
A temporaryqueue is a unique Queue object created for the duration of a Connection or queueconnection. It's a system-defined queue that can be consumed only by the Connection or queueconnection that created it.
A Temporarytopic
A temporarytopic is a unique Topic object created for the duration of a Connection or topicconnection. It's a system-defined Topic that can being consumed only by the Connection or topicconnection that created it.
By definition, it does do sense to create a durable subscription to a temporary topic. To does this is a programming error, the May or could not be detected by a JMS provider.
Jms-temporary Destination