public class

JmsTransactionManager102

extends JmsTransactionManager
java.lang.Object
   ↳ org.springframework.transaction.support.AbstractPlatformTransactionManager
     ↳ org.springframework.jms.connection.JmsTransactionManager
       ↳ org.springframework.jms.connection.JmsTransactionManager102

This class is deprecated.
as of Spring 3.0, in favor of the JMS 1.1 based JmsTransactionManager

Class Overview

A subclass of JmsTransactionManager for the JMS 1.0.2 specification, not relying on JMS 1.1 methods like JmsTransactionManager itself. This class can be used for JMS 1.0.2 providers, offering the same API as JmsTransactionManager does for JMS 1.1 providers.

You need to set the "pubSubDomain" property, since this class will always explicitly differentiate between a javax.jms.QueueConnection and a javax.jms.TopicConnection.

Summary

[Expand]
Inherited Constants
From class org.springframework.transaction.support.AbstractPlatformTransactionManager
[Expand]
Inherited Fields
From class org.springframework.transaction.support.AbstractPlatformTransactionManager
Public Constructors
JmsTransactionManager102()
Create a new JmsTransactionManager102 for bean-style usage.
JmsTransactionManager102(ConnectionFactory connectionFactory, boolean pubSubDomain)
Create a new JmsTransactionManager102, given a ConnectionFactory.
Public Methods
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.
boolean isPubSubDomain()
Return whether the Publish/Subscribe domain (Topics) is used.
void setPubSubDomain(boolean pubSubDomain)
Configure the transaction manager with knowledge of the JMS domain used.
Protected Methods
Connection createConnection()
This implementation overrides the superclass method to use JMS 1.0.2 API.
Session createSession(Connection con)
This implementation overrides the superclass method to use JMS 1.0.2 API.
[Expand]
Inherited Methods
From class org.springframework.jms.connection.JmsTransactionManager
From class org.springframework.transaction.support.AbstractPlatformTransactionManager
From class java.lang.Object
From interface org.springframework.beans.factory.InitializingBean
From interface org.springframework.transaction.PlatformTransactionManager
From interface org.springframework.transaction.support.ResourceTransactionManager

Public Constructors

public JmsTransactionManager102 ()

Create a new JmsTransactionManager102 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.

public JmsTransactionManager102 (ConnectionFactory connectionFactory, boolean pubSubDomain)

Create a new JmsTransactionManager102, given a ConnectionFactory.

Parameters
connectionFactory the ConnectionFactory to manage transactions for
pubSubDomain whether the Publish/Subscribe domain (Topics) or Point-to-Point domain (Queues) should be used

Public Methods

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.

public boolean isPubSubDomain ()

Return whether the Publish/Subscribe domain (Topics) is used. Otherwise, the Point-to-Point domain (Queues) is used.

public void setPubSubDomain (boolean pubSubDomain)

Configure the transaction manager with knowledge of the JMS domain used. This tells the JMS 1.0.2 provider which class hierarchy to use for creating Connections and Sessions.

Default is Point-to-Point (Queues).

Parameters
pubSubDomain true for Publish/Subscribe domain (Topics), false for Point-to-Point domain (Queues)

Protected Methods

protected Connection createConnection ()

This implementation overrides the superclass method to use JMS 1.0.2 API.

Returns
  • the new JMS Connection
Throws
JMSException

protected Session createSession (Connection con)

This implementation overrides the superclass method to use JMS 1.0.2 API.

Parameters
con the JMS Connection to create a Session for
Returns
  • the new JMS Session
Throws
JMSException