Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JRJC Connection is not closing with jira-rest-java-client-api-2.0.0-m31.jar

Azhar March 16, 2017

Hi ,

I am using JIRA rest client api for reading issues.

The problem i face is restClient is unable to close the connection when its invoked is there any bug.

I am using jira-rest-java-client-api-2.0.0-m31.jar

final AsynchronousJiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
final JiraRestClient restClient = factory.createWithBasicHttpAuthentication(jiraUri, username, password);
restClient.close(); // it doesnt close the session

Any help would be appreciated..

Thanks,

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Eisonesoft March 22, 2017

Hi Azhar,

Try with a try-catch-finally block. An example:

 

final AsynchronousJiraRestClientFactory factory=new AsynchronousJiraRestClientFactory();
final JiraRestClient restClient=factory.createWithBasicHttpAuthentication(jiraUri, username, password);
try{
    //some code

}catch(Exception e){
    e.printStackTrace();
}finally{
    try {
        restClient.close(); // it doesnt close the session
    } catch (IOException e) {
        e.printStackTrace();
    }
}

Best Regards

 

 

TAGS
AUG Leaders

Atlassian Community Events