After successful initialization of the dca::DcaInstance you need to set up a dca::License object.
A license object is required for the initialization of SCA modules, and the creation of SCA base data objects.
Initialization
To create a license object, setup and initialize a dca::LicenseData structure, then call the function dca::DcaInstance::createLicense(). To initialize the dca::LicenseData structure you will need to specify a
- license ticket and a
- product key
These will have been provided for you with your license data.
Once the license object has been created, you can check whether a particular module is licensed using the dca::License::isLicensed() function.
The license object uses an HTTPS connection to retrieve the current license status of your provided ticket information from the IBM license servers.
Sample code
The following code demonstrates how to set up a license object.
- // assume we successfully initialized the DCA and have a valid DcaInstance myDcadca::LicenseData myLicenseData;myLicenseData.ticket = "DCC7-1A26-123A-27..";myLicenseData.product = "DC";dca::License myLicense = myDca.createLicense( myLicenseData );if( !myLicense.isLicensed() ) {cout << "Entered License is not valid!" << endl;return 5;}// myLicense is valid and can be used for package initializations
Demo Tickets
It is possible to obtain a demo ticket for the SDK which is valid for one month (from the date of creation). To obtain a demo ticket, use the ticket code "XXXX" in place of the full ticket data.
After a successful call to createLicense(), the license object will contain the full ticket data for the demo ticket. This can be retrieved from the license object with a call to dca::License::getTicket(). The new ticket data should be then used in subsequent calls to dca::DcaInstance::createLicense().
Using License objects
A license object is bound to a specific ticket. All SDK functionality made available with a particular ticket can be obtained by using a single license object instance.
We recommend therefore that a single license object is used per ticket, and that this object is used wherever a license is required by an API function.
Generated by
