spring-framework / org.springframework.jms.core / ProducerCallback / doInJms

doInJms

@Nullable abstract fun doInJms(session: Session, producer: MessageProducer): T

Perform operations on the given Session and MessageProducer.

The message producer is not associated with any destination unless when specified in the JmsTemplate call.

Parameters

session - the JMS Session object to use

producer - the JMS MessageProducer object to use

Exceptions

javax.jms.JMSException - if thrown by JMS API methods

Return
a result object from working with the Session, if any (or null if none)