As in the DB Interface Module, the DB XA implementation of the
RWDBDatabase class is designed around the interface/implementation design pattern. In this pattern, a common interface hides the implementation differences of different databases.
The implementation for the XA version of each access module derives from the corresponding non-XA access module. These XA-specific implementations re‑implement methods whose behavior in an XA-environment differs from that in a non-XA environment. For example, the XA-specific Oracle OCI Access Module provides an implementation class called
RWDBOCIXADatabaseImp. This class derives from the non-XA implementation class
RWDBOCIDatabaseImp, and re-implements the
connection() method to produce XA-enabled, database-specific
RWDBConnection objects.
RWDBOCIXADatabaseImp also re-implements other methods that have XA-specific behaviors.
Figure 2 illustrates the architecture of
RWDBDatabase classes.