Publishing Engine Programmer's Guide > The Arbortext Publishing Engine Request Manager > Understanding the Internal Structure of Arbortext PE Request Manager > Transaction Management > Transaction IDs, Names, and Directories
  
Transaction IDs, Names, and Directories
When the Arbortext PE Request Manager receives a new request, it allocates a unique transaction ID, creates a transaction directory (for active transactions), and saves the request, including the request body, in the transaction directory. Transaction IDs are positive integers that are not reused, even when Arbortext Publishing Engine is restarted.
Each transaction can have an optional name to specify descriptive text to aid in identifying it. Arbortext Editor clients can specify a transaction name using the Queued Transaction Names dialog box (available from Publishing Engine category of Tools > Preferences) or the Transaction Name field on the File > Publish set of dialog boxes. The query parameter, transaction-name, allows an application to provide a transaction name as part of its HTTP request. The transaction-name value can include a string $t, to be replaced by the unique transaction ID assigned on the Arbortext PE server. Names can only be unique if they include the $t string, so descriptive text alone is not a reliable way to make a name unique.
Each transaction has its own directory and contains only information associated with that transaction. Transaction directories are all created as subdirectories of the location specified by the parameter com.arbortext.e3.transactionDirectory. Each directory name follows the format rq_n, where n is the transaction ID.
When the Arbortext PE Request Manager finishes processing an immediate transaction and the transaction meets the criteria specified by the parameter com.arbortext.e3.transactionArchive.selector, the transaction directory is copied (and compressed) into a transaction archive entry. Then the transaction directory and its contents are deleted.
The transaction directory for a queued transaction is not deleted immediately to give the client that submitted the transaction time to retrieve the result. The transaction is deleted either upon explicit request by the user or when one of the following criteria is satisfied:
If a client retrieves the transaction response, the transaction is deleted after the time indicated by the global parameter com.arbortext.e3.maxRetrievedTransactionAge set in e3config.xml. The default is 24 hours.
If no client retrieves the transaction response, the transaction is deleted after the time indicated by the global parameter com.arbortext.e3.maxCompletedTransactionAge set in e3config.xml. The default is 7 days.
If the transaction is to be archived in either case, it is archived just before the transaction directory is deleted.