dca_interface
6.3.4
|
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.
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
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.
The following code demonstrates how to set up a license object.
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().
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.