Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RTC login connection time out problem

Hi All,

I am trying to log in to RTC through java API.

I want to release the connection when it takes too long. I basically use the following code:

public ITeamRepository login(String serverPath) throws TeamRepositoryException {
        ITeamRepository repository = TeamPlatform.getTeamRepositoryService()
                .getTeamRepository(serverPath);
      
        repository.registerLoginHandler(new ITeamRepository.ILoginHandler() {
            public ILoginInfo challenge(ITeamRepository repository) {
                return new ILoginInfo() {
                    public String getUserId() {
                        return myUsername;
                    }

                    public String getPassword() {
                        return myPwd;
                    }
                };
            }
        });
       
        repository.login(monitor);
    
        return repository;
    }


The repository timeout time is 480 seconds, it releases the connection after that. I want to cancel this operation say after 30 seconds. I tried to set the timeout for repository (repository.setConnectionTimeout(number)). But it did not work.

In the background it keeps logging for 480 seconds:
2016-06-07 14:26:32 INFO  HttpMethodDirector:439 - I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect
2016-06-07 14:26:32 INFO  HttpMethodDirector:445 - Retrying request



How do I solve this..? Any hints?

0 votes


Be the first one to answer this question!

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 411
× 169

Question asked: Jul 04 '16, 2:31 a.m.

Question was seen: 3,216 times

Last updated: Jul 04 '16, 3:18 a.m.

Related questions
Confirmation Cancel Confirm