TemporaryTopic (Java EE 5)

Java EE API


javax.jms Interface TemporaryTopic

All Superinterfaces:
Destination, Topic

public interface TemporaryTopic
extends Topic

Implements: Topic

TemporaryTopic 对象是 Connection 持续期间创建的唯一 Topic 对象。它是系统定义的主题,只能由创建它的 Connection 使用。

TemporaryTopic 对象可以在 SessionTopicSession 级创建。在 Session 级创建该对象允许 TemporaryTopic 与 PTP 域中的对象一起参与到相同的事务中。如果在 TopicSession 级创建 TemporaryTopic,则它只能与 Pub/Sub 域中的对象一起参与到事务中。

英文文档:

A TemporaryTopic object is a unique Topic object created for the duration of a Connection. It is a system-defined topic that can be consumed only by the Connection that created it.

A TemporaryTopic object can be created either at the Session or TopicSession level. Creating it at the Session level allows the TemporaryTopic to participate in the same transaction with objects from the PTP domain. If a TemporaryTopic is created at the TopicSession, it will only be able participate in transactions with objects from the Pub/Sub domain.

Version:
1.1 - February 2, 2002
Author:
Mark Hapner, Rich Burridge, Kate Stout
See Also:
Session.createTemporaryTopic(), TopicSession.createTemporaryTopic()

Method Summary
 void
 
Methods inherited from interface javax.jms.Topic
 

Method Detail

public void delete() throws JMSException
删除此临时主题。如果有现有订阅者仍在使用该队列,则将抛出 JMSException
ThrowsJMSException: 如果 JMS 提供者由于某个内部错误无法删除临时主题。
英文文档:

delete

void delete()
            throws JMSException
Deletes this temporary topic. If there are existing subscribers still using it, a JMSException will be thrown.

Throws:
JMSException - if the JMS provider fails to delete the temporary topic due to some internal error.


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!