Software AG Products 10.7 | Integrating On-Premises and Cloud Applications | Service Development | Working with JMS Triggers | Building a Transacted JMS Trigger
 
Building a Transacted JMS Trigger
 
Prerequisites for a Transacted JMS Trigger
Properties for Transacted JMS Triggers
Steps for Building a Transacted JMS Trigger
Fatal Error Handling for Transacted JMS Triggers
Transient Error Handling for Transacted JMS Triggers
A transacted JMS trigger is a JMS trigger that executes within a transaction. A transaction is a logical unit of work composed of one or more interactions with one or more resources. The interactions within a transaction are either all committed or all rolled back. A transaction either entirely succeeds or has no effect at all.
For a transacted JMS trigger, Integration Server uses a transacted JMS connection alias to receive messages from the JMS provider and to process the messages. A JMS connection alias is considered to be transacted when it has a transaction type of XA TRANSACTION or LOCAL TRANSACTION.
The execution of a transacted JMS trigger is an implicit transaction. In an implicit transaction, Integration Server starts and completes the transaction automatically, without the need for executing any of the transaction management services.
Integration Server starts the implicit transaction when it uses the specified transacted JMS connection alias to connect to the JMS provider and receive messages for the transacted JMS trigger. Integration Server implicitly commits or rolls back the transaction based on the success or failure of the trigger service.
*Integration Server commits the transaction if the trigger service executes successfully.
*Integration Server rolls back the transaction if the trigger service fails with an ISRuntimeException (a transient error). For detailed information about how Integration Server handles a transient error within a transaction, see Transient Error Handling for Transacted JMS Triggers.
*Integration Server rolls back the transaction if the trigger service fails with a Service Exception (a fatal error). For detailed information about how Integration Server handles a fatal error within a transaction, see Fatal Error Handling for Transacted JMS Triggers.
Because Integration Server handles the transaction implicitly, you do not need to use any of the transaction management services, such as pub.art.transaction:startTransaction, in the trigger service. However, if the trigger service includes a nested transaction, you can use the transaction management services to explicitly manage the nested transaction.
Like a non-transacted JMS trigger, a transacted JMS trigger specifies a destination from which it would like to receive documents and specifies routing rules to process messages it receives. However, a transacted JMS trigger has some prerequisites as well as some properties that are different from a non-transacted JMS trigger.