|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.transaction.support.AbstractPlatformTransactionManager
org.springframework.jms.connection.JmsTransactionManager
org.springframework.jms.connection.JmsTransactionManager102
public class JmsTransactionManager102
A subclass of JmsTransactionManager that uses the JMS 1.0.2 specification, rather than the JMS 1.1 methods used by 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 accordingly, as this class will always create either QueueConnections/QueueSessions or TopicConnections/TopicSessions.
JmsTransactionManager.setConnectionFactory(javax.jms.ConnectionFactory)
,
setPubSubDomain(boolean)
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.springframework.transaction.support.AbstractPlatformTransactionManager |
---|
AbstractPlatformTransactionManager.SuspendedResourcesHolder |
Field Summary |
---|
Fields inherited from class org.springframework.transaction.support.AbstractPlatformTransactionManager |
---|
logger, SYNCHRONIZATION_ALWAYS, SYNCHRONIZATION_NEVER, SYNCHRONIZATION_ON_ACTUAL_TRANSACTION |
Constructor Summary | |
---|---|
JmsTransactionManager102()
Create a new JmsTransactionManager102 for bean-style usage. |
|
JmsTransactionManager102(ConnectionFactory connectionFactory,
boolean pubSubDomain)
Create a new JmsTransactionManager102, given a ConnectionFactory. |
Method Summary | |
---|---|
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 Session |
createSession(Connection con)
This implementation overrides the superclass method to use JMS 1.0.2 API. |
boolean |
isPubSubDomain()
Return whether the Publish/Subscribe domain (Topics) is used. |
void |
setPubSubDomain(boolean pubSubDomain)
Configure the JmsTransactionManager102 with knowledge of the JMS domain used. |
Methods inherited from class org.springframework.jms.connection.JmsTransactionManager |
---|
doBegin, doCleanupAfterCompletion, doCommit, doGetTransaction, doResume, doRollback, doSetRollbackOnly, doSuspend, getConnectionFactory, isExistingTransaction, setConnectionFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JmsTransactionManager102()
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.
JmsTransactionManager.setConnectionFactory(javax.jms.ConnectionFactory)
public JmsTransactionManager102(ConnectionFactory connectionFactory, boolean pubSubDomain)
connectionFactory
- the ConnectionFactory to manage transactions forpubSubDomain
- whether the Publish/Subscribe domain (Topics) or
Point-to-Point domain (Queues) should be usedsetPubSubDomain(boolean)
Method Detail |
---|
public void setPubSubDomain(boolean pubSubDomain)
pubSubDomain
- true for Publish/Subscribe domain (Topics),
false for Point-to-Point domain (Queues)public boolean isPubSubDomain()
public void afterPropertiesSet()
afterPropertiesSet
in class JmsTransactionManager
protected Connection createConnection() throws JMSException
createConnection
in class JmsTransactionManager
JMSException
- if thrown by JMS API methodsprotected Session createSession(Connection con) throws JMSException
createSession
in class JmsTransactionManager
con
- the JMS Connection to create a Session for
JMSException
- if thrown by JMS API methods
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |