JmsTransactionManager
@Deprecated public class JmsTransactionManager102 extends JmsTransactionManager
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
QueueConnection
and a TopicConnection
.
JmsTransactionManager.setConnectionFactory(javax.jms.ConnectionFactory)
,
setPubSubDomain(boolean)
,
Serialized FormAbstractPlatformTransactionManager.SuspendedResourcesHolder
logger, SYNCHRONIZATION_ALWAYS, SYNCHRONIZATION_NEVER, SYNCHRONIZATION_ON_ACTUAL_TRANSACTION
Constructor and Description |
---|
JmsTransactionManager102()
Deprecated.
Create a new JmsTransactionManager102 for bean-style usage.
|
JmsTransactionManager102(ConnectionFactory connectionFactory,
boolean pubSubDomain)
Deprecated.
Create a new JmsTransactionManager102, given a ConnectionFactory.
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Deprecated.
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()
Deprecated.
This implementation overrides the superclass method to use JMS 1.0.2 API.
|
protected Session |
createSession(Connection con)
Deprecated.
This implementation overrides the superclass method to use JMS 1.0.2 API.
|
boolean |
isPubSubDomain()
Deprecated.
Return whether the Publish/Subscribe domain (Topics) is used.
|
void |
setPubSubDomain(boolean pubSubDomain)
Deprecated.
Configure the transaction manager with knowledge of the JMS domain used.
|
doBegin, doCleanupAfterCompletion, doCommit, doGetTransaction, doResume, doRollback, doSetRollbackOnly, doSuspend, getConnectionFactory, getResourceFactory, isExistingTransaction, setConnectionFactory
commit, determineTimeout, getDefaultTimeout, getTransaction, getTransactionSynchronization, invokeAfterCompletion, isFailEarlyOnGlobalRollbackOnly, isGlobalRollbackOnParticipationFailure, isNestedTransactionAllowed, isRollbackOnCommitFailure, isValidateExistingTransaction, newTransactionStatus, prepareForCommit, prepareSynchronization, prepareTransactionStatus, registerAfterCompletionWithExistingTransaction, resume, rollback, setDefaultTimeout, setFailEarlyOnGlobalRollbackOnly, setGlobalRollbackOnParticipationFailure, setNestedTransactionAllowed, setRollbackOnCommitFailure, setTransactionSynchronization, setTransactionSynchronizationName, setValidateExistingTransaction, shouldCommitOnGlobalRollbackOnly, suspend, triggerBeforeCommit, triggerBeforeCompletion, useSavepointForNestedTransaction
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
commit, getTransaction, rollback
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.
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)
public void setPubSubDomain(boolean pubSubDomain)
Default is Point-to-Point (Queues).
pubSubDomain
- true
for Publish/Subscribe domain (Topics),
false
for Point-to-Point domain (Queues)public boolean isPubSubDomain()
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
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 forJMSException
- if thrown by JMS API methods