Cleaning the Zombie Login Session on a License Manager

Declare Variables/Constants

String FEATURE_NAME = "Addition";
String CONTACT_SERVER = "localhost";
Attribute attrAppContext = null;
Attribute zombieAttrLogin = null;
ApplicationContext appContext = null;
LoginSession zombieLoginSession = null;

API Calls

To clean Zombie sessions, execute the APIs in the specified sequential order only:

>attrAppContext = new Attribute();


>appContext = new ApplicationContext(attrAppContext);

> zombieAttrLogin = new Attribute();

>zombieAttrLogin.set(LicensingConstants.SNTL_ATTR_LOGIN_FEATURE_VERSION, FEATURE_VERSION);

> zombieAttrLogin.set(LicensingConstants.SNTL_ATTR_LOGIN_ZOMBIE_SESSION, LicensingConstants.SNTL_ATTR_YES);

>zombieAttrLogin.set(LicensingConstants.SNTL_ATTR_LOGIN_ZOMBIE_SESSION_IDENTIFIER_MASK, "7");

>zombieLoginSession = new LoginSession();

>zombieLoginSession.login(appContext, FEATURE_NAME, zombieAttrLogin);



>This functionality is only available in network mode.

>If a contact server is not set, then broadcast will be performed and Zombie login will try to find the appropriate contact server for cleanup. If the server is found, only then cleanup will be performed.

>To close zombie sessions for all features from the current machine, the keyword "$" should be used in the feature name defined for the login_attr API.

>For checked out commuter tokens and repository licenses, the cleanup zombie session is not supported.

Use Case Scenario

Consider the following steps that are a part of this use case:

  1. The licensed application (client) requests a feature from the License Manager.
  2. The licensed application gets terminated abnormally (due to a hardware failure, segmentation fault or any other unknown reason) without releasing the requested feature. However, The License Manager still reports that this particular feature is in-use. The licensed application session is still active.
  3. The licensed application is restarted. It sends a request for the same feature, while the previous session is still active. This scenario can cause:
  1. Feature/license overuse
  2. Denial of license, when the License Manager considers that all token/seat count is in use.

NOTE   To avoid such scenarios, before requesting the same feature, the licensed application should use the above set of API to clean previously issued keys or active sessions.