Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 2 Designing an OIG Application : Designing a Transaction

Designing a Transaction
Transaction
A transaction is a defined unit of processing that either succeeds or fails entirely. That is, it does not partially succeed or otherwise produce an ambiguous state after executing. An exception to this is a transaction that is executed as part of a larger compound transaction, specifically startTran and stopTran interfaces. This transaction does not affect the calling transaction if it succeeds and commits only data particular to that transaction. However, if the transaction fails, the compound transaction in which it is nested also fails.
Transactions are one of the basic building blocks of an Object Integration Gateway web application. They determine what data is accessed, and what actions are performed on the data.
Linking Other OIG Objects to a Transaction
When a transaction is built, it makes sense to have other Object Integration Gateway objects linked to the transaction. For example: you have a transaction that accesses all the sales data for a particular region and summarizes it into an intermediate table. You then need the results to appear on a web page containing both static content and dynamic content.
When the Object Integration Gateway objects are linked to a transaction, they are invoked every time the transaction is invoked. This is both a good thing and a bad thing. Perhaps, in some situations, the linked object should not be invoked, unless some condition is met. In this case, you can specify a post-build rule to be run at the end of the transaction. The post-build rule can test the required condition to determine whether the linked Gateway objects are invoked. For more information about the available functions for post-build rules, and their syntax, refer to Chapter 9, Using the OIG Rules Programming Interface.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved