RTC-SCM-CLI: how to detect whether a login is necessary before calling any CLI command ?
I'm building a wrapper tool (C# .net) around the RTC SCM CLI
This wrapper tool calls lscm.bat (from RTC-scmTools-Win-4.0.3 installation)
These are the steps that are executed by the user of the wrapper tool:
This wrapper tool calls lscm.bat (from RTC-scmTools-Win-4.0.3 installation)
These are the steps that are executed by the user of the wrapper tool:
- Execute login command
- Internally, calls lscm.bat with login command (with appropriate username and password)
- As lscm.bat is called for the first time, it launches "scm.exe" which continues to run even after termination of lscm.bat (I assume, this scm.exe is the daemon process that is explained in jazz.net. Please correct me if I'm wrong)
-
login command is successfully executed
-
Execute "create stream" command
- Internally, calls lscm.bat with "create stream" command (with appropriate arguments)
-
Stream gets created successfully from the account of the user who logged-in during step-1
-
....
- User continues to execute other commands of lscm.bat
-
User executes logout command
Questions:
-
Is there a possibility that the user might get automatically logged out during steps 2 to 4, in case if these steps are executed in longer intervals ? Say, the user executes step-2 today, but doesn't close the wrapper tool application, and doesn't shut down the PC, then executes step-3 one day later.
- Internally, is there a timeout defined for automatic logout ?
- if yes, how to detect this auto logout, so that login command can be issued before executing the actual command intended by the user in step 2 to 4 ?
-
if not, are there any other scenarios during which the user credentials might be lost ?
Thanks for your help in advance.
2 answers
If you have run the login command the username and encrypted password is stored in the {users home directory}/.jazzscm/repositories.txt file.
In case you server goes down or inaccessible or the license session has terminated or expired you will get the appropriate error. Once the server is operational/accessible/license available you do not have to rerun the login command. The command should work as the daemon already has the credentials. If the daemon was shutdown for some reason, the credentials will be picked up from the cached location.