jsr343-experts@jms-spec.java.net

[jsr343-experts] Re: [jms-spec users] Make TemporaryQueue/Topic AutoCloseable?

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Thu, 03 Jan 2013 16:58:01 +0000

Philippe,

On 02/01/2013 16:29, Philippe Marschall wrote:
> I wanted to ask whether it would make sense to make TemporaryQueue and
> TemporaryTopic implement AutoCloseable so that they can be used in a
> try-with-resources block?

Thanks for your comment.

TemporaryQueue and TemporaryTopic don't have a close method. A temporary
queue or topic will be automatically deleted when the Connection (or
JMSContext) used to create it is closed.

Are you proposing that we add a close method to TemporaryQueue and
TemporaryTopic which causes the temporary queue or topic to be deleted?

NIgel