cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
babu19
Level 3

Two programs accessing same trusted storage in FlexNet Embedded

Jump to solution

Hi All,

I have a question here. I can run multiple instances of my application on same the machine and it will borrow only one license from the server. I need to return the license back to the server when the application exit.

The problem here is, when one instance exit, it calls a capability request to release the license to the server. However, this license still shows as valid in the other instance when it use isStale() method. 

Question1 : Is there a way to update/refresh the trusted storage of license manager from the trusted storage file? (without making a capability request and process response). So that the changes made by other process will reflect in this license manager.

Thanks

Babu

0 Kudos
(1) Solution

Hi @ejohnson1

I was testing using C++. I have resolved the issue. Each time when I checkout a license, I was storing the license object in a map. This was creating the issue. instead, I have to call getLicenses() method each time to get the updated license objects.

Thanks,

View solution in original post

(4) Replies
ejohnson1
Flexera Alumni

Hi @babu19 ,

Let's start with the multiple instances on the same application.

Is this intended, which is the default behavior after a successful capability request/response exchange or should this behavior not be allowed (e.g. and require additional license capacity)?

0 Kudos

Hi @ejohnson1 

Thank you for the response.

yes, this is the intended behavior when borrowing the license. Multiple instances should consume only one license count when it runs on the same machine.

The problem is that the application needs to release the license back to the license server when it exit.

Suppose we have two instances acquired license from a single license count.
Now instance 1 exit, it calls a capability request with count 0, and process the capability response to the trusted store. So the count will increase in the server and the response will be updated to the trusted store with 0 borrowed license.

But the instance 2 still has the old details and shows as a valid license. For example, isStale() still give false. It can successfully call ReturnLicense() and AcquireLicense() even though there is no actual borrowed in the machine (because Instance 1 updated the trusted store with 0 count).  So is there a way the LicenseManger in instance 2  can reload the latest information from the trusted store?

 

0 Kudos

Hi @babu19 ,

Thank you for the information and detail.

I'd like to suggest the following. Take the default "view" example and run it after processing the capability response that sets the count to 0 in trusted storage. "View" should see 0 also and thus the method to achieve what the desired behavior.

Also, I'd like to run similar on my end. Can you tell me if you're using the C, Java or C# client SDK?

Many thanks !

0 Kudos

Hi @ejohnson1

I was testing using C++. I have resolved the issue. Each time when I checkout a license, I was storing the license object in a map. This was creating the issue. instead, I have to call getLicenses() method each time to get the updated license objects.

Thanks,