32.3. Methods

The following methods are defined in the interface javax.jms.MessageProducer.

close

public void close()

Closes the message producer.

Since a provider may allocate some resources on behalf of a MessageProducer outside the Java virtual machine, clients should close them when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.

THROWS:

JMSException if the JMS provider fails to close the producer due to some internal error

getDeliveryMode

public int getDeliveryMode()

Gets the producer's default delivery mode.

RETURNS:

the message delivery mode for this message producer

THROWS:

JMSException if the JMS provider fails to get the delivery mode due to some internal error

SEE ...

Get Java™ Message Service API Tutorial and Reference: Messaging for the J2EE™ Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.