org.springframework.jms.core

Interface ProducerCallback<T>

    • Method Detail

      • doInJms

        @Nullable
        T doInJms(Session session,
                            MessageProducer producer)
                     throws JMSException
        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
        Returns:
        a result object from working with the Session, if any (or null if none)
        Throws:
        JMSException - if thrown by JMS API methods