TIBCO Adapter SDK C++ Reference
MApp::onTermination
MApp
You terminate an adapter application by calling MApp::stop(). At that time, the SDK first calls the application-defined onTermination() method, then performs some cleanup of its own. The application has to explicitly call the destructor for MApp after the call to MApp::stop() has returned.
Remarks
The SDK handles the destruction of all components, regardless of whether they were automatically created or not. Applications can, however, explicitly delete components if they wish.

For other objects that are not components, applications should deallocate memory and perform other cleanup in this method. Note that deleting an RVCM or RVCMQ MSubscriber object explicitly cancels the subscription. As a rule, it is therefore preferable to let the SDK take care of this deletion.

Every adapter instance has to implement this method.

Take special care with certified subscribers:

  • If you delete a certified subscriber in an onTermination() method, the certified subscription is canceled.

  • If you do not delete a certified subscriber, the SDK deletes it for you and the certified delivery is maintained by the associated publishers.
This method is protected; it can only be called from within the SDK itself. It is currently called from within the MApp::stop() method, which applications call to terminate an application.
Declaration
virtual void onTermination() = 0 throw(MException);
Links
Copyright (c) 2010 TIBCO Software Inc. All rights reserved.