public interface ProducerCallback<T>
To be used with JmsTemplate's callback methods that take a ProducerCallback argument, often implemented as an anonymous inner class.
The typical implementation will perform multiple operations on the
MessageProducer. When used with
a 1.0.2 provider, you need to downcast to the appropriate domain
TopicPublisher, to actually send a message.
T doInJms(Session session, MessageProducer producer) throws JMSException
The message producer is not associated with any destination unless when specified in the JmsTemplate call.
session- the JMS
Sessionobject to use
producer- the JMS
MessageProducerobject to use
Session, if any (can be
JMSException- if thrown by JMS API methods