java.lang.Object | ||||
↳ | org.springframework.jms.support.JmsAccessor | |||
↳ | org.springframework.jms.support.destination.JmsDestinationAccessor | |||
↳ | org.springframework.jms.core.JmsTemplate | |||
↳ | org.springframework.jms.core.JmsTemplate102 |
This class is deprecated.
as of Spring 3.0, in favor of the JMS 1.1 based JmsTemplate
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
"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
DynamicDestinationResolver
and a SimpleMessageConverter102
as default strategies for resolving a destination name and converting a message,
respectively.
setConnectionFactory(ConnectionFactory)
setPubSubDomain(boolean)
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.jms.core.JmsTemplate
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.jms.support.JmsAccessor
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new JmsTemplate102 for bean-style usage.
| |||||||||||
Create a new JmsTemplate102, given a ConnectionFactory.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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 Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a JMS MessageProducer for the given Session and Destination,
configuring it to disable message ids and/or timestamps (if necessary).
| |||||||||||
This implementation overrides the superclass method to use JMS 1.0.2 API.
| |||||||||||
This implementation overrides the superclass method to use JMS 1.0.2 API.
| |||||||||||
This implementation overrides the superclass method to use JMS 1.0.2 API.
| |||||||||||
This implementation overrides the superclass method to use JMS 1.0.2 API.
| |||||||||||
This implementation overrides the superclass method to use JMS 1.0.2 API.
| |||||||||||
This implementation overrides the superclass method to accept either
a QueueConnection or a TopicConnection, depending on the domain.
| |||||||||||
This implementation overrides the superclass method to accept either
a QueueSession or a TopicSession, depending on the domain.
| |||||||||||
Initialize the default implementations for the template's strategies:
DynamicDestinationResolver and SimpleMessageConverter102.
| |||||||||||
This implementation overrides the superclass method to avoid using
JMS 1.1's Session
getAcknowledgeMode() method. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.jms.core.JmsTemplate
| |||||||||||
From class
org.springframework.jms.support.destination.JmsDestinationAccessor
| |||||||||||
From class
org.springframework.jms.support.JmsAccessor
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.beans.factory.InitializingBean
| |||||||||||
From interface
org.springframework.jms.core.JmsOperations
|
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.
Create a new JmsTemplate102, given a ConnectionFactory.
connectionFactory | the ConnectionFactory to obtain Connections from |
---|---|
pubSubDomain | whether the Publish/Subscribe domain (Topics) or Point-to-Point domain (Queues) should be used |
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.
Create a JMS MessageProducer for the given Session and Destination, configuring it to disable message ids and/or timestamps (if necessary).
Delegates to doCreateProducer(Session, Destination)
for creation of the raw
JMS MessageProducer, which needs to be specific to JMS 1.1 or 1.0.2.
session | the JMS Session to create a QueueBrowser for |
---|---|
queue | the JMS Queue to create a QueueBrowser for |
messageSelector | the message selector for this consumer (can be null ) |
JMSException |
---|
This implementation overrides the superclass method to use JMS 1.0.2 API.
JMSException |
---|
This implementation overrides the superclass method to use JMS 1.0.2 API.
session | the JMS Session to create a MessageConsumer for |
---|---|
destination | the JMS Destination to create a MessageConsumer for |
messageSelector | the message selector for this consumer (can be null ) |
JMSException |
---|
This implementation overrides the superclass method to use JMS 1.0.2 API.
con | the JMS Connection to create a Session for |
---|
JMSException |
---|
This implementation overrides the superclass method to use JMS 1.0.2 API.
session | the JMS Session to create a MessageProducer for |
---|---|
destination | the JMS Destination to create a MessageProducer for |
JMSException |
---|
This implementation overrides the superclass method to use JMS 1.0.2 API.
producer | the JMS MessageProducer to send with |
---|---|
message | the JMS Message to send |
JMSException |
---|
This implementation overrides the superclass method to accept either a QueueConnection or a TopicConnection, depending on the domain.
holder | the JmsResourceHolder |
---|
null
if none found
This implementation overrides the superclass method to accept either a QueueSession or a TopicSession, depending on the domain.
holder | the JmsResourceHolder |
---|
null
if none found
Initialize the default implementations for the template's strategies: DynamicDestinationResolver and SimpleMessageConverter102.
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.
session | the JMS Session to check |
---|
JMSException |
---|