Retrieve users database-files with Java

I want to access a users mail on a Domino-server using Java. I can login to the server with username and password, but to read mail, I need to know the path to the database (“mail/username.nsf”). How do I get it?

More specificaly I want to set dbPath automatically:

// TODO find the dbPath in the domino

String dbPath = “mail/administ.nsf”;

log.info("protocolConnect(): Getting database "+ dbPath);

currentDb = domSession.getDatabase(null, dbPath);

Thanks!

Subject: Retrieve users database-files with Java…

You can do a lookup into the NAB:

Open the “names.nsf” database, get the “($Users)” view, and do a getDocumentByKey() against the username of the current user. The value of the MailFile field contains the path to the mail database.

Steve

Subject: RE: Retrieve users database-files with Java…

Thanks a lot! I’ll try that asap =)