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. 【转】C#传委托给C的函数指针调用问题

    C#传委托给C的函数指针调用问题C代码如下: #include "stdio.h" __declspec(dllexport) int Call(int (*qq)(int num ...

  2. android 脸部抠图

    原帖:http://www.eoeandroid.com/thread-205445-1-1.html package com.face; import android.app.Activity; i ...

  3. 为什么要坚持用ASP.NET MVC!(②)

    尽管ASP.NET MVC架构和Web Form架构区别很大,但是还是有很多共同之处.毕竟它们都是以ASP.NET API与.NET框架为基础构建的.比较一下ASP.NET MVC和Web Form框 ...

  4. iOS 中的UIWindow

    使用Xcode新建一个工程后,Xcode会自动新建一些文件,其中有AppDelegate.h,AppDelegate.m,ViewController.h,ViewController.m,Main. ...

  5. WCF序列化与反序列化问题

    转自:http://www.cnblogs.com/wangweimutou/p/4505447.html WCF包含很多封装的内部机制,这些是我们在编写程序时不会经常看到的.比如上一篇讲解的Mess ...

  6. iOS开发-轻点、触摸和手势

    一.响应者链 以UIResponder作为超类的任何类都是响应者.UIView和UIControl是UIReponder的子类,因此所有视图和所有控件都是响应者. 初始相应器事件首先会传递给UIApp ...

  7. Laravel入门笔记

    Laravel 是一款简洁,优雅的一款框架,可以说是入门TP后的第二款可以选择的框架. 目录部分: app -> 自己写的代码 http -> Controller -> 控制器 b ...

  8. IIS下的身份验证方式管理

    设置.查看身份验证方式 #导航到某站点下: cd IIS:\Sites\DemoSite\DemoApp #启用站点test01下的Windows身份验证 Set-WebConfigurationPr ...

  9. Android学习笔记(1)

    几天开始看Mars老师的Java4Android视频教程. 开始几集都是介绍性的内容,我浏览了一下.主要是看了下Java变量部分. java变量主要由以下几种类型: 1.数值型 2.字符型 3.布尔型 ...

  10. goldengate的HANDLECOLLISIONS参数

    HANDLECOLLISIONS 是一个 replicat 进程参数,主要在 initial load 中使用. 在 replicat 进程中使用该参数时,即使目标数据库环境中存在数据完整性问题(如 ...