Plugging an implementation into the Licensing framework

Each TLicenseProvider object plugs a specific provider's licensing technology into the Licensing framework. The Licensing framework expects to interact with only one object from each of the TLicenseProvider derived classes. To maintain the independence of the Licensing framework from any particular group of implementations, the objects of the TLicenseProvider derived classes are never directly constructed by the Licensing framework. Instead, each instantiation of the Licensing framework dynamically loads all the available TLicenseProvider objects from the file system at the end-user site.

The mechanism for loading the implementations accepts all files containing valid TLicenseProvider objects which appear in the appropriate portion(s) of the CommonPoint application system file structure. A valid filed object is created by constructing an object of the TLicenseProvider derived class and then calling its FlattenForDistribution member function, providing a unique name for the provider (a name like MyCompanyProvider is suggested). FlattenForDistribution streams out the object within an envelope that contains validation information. Resurrecting the provider objects (using the TLicenseProvider::ResurrectFromDistribution member function) causes their implementations to be loaded in as well. The Licensing framework creates and owns the storage for the resurrected objects.

This design requires each address space instantiating the Licensing framework to load all of the provider objects. For this reason, each licensing server provider should keep its TLicenseProvider derivative as small as possible so that it does not burden each address space with unnecessary duplicate information. Additionally, a provider's framework implementation should not use the same shared library as a licensing server implementation. Separate shared libraries facilitate the dynamic upgrade of licensing server implementations without rebooting the environment.

To distribute its framework implementation to an end-user site, a licensing technology provider makes available both the shared library (the executable code of the implementation) and the file containing its filed object. In addition, a provider implementing provider-specific operations also makes its header files (which contain the TProviderOperation derived class declarations) available to developer sites. For more information, see "Basic member functions" on page 138 and "Extended member functions" on page 139.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker