Integrating a Thirdparty Transaction Manager
To use a 3rd party transaction manager (TM) you need an TM that implements the JTA spec.
There are a number of different integration points for different behaviours.
org.jboss.tm.TransactionManagerServiceMBean
- the main service
The first thing to implement is an MBean that can take part in the lifecycle.
It must implement this interface but the main method to implement is:
getTransactionManager
- used by services that use the JMX bus to get the TM
The other method to implement is:
getXATerminator
- used by JCA to inflow transactions
but this can be on a separate MBean if the
ObjectName
is changed in jbossjca-service.xml
get*Count
- statistics
these methods are invoked by the JSR77 implementation to get statistics
Side affects
The service must make the following JNDI bindings:
java:/TransactionManager - the transaction manager
java:/TransactionPropagationContextImporter - the TPC importer
java:/TransactionPropagationContextExporter - the TPC factory
org.jboss.tm.TransactionPropagationContextImporter
- TPC import
This interface is invoked when JBoss receives a TransactionPropagationContext (TPC). It allows the transaction manager to import a foreign transaction or a user transaction and attach it to the thread.
org.jboss.tm.TransactionPropagationContextFactory
- TPC export
This interface is invoked when JBoss wants to export a TPC for an outgoing invocation.
org.jboss.tm.JBossXATermintor
- JCA transaction inflow
This is an extension to the
javax.resource.spi.XATermintor
used by JBossJCA to import
transactions via the WorkManager.
org.jboss.tm.TransactionTimeoutConfiguration
- transaction timeout info
This interface is optional, however if it is not implementation some features that require the transaction timeout to be retrieved within JBoss will not work.
org.jboss.tm.TransactionLocalDelegate
- transaction local implementation
This interface is optional, however if it is not implemented an alternate implementation will
use Transaction Synchronizations to handle transaction local processing.
XidFactory
- Xid creation
This implementation has some optimizations used by the JBoss transaction manager. It is not
suitable for a recovering TM as the Xid always goes back to sequence 1 after a reboot.
XAExceptionFormatter
- XAException formatting
This optional feature allows for better formatting of XAExceptions received from XAResources.
UserTransaction
- user transactions
The UserTransaction implementations within JBoss are implemented on top of the transaction manager.
Comments