Using Hosted Floating Licenses
The implementation of hosted floating licenses is identical to that of node-locked licenses, with the only distinction being the recommendation to call ActivateLicense() at each application startup and DeactivateLicense() upon application exit to ensure licenses are released gracefully. For SDK usage and implementation details, please refer to the Using LexActivator in Node-Locked Licenses section above.
Creating a floating license
At the time of license creation you should do the following to configure the floating license:
- Set the license type to "hosted-floating".
- Set the lease duration to the amount of time you want to lease the licenses.
- Make sure server sync interval is less than lease duration by at least 30 seconds, as server sync is responsible for license renewal.
Adding floating licensing to your app
Hosted floating license server uses Cryptlex Web API directly to lease the floating licenses. You can simply use LexActivator to enable floating licenses:
When your user is done using the app, the app should send a request to free the license activation by calling DeactivateLicense() LexActivator API function, thereby making it available for other users. If the app doesn't, the license activation becomes (zombie) useless until lease time is over.
Borrowing floating licenses
Borrowing floating licenses for offline usage is supported out of the box. You just need to increase the leaseDuration to the amount of time you wish to lease the license for offline usage.