Am I Supposed to Use XATopicConnectionFactory Instead Of TopicConnectionFactory in Case I Want to Use J2EE Container Transactions from the Engine?

0
Posted

Am I Supposed to Use XATopicConnectionFactory Instead Of TopicConnectionFactory in Case I Want to Use J2EE Container Transactions from the Engine?

0

No. You need to use XATopicConnectionFactory only when there are more resource managers involved in the same transaction (e.g. javax.sql.DataSource). In order to manage the different resources in the transaction, the transaction manager needs to perform the two-phase commit and therefore the involved resources should be XA-compliant. However, we recommend using XATopicConnectionFactory always when possible.

Related Questions