クラシック API の JMS 仕様に従って
The Connection, Session, MessageProducer, MessageConsumer and
QueueBrowser interfaces have been modified to extend the
java.lang.Autocloseable interface. This means that applications can
create these objects using a Java SE 7 try-with-resources statement which
removes the need for applications to explicitly call close() when these
objects are no longer required.
クラシック API の JMS2 以降
The new JMSContext and JMSConsumer interfaces also extend the
java.lang.Autocloseable interface.
JMSProducer が AutoCloseable を拡張しないのはなぜですか?