The BORROW directive enables leasing of licenses to computers that can be disconnected from the network. The parameter associated with BORROW tells how many hours a license can be leased. Valid values range from 1 to 8760 hours (1 year).

This directive can be used only with network licenses; accordingly, the COUNT directive must be set if BORROW is set.

Usage and recommendations

The license borrowing feature lets users run your software on a computer that is not continuously connected to the network, such as a laptop, by allowing a floating network license to be leased for a time-limited period.

Borrowing works by making a floating network license available for a certain amount of time to the requesting computer, and making it unavailable on the license server for this time. Through a borrow request, the client can obtain the time-limited license, which will work like a local uncounted license.

When performing borrowing, a temporary license file is written on the client side, which will be used for subsequent license requests, with the checked out license(s) marked unavailable for the same period of time on the license server.

At the time of the borrow request, the client must be connected to the network. After a successful borrow request, the client will make use of its temporary license and can be disconnected from the network. Note that the license is borrowed for only the currently logged in user of the client machine.

Borrowing is enabled by default. You may wish to disable borrowing to increase checkout speed (see Optimizing license checkout speed) or to increase security. Although fairly secure, borrowing is by nature less secure than other mechanisms in LM-X. You should recognize that there is a trade-off between the convenience offered by implementing borrowing and the overall strength of your licensing solution.

To use borrowing for your applications, you should set the permitted lease time length at license creation, as described in FEATURE settings. Licensed applications must then enable borrowing by calling LMX_SetOption(). (See LMX_OPT_ALLOW_BORROW in LMX_SetOption.) The maximum number of hours that may be set is 8760, or one year; however, setting the shortest reasonable lease times is recommended for best security.

The client computer can borrow a license or return the license early using a normal checkout with the proper environment variable settings, as described in Controlling license behavior.

If a feature is borrowed for more than one hour, and the client reestablishes a connection with the license server, the client will refresh the borrow time. For example:

  1. A client borrows Feature A from Server 1 with a borrow time of 24 hours.
  2. 12 hours later, the client checks in Feature A, but does not do a borrow return.
  3. If the client later performs a checkout of Feature A from Server 1 and establishes a connection with the server, the checkout will succeed and the borrow hours for Feature A will once again be 24 hours. However, if the client cannot establish a connection with the server, the borrow time will be only 12 hours (the remaining hours left after originally borrowing the feature).

Note: The borrow time is not refreshed within the first hour. Therefore, a new checkout done within the first 60 minutes does not guarantee another borrow time of 24 hours.

Temporary data is written on both the client and license server to save information about borrow leases. If the data is deleted at the client, the borrowed license will no longer function; however, if the data is deleted at the server, the license will again become available.

Therefore, be aware that if an end-user site moves a license server from one machine to another, previously leased licenses will continue to work without being counted by the license server, and this may lead to over-licensing.

As an alternative to allowing the borrow time to run out, you can send the customer a new license that is functionally identical but has a different license key.