Tips for Designing Applications

In this section:

Ensure that the application's logic conforms to the following guidelines:


Top of page

x
Designing Transactions

An application written for a Shared Application Server achieves its performance benefits, in part, by sharing each server agent among several application users. Each user has sole use of the agent for the duration of a logical transaction; when one user's transaction closes (by being committed or rolled back), the next application user gets sole use of the agent for the duration of his or her logical transaction.

You can maximize performance and minimize bottlenecks by accounting for this sharing behavior: design your application's logical transactions to be as small as possible, so that the server agent's resources rotate frequently to each user.

But what would happen if an application were to display a form requiring a user response, and the user left the workstation, causing the logical transaction to pause until he or she returned and responded to the form? The application's other users on that server agent would be paused indefinitely, unable to proceed until the first user continued.

Maintain avoids this scenario by automatically issuing an implied ROLLBACK command just before the application displays a form. This closes the current transaction, ensuring that while the current user is looking at the form (or is away from the workstation), the next user's transaction can exploit the server agent's resources. This ensures high application throughput.

Of course, you will probably want to define your application's transaction boundaries yourself, and not have them defined by the automatic rollback prior to each form. You have two options:


WebFOCUS