Compaq Reliable Transaction Router manual Polymorphism Object Implementation Benefits

Page 43

Polymorphism

Object

Implementation

Benefits

Object-Oriented Programming

Polymorphism is the ability of objects, inherited from a common base or parent class, to respond differently to the same message. This is done by defining different implementations of the same method name within the individual child class definitions. For example: A DogArray object, "DogArray OurDogs[2];" refers to two element objects of class Dog, the base class:

King, of class Doberman, is a derived or child class of Dog.

Fifi, of class Minipoodle, is a derived or child class of Dog. If, in a program, OurDogs[n]->Bark( ) is called in a loop, then:

In iteration one ([1]), method King::Bark( ) is called.

In iteration two ([2]), method Fifi::Bark( ) is called.

King's bark does not sound like Fifi's bark because each Bark( ) call is a separately defined method within its child object definition. The virtual parent class (Dog) method Bark( ) is defined in the class definition of Dog.

The benefits of creating RTR solutions with C++ foundation classes include the following:

Each major RTR concept is represented by its own individual foundation class.

Simple methods within RTR classes transform features of RTR for streamlined solutions.

Major classes include Get and Set methods for changing transaction states.

Default handling code is provided for all Messages and Events, where appropriate.

You do not need to provide handling code for all messages and events.

The sending and receiving of data is abstracted to a higher level with transaction controller and data classes.

No buffers and links coding is needed.

Internal RTR information is accessible without a need to know RTR internals.

Architectural Concepts 2–9

Image 43
Contents Reliable Transaction Router Getting Started Page Contents Reliability Features Figures Page Purpose of this Document PrefaceDocument Structure For all users Related DocumentationReaders Comments Reading PathIf V2 to System Manager Application Programmer= Tutorial Reliable Transaction Router IntroductionRTR Continuous Computing Concepts RTR Continuous Computing ConceptsRTR Terminology RTR TerminologyClient Symbol Server Symbol Roles Symbols Components in the RTR Environment Nontransactional messaging Transaction ID Controller Application Presentation Database ServerBusiness Logic Odbc Model RTR Frontend PC BrowserJournal Browser11 RTR Deployed on Three Nodes 12 Standby Server Configuration 13 Transactional Shadowing Configuration RTR Server Types RTR Server TypesStandby server Standby in a cluster 15 Standby Servers 16 Shadow Servers Server1 Server2 Server3 Server4 17 Concurrent ServersPartition a Transaction19 Bank Partitioning Example Standby Server Configurations Anonymous clients Tunnel RTR Networking Capabilities RTR Networking CapabilitiesPage Three-Layer Model Architectural ConceptsThree Layer Model Three-Layer ModelRTR Facilities Bridge the Gap RTR Facilities Bridge the GapBroadcasts Flexibility and GrowthFlexibility and Growth Transaction IntegrityObject-Oriented Programming Partitioned Data ModelPartitioned Data Model Partitioned Data Model Object-Oriented ProgrammingFunctional and Object-Oriented Programming Compared ObjectsExample 2-1 Objects-Defined Sample Messages Class RelationshipsPolymorphism Object Implementation Benefits XA Support XA SupportServers Reliability FeaturesRecovery Scenarios Failover and RecoveryFailover and Recovery Recovery Scenarios Backend Recovery Router Recovery Frontend RecoveryPage RTR Interfaces RTR Management Station RTR Management Station RTR Create Facility DESIGN/ALLROLES=NODEA RTR RTRRECEIVEMESSAGE/TIME=0 RTR RTRSTARTTX/CHAN=C Interface Application Programming InterfacesRTR Browser Interface Application Programming InterfacesRTR C Example of an open channel call in an RTR client program RTR System Management Environment RTR EnvironmentRtrcomserv RTR System Management EnvironmentManagement Station Running Browser Software RTR System Management EnvironmentMonitoring RTR RTR Runtime Environment Client Application RTR Runtime EnvironmentOptional External Applet Not Running Whats Next? Whats Next?Page Glossary Channel BranchBroadcast Callout serverData object Common classesConcurrent server Data marshallingEvent driven Fault tolerantEndian EventKey range FrontendInquorate JournalMultithreaded MessageMessage handler MultichannelProperty classes PrimaryProcess PropertiesRTR environment RollbackRouter RTR configurationTransaction controller ShadowStandby TransactionTransactional message Two-phase commitTransactional shadowing Index-1 IndexIndex-2