The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

HPSD web-api doesn’t include a closeSession method?

SOLVED
Go to solution
Highlighted
danbiscuit
Super Collector

HPSD web-api doesn’t include a closeSession method?

Web-api doesn't include closeSession?

I have written a java program using the web-api to extract data from Service Desk. The application connects fine and works perfectly.

However when multiple people use the application it ties up multiple concurrent licenses, and these do not seem to disappear after the users session has closed.

The Javadoc states that there is an openSession method within the ApiSDSession class, but there doesn't seem to be an equivlant of closeSession to disconnect from the Service desk application server?

How have others worked around this problem?

Many Thanks,

Dan Spada.
2 REPLIES
Venkatesha_1
Esteemed Contributor
Solution

Re: HPSD web-api doesn’t include a closeSession method?

Hi,

You can use the beolw steps.

ApiSDSession session = null;
session.closeConnection(); // Closes the connection.
session = null; // Intiates to null
System.exit(0); // This is required if you are using thru command line

Hope this solves.

Regards
Venkatesha

danbiscuit
Super Collector

Re: HPSD web-api doesn’t include a closeSession method?

Perfect solution! Thanks
//Add this to "OnDomLoad" event