|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atomikos.jms.JtaTopicConnectionFactory
public class JtaTopicConnectionFactory
A connection factory that couples JMS topic sends/receives to JTA transactions. Use this class only if you need to do explicit resource registration with the transaction service (i.e., when the underlying vendor-specific XAResource implementation is not fully compliant with the JTA/XA specifications, or if you want to force recovery at TM startup time). In all other cases, the TopicConnectionFactoryBean class is preferred over this one.
Use this class if you want to make topic send/receive operations within the scope of a JTA transaction. This class requires explicit resource registration with the transaction service: you need to explicitly call getTransactionalResource() and register the result with the UserTransactionService:
XATopicConnectionFactory xafactory = ... //vendor-specific code
JtaTopicConnectionFactory factory =
new JtaTopicConnectionFactory ( xafactory );
com.atomikos.datasource.TransactionalResource resource = factory.getTransactionalResource();
com.atomikos.icatch.UserTransactionService uts = new com.atomikos.icatch.UserTransactionServiceImp();
uts.registerResource ( resource );
Topic functionality in this product was sponsored by Webtide.
Constructor Summary | |
---|---|
JtaTopicConnectionFactory(String resourceName,
javax.jms.XATopicConnectionFactory factory)
Create a new instance with a given JMS vendor-supplied xa connection factory. |
|
JtaTopicConnectionFactory(String resourceName,
javax.jms.XATopicConnectionFactory tFactory,
XidFactory xFactory)
Create a new instance with a given JMS vendor-supplied xa connection factory, and a specific XidFactory. |
Method Summary | |
---|---|
javax.jms.Connection |
createConnection()
Creates a default connection. |
javax.jms.Connection |
createConnection(String userName,
String password)
Creates a default connection for the given user and password. |
javax.jms.TopicConnection |
createTopicConnection()
Creates a default topic connection. |
javax.jms.TopicConnection |
createTopicConnection(String userName,
String password)
Creates a topic connection for the given user and password. |
Reference |
getReference()
|
JmsTransactionalResource |
getTransactionalResource()
Gets the transactional resource created during initialization. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JtaTopicConnectionFactory(String resourceName, javax.jms.XATopicConnectionFactory factory)
resourceName
- The unique name for the transactional resource that will be
created.factory
- The JMS vendor-supplied xa connection factory.public JtaTopicConnectionFactory(String resourceName, javax.jms.XATopicConnectionFactory tFactory, XidFactory xFactory)
resourceName
- The unique name for the transactional resource that will be
created.tFactory
- The JMS vendor-supplied xa connection factory.xFactory
- The XidFactory.Method Detail |
---|
public JmsTransactionalResource getTransactionalResource()
public javax.jms.TopicConnection createTopicConnection() throws javax.jms.JMSException
createTopicConnection
in interface javax.jms.TopicConnectionFactory
javax.jms.JMSException
public javax.jms.TopicConnection createTopicConnection(String userName, String password) throws javax.jms.JMSException
createTopicConnection
in interface javax.jms.TopicConnectionFactory
javax.jms.JMSException
public javax.jms.Connection createConnection() throws javax.jms.JMSException
createConnection
in interface javax.jms.ConnectionFactory
javax.jms.JMSException
public javax.jms.Connection createConnection(String userName, String password) throws javax.jms.JMSException
createConnection
in interface javax.jms.ConnectionFactory
javax.jms.JMSException
public Reference getReference() throws NamingException
getReference
in interface Referenceable
NamingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |