Proper Java switchToID behavior

I need some help understanding the proper performance of the switchToID method of the Registration class in the Java/Notes API: public String switchToID(String idfile, String userpw) throws NotesException.

My understating is that this method will prompt the user to browse for a file if the passed idfile is not found, and/or prompt the user for a password if it doesn’t match the provided idfile.

I have an instance where I am running a java application on the same machine as the Domino Server. The java application passes a valid idfile and userpw to the method, yet the method will still prompt the user to enter a password. It is interesting to note that this prompt will only appear the first time the call is made, after the domino server has started-up. All subsequent calls to the switchToID call never prompt for a password (because the password is correct). To reproduce this ‘one-time-prompting’ behavior, I have to shutdown the Domino server, and run the java application again.

I have experienced this behavior on Notes/Domino R6.0.2CF1 running on Solaris 8 and also on R6.0.1 running on Linux Red Hat 7.2

My questions:

  1. Why is the prompt appearing, even though the idfile and userpw parameters are valid and correct?

  2. Is there another java method (or methods) that can be used to effectively switch identity without being prompted at the user interface (assuming a valid and correct idfile/userpw combination are provided)?

Any insight would be appreciated.

–PERRY

Subject: Proper Java switchToID behavior

This has always been the case when running stand-alone applications to access Notes locally. Whether using Java or COM, the only way for this to not occur is if you clear the password in the Notes ID being used.

It makes good sense from a security stand-point, albeit an inconvenience.

Neill

http://www.laneyconsulting.com