Although sessions are used to create temporary destinations, this is only for convenience. Their scope is actually the entire connection. Their lifetime is that of their connection, and any of the connection’s sessions is allowed to create a MessageConsumer for them.

Temporary destinations (TemporaryQueue or TemporaryTopic objects) are destinations that are system-generated uniquely for their connection. Only their own connection is allowed to create MessageConsumers for them.

One typical use for a temporary destination is 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 be deleted if they are no longer needed. They will be automatically deleted when they are garbage collected or when their connection is closed.

TemporaryQueue

A TemporaryQueue is a unique Queue object created for the duration of a Connection or QueueConnection. It is 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 is a system-defined Topic that can be consumed only by the Connection or TopicConnection that created it.

By definition, it does not make sense to create a durable subscription to a temporary topic. To do this is a programming error that may or may not be detected by a JMS provider.

JMS - Temporary Destination的更多相关文章

  1. Table of Contents - JMS

    JMS Specification v1.1 JMS 基本概念 Message QueueBrowser 消息选择器 消息确认 ConnectionMetaData ExceptionListener ...

  2. 深入浅出JMS(四)--Spring和ActiveMQ整合的完整实例

    第一篇博文深入浅出JMS(一)–JMS基本概念,我们介绍了JMS的两种消息模型:点对点和发布订阅模型,以及消息被消费的两个方式:同步和异步,JMS编程模型的对象,最后说了JMS的优点. 第二篇博文深入 ...

  3. JMS【四】--Spring和ActiveMQ整合的完整实例

    第一篇博文JMS[一]--JMS基本概念,我们介绍了JMS的两种消息模型:点对点和发布订阅模型,以及消息被消费的两个方式:同步和异步,JMS编程模型的对象,最后说了JMS的优点. 第二篇博文JMS[二 ...

  4. ActiveMQ学习笔记(二) JMS与Spring

    上文可见,JMS Native API使用起来不是特别方便.好在Spring提供了很好的JMS支持. (一)配置ConnectionFactory 如果使用连接池的话,不要忘记activemq-poo ...

  5. 【转】Difference between Point-To-Point and Publish/Subscribe JMS Messaging Models

    Difference between Point-To-Point and Publish/Subscribe JMS Messaging Models   Point-to-Point (PTP) ...

  6. JMS分布式应用程序异步消息解决方案EhCache 高速缓存同步问题

    部分博客中描述的使用拦截器怎么用EJB公布的WebService加入缓存,这样能够提高WebService的响应效率.但是即使是这样做,还是要经历网络的传输的.于是决定在调用WebService的程序 ...

  7. IBM Mq Spring JMS 的xml配置

    <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.spr ...

  8. Spring消息之JMS.

    一.概念 异步消息简介 与远程调用机制以及REST接口类似,异步消息也是用于应用程序之间通信的. RMI.Hessian.Burlap.HTTP invoker和Web服务在应用程序之间的通信机制是同 ...

  9. 消息中间件--ActiveMQ&JMS消息服务

    ### 消息中间件 ### ---------- **消息中间件** 1. 消息中间件的概述 2. 消息中间件的应用场景 * 异步处理 * 应用解耦 * 流量削峰 * 消息通信   --------- ...

随机推荐

  1. 如何设置(修改)jetty(maven插件maven-jetty-plugi)的端口

    在使用jetty的maven插件,有两种方式来改变jetty server的端口,第一种方式较为简单,即: 通过命令行指定端口:mvn -Djetty.port=9999 jetty:run 另一种方 ...

  2. POJ 3673 Cow Multiplication (水题)

    题意:给你两个数,求所有的数位的积的和. 析:太水了,没的说,可以先输入边算,也可以最后再算,一样.. 代码如下: #include <cstdio> #include <strin ...

  3. Egret项目Typescript的编译报错

    今天编译项目,出现了一个奇怪的报错,如下: E:\engine\egret-core-3.1.2\tools\lib\typescript\tsclark.js:41531 1> if (fil ...

  4. socket断开连接的四次握手及常见过程解析

    TCP的协议文档对TCP的一些规定:文档名称-RFC793  TCP消息头的控制位 URG:紧急指针字段有效 ACK:确认头部字段有效 PSH:强制函数 RST:重置链接 SYN:同步系列号码 FIN ...

  5. 下载Xml文件方法

    #region 下载Xml文件方法 //定义委托 private delegate void DownLoadDelegate(string url, string filename); privat ...

  6. OAuth 2.0

    国外 OAuth2.0 大全:http://oauth.net/2/ 国内经典:http://www.fising.cn/2011/03/%E4%B8%80%E6%AD%A5%E4%B8%80%E6% ...

  7. OA系统权限管理设计(转载)

    不论什么系统都离不开权限的管理,有一个好的权限管理模块,不仅使我们的系统操作自如,管理方便,也为系统加入亮点. l         不同职责的人员,对于系统操作的权限应该是不同的.优秀的业务系统,这是 ...

  8. Android多媒体数据库之MediaStore研究

    应网友要求,今天给大家讲android的多媒体数据库.MediaStore这个类是android系统提供的一个多媒体数据库,android 中多媒体信息都可以从这里提取.这个MediaStore包括了 ...

  9. Computer Science Theory for the Information Age-6: 学习理论——VC定理的证明

    VC定理的证明 本文讨论VC理论的证明,其主要内容就是证明VC理论的两个定理,所以内容非常的枯燥,但对于充实一下自己的理论知识也是有帮助的.另外,VC理论属于比较难也比较抽象的知识,所以我总结的这些证 ...

  10. 《Java程序员面试宝典》读书笔记1

    今天读书发现一个很有趣的问题 请问以下程序会输出什么? public   class   Test2   {  public   static   void   main(String[]   arg ...