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

Why does it take 2 minutes to login to RTC using a plainJava login API?

I have written some plainJava utilities for updating work items etc and have used the code examples available in this forum but I find that when i run the utility for the first time it takes > 2 mins to perform the initial login.

The relevant code is:

  public class RTCclient {
   
    private static Logger logger = null;
   
    private ITeamRepository teamRepository = null;
   
    private String repositoryURI  = null;
    private String userId         = null;
    private String password       = null;
   
    private static  IWorkspaceManager wm;
    private static  IWorkspace workspace;
    private static  IWorkspaceConnection workspaceConnection;
    private static  IFileSystemWorkItemManager fileWorkItemmanager;
    private static  IWorkspaceConnection streamConnection;
    private static  List<IComponent> iComponents;
    private static  IFileContentManager contentManager;
    private static  IComponent myComponent;
    private static  String myStreamName = "unknown";   
   
    /**
     *
     *
     */
    private static class LoginHandler implements ILoginHandler, ILoginInfo {
       
        private String fUserId;
        private String fPassword;
       
        /**
         * @param userId
         * @param password
         */
        private LoginHandler(String userId, String password) {
            fUserId   = userId;
            fPassword = password;
        }
       
        public String getUserId() {
            return fUserId;
        }
       
        public String getPassword() {
            return fPassword;
        }
       
         public ILoginInfo challenge(ITeamRepository repository) {
            return this;
        }
    }


    /**
     * @param repositoryURI
     * @param rtcUserid
     * @param rtcPassword
     */
    public RTCclient( String repositoryURI,
                      String rtcUserid,
                      String rtcPassword
                      //String projectAreaName
                    ) {
       
        this.repositoryURI = repositoryURI;
        this.userId =  rtcUserid;
        this.password = rtcPassword;
    
    }
   
   public ITeamRepository login() {       
       
        this.teamRepository= TeamPlatform.getTeamRepositoryService().getTeamRepository(repositoryURI);
        this.teamRepository.registerLoginHandler(new LoginHandler(userId, password));
        try {
            this.teamRepository.login(null);
        } catch (TeamRepositoryException e) {
            e.printStackTrace();
            System.exit(1);
        }
       
        return this.teamRepository;
    }

and my Java utility simply performs a:

rtcClient       = new RTCclient("https://myjazzserver.com:9443/jazz", "me@acme.com", "mypassword");
teamRepository  = rtcClient.login();

The login() call takes 120 secs or more the first time I run the utility.  If I then run the utility a little latter the login() takes 1 sec or so.

I also get the following console messages, for both slow and fast logins:

17-May-2013 12:57:58 org.apache.commons.httpclient.HttpMethodDirector isAuthenticationNeeded
INFO: Authentication requested but doAuthentication is disabled

Since I'm presumably using code that many others have used successfully, is there some setting on the server that might be incorrect?   Does anyone have any idea what might be causing the login delay?




0 votes



2 answers

Permanent link
My first time connects are in the 6 second range, across a remote VPN connection to our 3.0.1.1 test server.

0 votes


Permanent link
Hi Dave, you can find the code I am usually using here and in several posts on the site. It takes some time to initialize the TeamPlatform and to log into the system. However, I have never seen it taking 2 minutes. For me it is rather in the area of 30 seconds. It appears to be the same time every time I start a client. I am not sure why it takes only 1 sec the next time around. It is only quicker, if the java code is not finished. In that case the TeamPlatform is still loaded and has all the data cached that is required.

1 vote

Your answer

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,926
× 233
× 30

Question asked: May 17 '13, 9:22 a.m.

Question was seen: 8,226 times

Last updated: May 17 '13, 10:36 a.m.

Confirmation Cancel Confirm