TransactionSession class

The TransactionSession class encapsulates the processing related to transactions.

Syntax

public class TransactionSession extends Session

Members

All members of TransactionSession, including inherited members.

Constructors
Modifier and Type Constructor Description
public TransactionSession(String, Server, SessionData, User) Construct a new session.
Methods
Modifier and Type Method Description
public void beginTransaction() This method is called by the Agentry Server prior to executing the steps for the transaction.
public void endTransaction() This method is called after the steps for the transaction have been successfully processed.
Inherited members from Session
Modifier and Type Member Description
public final void debug(String) Write the given message to a debug log, if debugging is enabled.
public String getName() Returns the name of the session, as configured in the Agentry application.
public Server getServer() Returns the Server singleton object that the Java system connection is currently using.
public SessionData getSessionData() Returns the session data for this session.
public User getUser() Returns the user for this session, if any.
protected Session(String, Server, SessionData, User) Construct a new session, and save each of the arguments so that they can be retrieved later via the getName(), getServer(), getSessionData(), and getUser() methods.
protected Session(String, Server, SessionData) Construct a new session, and save each of the arguments so that they can be retrieved later via the getName(), getServer(), and getSessionData() methods.
public void sessionAborted() This is called if the session is aborted (e.g., by an exception).

Usage

In brief, transactions are the application component that defines data modifications made by the user on the client application. These changes are then transmitted to the Agentry Server for processing. The processing for a transaction is defined by its steps. This class contains methods that allow the implementation of processing that may be required before or after the transaction steps are processed.

A designer can extend this class if special processing is required before or after a transaction is processed. If this class is extended, the Server class must also be extended and its createTransactionSession method must be overridden to return the designer implemented subclass of the TransactionSession class.