Author Message
Joined: Nov 9, 2021
Messages: 1
Dear Team,

I try with below code to login agent

jtapiPeer = JtapiPeerFactory.getJtapiPeer(isNull(data.getPeer()) ? null : data.getPeer());

provider = jtapiPeer.getProvider(providerString);

terminal = provider.getTerminal(stationId);


after execution of above code. App created below threads. when next agent login, again 5 threads got created.
Daemon Thread [GetEventThread] (Running)

Daemon Thread [ShutdownThread] (Running)
Daemon Thread [DistributeCSTAEvent] (Running)
Daemon Thread [AuditThread] (Running)
Daemon Thread [TsapiProReader] (Running)

when i do the log-off properly with below code. The above 5 threads got closed. but the agent accidently closed the browser or vpn disconnect or shut down the machine (with out log-out) then How can i close these threads. please help me on this issue.


one more final question
How can i close all connection? ( why i am asking is 12 hours one I will clean up atleast)
  • [Thumb - LoginIssue.PNG]

Joined: Nov 30, 2009
Messages: 1811
In order to remove those threads the application must either shutdown the provider or the application must end.

I take it that your JTAPI application is running on a (web?) server and the agent's access it via a web connection. The problem seems to be that you have not put in place a mechanism to allow the server to know that the agent has disconnected. I suggest you consider implementing some sort of heartbeat between the client and server. If the server does not receive heartbeats from the application, it should shutdown the provider.

Go to:   
Mobile view