Java in Notes/Domino Explained: Different kinds of sessions


When creating sessions to Notes/Domino (lotus.domino.Session) you have to distinguish between the two different types:

  • Local sessions
  • Remote sessions

Below I’ll describe both types and more importantly what you cannot do with the different types.

Local sessions

You create a local session using the methods of lotus.domino.NotesFactory class that doesn’t take a hostname argument. The session is actually just a thin wrapper around native calls to an underlying DLL/shared library hence you need to have the binary Notes and/or Domino code installed on the machine your code runs on.

Local sessions cannot be created using a LTPA (Lightweight Third Party Autentication) token or anonymously.

To use local sessions you need to include the notes.jar file on the classpath of the code.

Remote sessions

Remote (or Corba) sessions are run over the IIOP wire protocol hence you need the DIIOP server task loaded on the Domino server. You do not need to have the HTTP server task loaded on the Domino server to use remote sessions. The reason you would normally load HTTP anyway is if you want the code to automatically discover the hostname and port to use for the Domino server. This is done via the IOR (Interoperable Object Reference) and the diiop_ior.txt on the Domino server (http://diiop.example.com/diiop_ior.txt). If you do not load the HTTP task you can provide the IOR to the NotesFactory method as a String.

You cannot create remote sessions against a Notes client installation.

Remote sessions are created using the methods of lotus.domino.NotesFactory that take a hostname as an argument. Remote sessions can be created anonymously, using cleartext username/password or using a previously established LTPA token.

To use remote sessions you need to include the ncso.jar file on the classpath of the code.

Comment SPAM – again…

The easiest way to block comment SPAM is to turn of comments altogether. Another way is to turn of comments to existing posts periodicly which is the way I do it (using a cron job). I’m running Pebble for my blog so disabling comments and trackbacks in bulk is easy using Perl and regular expressions:

perl -pi -e 's/<commentsEnabled>true/<commentsEnabled>false/' `find . -name [0-9]*.xml`
perl -pi -e 's/<trackBacksEnabled>true/<trackBacksEnabled>false/' `find . -name [0-9]*.xml`

This is the same approach as I have been used previously to rename categories.

Video on how to install Callisto

Via EclipseZone: Instructional video on how to use the Callisto update site

As the post mentions it shows you in 2 minutes and 35 seconds how to install the entire 140 MB Callisto package. I downloaded Eclipse 3.2 yesterday and installed Callisto using the Callisto Discovery Site and it worked like a charm. Nice. I really like the XML editors that are part of the Callisto distribution – no more paying for XML editing. I’m missing a XSLT editor though… ๐Ÿ™

PMR at Lotus Support

Just got a call from Lotus Support confirming that the issue mentioned previously with mail settings not being correctly applied is indeed a bug in the software. In short the bug implies that a mail setting that requires an agent to be enabled (e.g. the “Allow Notes to update To Do status and dates for incomplete entries” setting on the calendar profile) will not be correctly applied to user mail databases.

For the time being you can use the agent mentioned previously to work around the problem.

Turning 30!

Oh no! The big three-zero is nearing – I’m turning 30 the day after tomorrow (Sunday). I guess I have to find a more mature-looking picture for the picture on the right… ๐Ÿ™‚