- Revenera Community
- :
- FlexNet Embedded
- :
- FlexNet Embedded Forum
- :
- Re: Difference between releaseLicense() and returnLicense()
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi there,
I use the Java SDK Kit (2019.2) for embedded.
I dont understand the difference between the 2 ILicenseManager methods releaseLicense(ILicense) and returnLicense(ILicense). I've read the API doc and all it says is
"Release a previously acquired stale or non-reusable license." for releaseLicense and
"Return a previously acquired returnable license." for returnLicense().
From my understanding, if I want to actually return a license back to say a LLS so it becomes available for other users to borrow and acquire, then I should instead submit a capability request with the count as 0 (zero). If this is correct, what are the use cases where releaseLicense() and returnLicense() would make sense to use.
Thanks.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @ageorge ,
If you previously sent a capability request to a local license server you would later issue another capability request with Qty 0 to return the license feature(s) back to the license server pool. If you don't return the license(s) back to the server they will eventually expire and automatically be reclaimed by the server after the borrow interval has expired.
A capability request to a license server results in a capability response containing licensed features which are then processed and placed into Trusted Storage on the client. This is your secure bank of licenses. You application then needs to Acquire the license(s) from Trusted Storage via acquireLicense. Let's say you have Qty 5 of feature F1 in Trusted Storage. If you acquire 4 you have 1 left for acquisition within the same process/thread. If you then need to perform an action requiring a quantity of 5 licenses, you would first need to Return the license in use back to Trusted Storage to make the full quantity of 5 available. A license Release is applicable for metered license features that have been designated as non-reusable (feature has been "consumed" and cannot be put back).
Best regards,
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Anyone has any idea on this please?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi @ageorge ,
If you previously sent a capability request to a local license server you would later issue another capability request with Qty 0 to return the license feature(s) back to the license server pool. If you don't return the license(s) back to the server they will eventually expire and automatically be reclaimed by the server after the borrow interval has expired.
A capability request to a license server results in a capability response containing licensed features which are then processed and placed into Trusted Storage on the client. This is your secure bank of licenses. You application then needs to Acquire the license(s) from Trusted Storage via acquireLicense. Let's say you have Qty 5 of feature F1 in Trusted Storage. If you acquire 4 you have 1 left for acquisition within the same process/thread. If you then need to perform an action requiring a quantity of 5 licenses, you would first need to Return the license in use back to Trusted Storage to make the full quantity of 5 available. A license Release is applicable for metered license features that have been designated as non-reusable (feature has been "consumed" and cannot be put back).
Best regards,
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Many thanks @jberthold , that clarifies it perfectly.
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)