Cleaning the Zombie Login Session on a License Manager
String FEATURE_NAME = "Addition"; String FEATURE_VERSION = "1"; String CONTACT_SERVER = "localhost"; Attribute attrAppContext = null; Attribute zombieAttrLogin = null; ApplicationContext appContext = null; LoginSession zombieLoginSession = null;
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_ZOMBIE_SESSION, LicensingConstants.SNTL_ATTR_YES);
>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:
- The licensed application (client) requests a feature from the License Manager.
- 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.
- The licensed application is restarted. It sends a request for the same feature, while the previous session is still active. This scenario can cause:
- Feature/license overuse
- 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.