HP Reliable Transaction Router Getting Started page 74

Reliable transaction router
Table of Contents

Advertisement

Application Programming Interfaces
Example 4–5 Creating a Facility with the C++ API
// Use the C++ interface to create an RTR facility
RTRFacilityManager::CreateFacilityWithAllRoles_3()
{
bool bOverallResult = true;
//Create facility manager, abort if creation fails
if ( IsFailure(pFacilityManager != NULL) )
return false;
// Create the facility
stsCreateFacility =
{
bOverallResult = false;
OutputStatus( stsCreateFacility);
}
stsDeleteFacility =
// Clean up and return
return bOverallResult;
}
4–20 RTR Interfaces
RTRFacilityManager * pFacilityManager;
pFacilityManager = new RTRFacilityManager;
{
}
rtr_status_t stsCreateFacility;
pFacilityManager->CreateFaclity("FaclityWithAllRoles_3",
//If facility creation is not successful, report it
if ( IsFailure( stsCreateFaciltiy == RTR_STS_OK ) )
else // Delete a successfully created facility
{
rtr_status_t stsDeleteFacility;
pFacilityManager->DeleteFacility("FacilityWithAllRoles_3");
if ( IsFailure( stsDeleteFacility == RTR_STS_OK ) )
{
bOverallResult = false;
OutputStatus) stsDeleteFacility);
}
}
delete pFacilityManager;
GetDefaultRouterName(),
GetDefaultFrontendName(),
GetDefaultBackendName(),
true,
false);

Advertisement

Table of Contents
loading

This manual is also suitable for:

Aa-rle1c-te

Table of Contents