| org.springframework.jms.core.JmsTemplate org.springframework.jms.core.JmsTemplate102
JmsTemplate102 | public class JmsTemplate102 extends JmsTemplate (Code) | | A subclass of
JmsTemplate for the JMS 1.0.2 specification, not relying
on JMS 1.1 methods like JmsTemplate itself. This class can be used for JMS
1.0.2 providers, offering the same API as JmsTemplate does for JMS 1.1 providers.
You must specify the domain (or style) of messaging to be either
Point-to-Point (Queues) or Publish/Subscribe (Topics), using the
JmsTemplate102.setPubSubDomain "pubSubDomain" property .
Point-to-Point (Queues) is the default domain.
The "pubSubDomain" property is an important setting due to the use of similar
but separate class hierarchies in the JMS 1.0.2 API. JMS 1.1 provides a new
domain-independent API that allows for easy mix-and-match use of Point-to-Point
and Publish/Subscribe styles.
This template uses a
org.springframework.jms.support.destination.DynamicDestinationResolver and a
org.springframework.jms.support.converter.SimpleMessageConverter102 as default strategies for resolving a destination name and converting a message,
respectively.
author: Mark Pollack author: Juergen Hoeller since: 1.1 See Also: JmsTemplate102.setConnectionFactory See Also: JmsTemplate102.setPubSubDomain See Also: javax.jms.Queue See Also: javax.jms.Topic See Also: javax.jms.QueueSession See Also: javax.jms.TopicSession See Also: javax.jms.QueueSender See Also: javax.jms.TopicPublisher See Also: javax.jms.QueueReceiver See Also: javax.jms.TopicSubscriber |
Constructor Summary | |
public | JmsTemplate102() Create a new JmsTemplate102 for bean-style usage. | public | JmsTemplate102(ConnectionFactory connectionFactory, boolean pubSubDomain) Create a new JmsTemplate102, given a ConnectionFactory. |
Method Summary | |
public void | afterPropertiesSet() In addition to checking if the connection factory is set, make sure
that the supplied connection factory is of the appropriate type for
the specified destination type: QueueConnectionFactory for queues,
and TopicConnectionFactory for topics. | protected Connection | createConnection() This implementation overrides the superclass method to use JMS 1.0.2 API. | protected MessageConsumer | createConsumer(Session session, Destination destination, String messageSelector) This implementation overrides the superclass method to use JMS 1.0.2 API. | protected Session | createSession(Connection con) This implementation overrides the superclass method to use JMS 1.0.2 API. | protected MessageProducer | doCreateProducer(Session session, Destination destination) This implementation overrides the superclass method to use JMS 1.0.2 API. | protected void | doSend(MessageProducer producer, Message message) This implementation overrides the superclass method to use JMS 1.0.2 API. | protected Connection | getConnection(JmsResourceHolder holder) This implementation overrides the superclass method to accept either
a QueueConnection or a TopicConnection, depending on the domain. | protected Session | getSession(JmsResourceHolder holder) This implementation overrides the superclass method to accept either
a QueueSession or a TopicSession, depending on the domain. | protected void | initDefaultStrategies() Initialize the default implementations for the template's strategies:
DynamicDestinationResolver and SimpleMessageConverter102. | protected boolean | isClientAcknowledge(Session session) This implementation overrides the superclass method to avoid using
JMS 1.1's Session getAcknowledgeMode() method. |
JmsTemplate102 | public JmsTemplate102()(Code) | | Create a new JmsTemplate102 for bean-style usage.
Note: The ConnectionFactory has to be set before using the instance.
This constructor can be used to prepare a JmsTemplate via a BeanFactory,
typically setting the ConnectionFactory via setConnectionFactory.
See Also: JmsTemplate102.setConnectionFactory |
JmsTemplate102 | public JmsTemplate102(ConnectionFactory connectionFactory, boolean pubSubDomain)(Code) | | Create a new JmsTemplate102, given a ConnectionFactory.
Parameters: connectionFactory - the ConnectionFactory to obtain Connections from Parameters: pubSubDomain - whether the Publish/Subscribe domain (Topics) orPoint-to-Point domain (Queues) should be used See Also: JmsTemplate102.setPubSubDomain |
afterPropertiesSet | public void afterPropertiesSet()(Code) | | In addition to checking if the connection factory is set, make sure
that the supplied connection factory is of the appropriate type for
the specified destination type: QueueConnectionFactory for queues,
and TopicConnectionFactory for topics.
|
createConnection | protected Connection createConnection() throws JMSException(Code) | | This implementation overrides the superclass method to use JMS 1.0.2 API.
|
createConsumer | protected MessageConsumer createConsumer(Session session, Destination destination, String messageSelector) throws JMSException(Code) | | This implementation overrides the superclass method to use JMS 1.0.2 API.
|
createSession | protected Session createSession(Connection con) throws JMSException(Code) | | This implementation overrides the superclass method to use JMS 1.0.2 API.
|
doCreateProducer | protected MessageProducer doCreateProducer(Session session, Destination destination) throws JMSException(Code) | | This implementation overrides the superclass method to use JMS 1.0.2 API.
|
doSend | protected void doSend(MessageProducer producer, Message message) throws JMSException(Code) | | This implementation overrides the superclass method to use JMS 1.0.2 API.
|
getConnection | protected Connection getConnection(JmsResourceHolder holder)(Code) | | This implementation overrides the superclass method to accept either
a QueueConnection or a TopicConnection, depending on the domain.
|
getSession | protected Session getSession(JmsResourceHolder holder)(Code) | | This implementation overrides the superclass method to accept either
a QueueSession or a TopicSession, depending on the domain.
|
isClientAcknowledge | protected boolean isClientAcknowledge(Session session) throws JMSException(Code) | | This implementation overrides the superclass method to avoid using
JMS 1.1's Session getAcknowledgeMode() method.
The best we can do here is to check the setting on the template.
See Also: JmsTemplate102.getSessionAcknowledgeMode() |
Fields inherited from org.springframework.jms.core.JmsTemplate | final public static long RECEIVE_TIMEOUT_INDEFINITE_WAIT(Code)(Java Doc) final public static long RECEIVE_TIMEOUT_NO_WAIT(Code)(Java Doc)
|
Methods inherited from org.springframework.jms.core.JmsTemplate | public void convertAndSend(Object message) throws JmsException(Code)(Java Doc) public void convertAndSend(Destination destination, Object message) throws JmsException(Code)(Java Doc) public void convertAndSend(String destinationName, Object message) throws JmsException(Code)(Java Doc) public void convertAndSend(Object message, MessagePostProcessor postProcessor) throws JmsException(Code)(Java Doc) public void convertAndSend(Destination destination, Object message, MessagePostProcessor postProcessor) throws JmsException(Code)(Java Doc) public void convertAndSend(String destinationName, Object message, MessagePostProcessor postProcessor) throws JmsException(Code)(Java Doc) protected MessageConsumer createConsumer(Session session, Destination destination, String messageSelector) throws JMSException(Code)(Java Doc) protected MessageProducer createProducer(Session session, Destination destination) throws JMSException(Code)(Java Doc) protected Object doConvertFromMessage(Message message)(Code)(Java Doc) protected MessageProducer doCreateProducer(Session session, Destination destination) throws JMSException(Code)(Java Doc) protected Message doReceive(Session session, Destination destination, String messageSelector) throws JMSException(Code)(Java Doc) protected Message doReceive(Session session, MessageConsumer consumer) throws JMSException(Code)(Java Doc) protected void doSend(Session session, Destination destination, MessageCreator messageCreator) throws JMSException(Code)(Java Doc) protected void doSend(MessageProducer producer, Message message) throws JMSException(Code)(Java Doc) public Object execute(SessionCallback action, boolean startConnection) throws JmsException(Code)(Java Doc) public Object execute(SessionCallback action) throws JmsException(Code)(Java Doc) public Object execute(ProducerCallback action) throws JmsException(Code)(Java Doc) protected Connection getConnection(JmsResourceHolder holder)(Code)(Java Doc) public Destination getDefaultDestination()(Code)(Java Doc) public String getDefaultDestinationName()(Code)(Java Doc) public int getDeliveryMode()(Code)(Java Doc) public MessageConverter getMessageConverter()(Code)(Java Doc) public int getPriority()(Code)(Java Doc) public long getReceiveTimeout()(Code)(Java Doc) protected Session getSession(JmsResourceHolder holder)(Code)(Java Doc) public long getTimeToLive()(Code)(Java Doc) protected void initDefaultStrategies()(Code)(Java Doc) public boolean isExplicitQosEnabled()(Code)(Java Doc) public boolean isMessageIdEnabled()(Code)(Java Doc) public boolean isMessageTimestampEnabled()(Code)(Java Doc) public boolean isPubSubNoLocal()(Code)(Java Doc) protected boolean isSessionLocallyTransacted(Session session)(Code)(Java Doc) public Message receive() throws JmsException(Code)(Java Doc) public Message receive(Destination destination) throws JmsException(Code)(Java Doc) public Message receive(String destinationName) throws JmsException(Code)(Java Doc) public Object receiveAndConvert() throws JmsException(Code)(Java Doc) public Object receiveAndConvert(Destination destination) throws JmsException(Code)(Java Doc) public Object receiveAndConvert(String destinationName) throws JmsException(Code)(Java Doc) public Message receiveSelected(String messageSelector) throws JmsException(Code)(Java Doc) public Message receiveSelected(Destination destination, String messageSelector) throws JmsException(Code)(Java Doc) public Message receiveSelected(String destinationName, String messageSelector) throws JmsException(Code)(Java Doc) public Object receiveSelectedAndConvert(String messageSelector) throws JmsException(Code)(Java Doc) public Object receiveSelectedAndConvert(Destination destination, String messageSelector) throws JmsException(Code)(Java Doc) public Object receiveSelectedAndConvert(String destinationName, String messageSelector) throws JmsException(Code)(Java Doc) public void send(MessageCreator messageCreator) throws JmsException(Code)(Java Doc) public void send(Destination destination, MessageCreator messageCreator) throws JmsException(Code)(Java Doc) public void send(String destinationName, MessageCreator messageCreator) throws JmsException(Code)(Java Doc) public void setDefaultDestination(Destination destination)(Code)(Java Doc) public void setDefaultDestinationName(String destinationName)(Code)(Java Doc) public void setDeliveryMode(int deliveryMode)(Code)(Java Doc) public void setDeliveryPersistent(boolean deliveryPersistent)(Code)(Java Doc) public void setExplicitQosEnabled(boolean explicitQosEnabled)(Code)(Java Doc) public void setMessageConverter(MessageConverter messageConverter)(Code)(Java Doc) public void setMessageIdEnabled(boolean messageIdEnabled)(Code)(Java Doc) public void setMessageTimestampEnabled(boolean messageTimestampEnabled)(Code)(Java Doc) public void setPriority(int priority)(Code)(Java Doc) public void setPubSubNoLocal(boolean pubSubNoLocal)(Code)(Java Doc) public void setReceiveTimeout(long receiveTimeout)(Code)(Java Doc) public void setTimeToLive(long timeToLive)(Code)(Java Doc)
|
|
|