Access NotesAPI on startup

Hello,

i´m developing a plugin which needs to access a database on a server (for example names.nsf).

It should run on Notes startup.

The first problem was, the plugin gets launched before the Notes login process has completed.

So i registered a LoginContextEventListener, and in its handleLogin method i use a NotesSessionJob to access the database.

The problem is, even that SecurePlatform.isLoggedIn() says ‘true’ it looks like the login process still has not completed.

The error messages is ‘Login dialog was canceled by the user’ (translated from german).

Strange, thanks to SSO there is no dialog which could have been canceled…

A workaround is to sleep at least 4 seconds (on my client, maybe longer on slower clients) at the beginning of the NotesSessionJob.

However i don´t like sleeps too much.

Maybe its a bug in SecurePlatform.isLoggedIn() or is there a better method?

Any ideas/suggestions are welcome, thanks in advance.

Thomas