jump to article
...intermittent thoughts

Transforming LSI_info() to GetThreadInfo()

The undocumented function call LSI_Info() is suspected to cause trouble (read, crashes) on various occasions in Notes and Domino. So while using an undocumented function is not recommendable at all, this one seems to be a real cause of pain in many cases. We have seen servers that had LotusScript code using LSI_info() calls in them crashing mystically. So we have started to iron out calls to LSI_Info() as a step in stabilizing these servers, even though we have rarely made use of this function anyway. And it proofed to be helpful.

As the information that is retrieved by LSI_Info is extremely helpful in many occasions, simply removing those calls is not the best solution. Instead, replacing calls to LSI_Info() by appropriate other calls is much better. Most of the information provided by LSI_Info() can also be retrieved by its adult sister GetThreadInfo() which is not only documented but also supported. As for the other information that is not retrievable by GetThreadInfo(), I have no idea how to retrieve it other than by using LSI_Info() - but I would personally prefer a stable server and not to have that information as a server that is instable and maybe shows me some more information on rare scenarios.

For all the Information that is retrievable, simply replacing the keyword "LSI_Info" by "GetThreadInfo" is not applicable as both functions take different values to retrieve the same information. As a note to myself and to others who are attempting to do modify their code I have put together a parameter mapping of both calls. The parameters for LSI_Info() are taken from Johan Känngård, those for GetThreadInfo() come from Lotus/IBM:

Current line number (in the LS source)Lsi_Info(1)GetThreadInfo(0) or GetThreadInfo(LSI_THREAD_LINE)
Name of current procedure (i.e. function, sub or property)Lsi_Info(2)GetThreadInfo(1) or GetThreadInfo(LSI_THREAD_PROC)
Name of current module (i.e. ScriptLibrary name)Lsi_Info(3)GetThreadInfo(2) or GetThreadInfo(LSI_THREAD_MODULE)
LotusScript version numberLsi_Info(6)GetThreadInfo(3) or GetThreadInfo(LSI_THREAD_VERSION)
(Human) language setting (e.g. 'en' for english)Lsi_Info(9)GetThreadInfo(4) or GetThreadInfo(LSI_THREAD_LANGUAGE)
Country or region settingn/aGetThreadInfo(5) or GetThreadInfo(LSI_THREAD_COUNTRY)
Current clock ticksn/aGetThreadInfo(6) or GetThreadInfo(LSI_THREAD_TICKS)
Clock ticks per second (supported only on platforms that support parallel processing primitives)n/aGetThreadInfo(7) or GetThreadInfo(LSI_THREAD_TICKS_PER_SEC)
Current process ID (supported only on platforms that support parallel processing primitives)n/aGetThreadInfo(8) or GetThreadInfo(LSI_THREAD_PROCESS_ID)
Current task ID (supported only on platforms that support parallel processing primitives)n/aGetThreadInfo(9) or GetThreadInfo(LSI_THREAD_TASK_ID)
name of the procedure that called this one (i.e. the caller)Lsi_Info(12)GetThreadInfo(10) or GetThreadInfo(LSI_THREAD_CALLPROC)
name of the calling modulen/aGetThreadInfo(11) or GetThreadInfo(LSI_THREAD_CALLMODULE)
LotusScript Memory AllocatedLsi_Info(50)n/a
LotusScript Memory Allocated from OSLsi_Info(51)a/a
LotusScript Blocks UsedLsi_Info(52)n/a

Hope this helps not only me but others as well.

Off to DNUG

This week is DNUG Conference Week in Frankfurt. The date appeared much faster than I expected it to come - and I am very excited to be there again! I am especially happy to listen to Daniel's and Bobs sessions as well as to hear the new things from Niklas. But I am also looking forward to meet friends, colleagues, geeks, customers and the many other interesting people I don't know yet. It's always nice meeting the people at DNUG, talking about so various topics and that's why I am there. So if you see me, don't hesitate to stop by and say hello. And if you're not yet booked - I'm sure there is an opportunity for the impromptu among you - I'm sure, its going to be another great conference organized by the great DNUG team from Jena.

XPages Extension Library from OpenNTF is huge

During Powersphere in Paderborn yesterday, I had the opportunity to speak with Niklas Heidloff about the just released XPages Extension Library. What I have seen so far has just blown me away and I am constantly getting new ideas of what's going to be possible with that. This stuff is awesome and beams XPages development into another dimension.
While it is not that easy to install the Extension Library, it is well documented on how to do that - I am still at the beginning of the >70 pages documentation. After the install, using the Extensions works like a charm. Very interesting to me is the use of the XPages Extensibility API and the availability of the source code - that way it is a perfect tutorial on how to use the API for your own extensions. I spoke to several developers yesterday and all of them were excited to get their hands on it - just like me ;-) Sure, the things that are possible with the XPages Extensibility API used in the XPages Extension Library are tough if you are not a Java Geek - but its so totally worth looking into it! But even if you are not the crack that is easy with exploiting new opportunities of API based extensions, the library is so helpful by providing new elements to XPages that were previously comparably difficult to accomplish. You should definitely have a look at it. Great stuff!

AppIcon Plugin for Domino Designer 8.5.2

One of the new features available in Notes 8.5.2 are the 24Bit icons for DatabasesApplications. Having seen and played around with the new feature in the Beta stages of 8.5.2 I have to admit, I really like this feature. It makes me kind of more productive in a special way: it makes me feel better when seeing them and it allows me to realize some of the applications more easily on my Workspace an the Tabs than the old 16 color icons:

There were a few things I personally missed with the new feature but that I also see not as being necessarily implemented into core Domino Designer by default. So I thought I just extend Domino Designer with a small plugin that provides this functionality:
  • As the new 24 Bit Application Icon is really an Image Resource under the hood, one could easily export it to disk, if he was given the opportunity by Designer. As exporting such is not Designers purpose, this is a feature that can be added by the AppIcon Plugin
  • Did you know, your Application Icons are easily available from any web browser? Yes, they are: one could use the ?OpenIcon URL command to get a perfectly rendered version of the Classic Application Icon and <database.nsf>/$DbIcon?open for the new 24 Bit Application Icon. Not everyone likes this to be exposed to anyone who has HTTP Access to a server. Well, the new Application Icon could be hidden from Web as it is actually a special kind of an Image Resource. But as it is a special Image Resyource that is not so easy: it is hidden from the NSFs Image Resources listing and so you don't have a chance to see it anywhere in the database design. Normally a very good idea but not for this particular use case. AppIcon thus allows you to hide and unhide the new 24 Bit Application Icon from Web access with an easy click. But of course there are more general methods like using SecureDomino (a short hand setting is available in the current release) to generally block all requests of such a kind to all databases on a sever - but sometimes you can't be sure SecureDomino is installed on the server you are deploying your database to and so this granular solution might be a good solution.
  • I thought it might be a good idea to be able to export the Classic Application icon (the traditional 16 Color one). Sure, one could do so by putting the database in question to a server and use the ?OpenIcon URL command - but honestly, if that are the things I would have to do for getting hands on a file version of the traditional database icon I would be too lazy most of the times. The AppIcon Plugin allows for storing the Classic Icon in PNG format easily and directly from Domino Designer.
Sounds interesting? Well, I have good news: The AppIcon plugin is freely available. Easiest way to install is to drag the widget descriptor to your Lotus Notes "My Widgets" sidebar.

SecureDomino on Domino 8.5.2

It took only a couple of hours after the release of Notes/Domino 8.5.2 until I got the first question whether SecureDomino is supported on Domino 8.5.2. I am happy to have an easy answer to that: Yes.
We have done plenty of tests with SecureDomino on the Beta versions of Domino 8.5.2 and know the software is ready for this release. So from that side, there's no reason to not update a server to Domino 8.5.2 - especially if you think about the new features that came with 8.5.1 and 8.5.2 like SPNEGO Single Sign on. But there are organizations that just can't update all their servers straight to the latest release - reality often covers some pitfalls that force organizations to stay at least with one server on an elder release. In such situations the rollout of new features like SPNEGO can become less remarkable as end users rather see the event of being challenged for a password and do not understand the background (why should they even want to). Especially such situations can be solved with SecureDomino's current release: allowing for a more seamless activation of SPNEGO Single Sign On in organizations - by enabling Domino Servers prior to 8.5.1 and even non Windows Servers for an unchallenged login using SPNEGO and a Designated Authentication Server.

A long time of silence

It has been quite silent on this blog for a longer time now - and the reason is not that this blog is dead - it is only because I had too much to do. I was working on so many things at the same time - I simply did not find the time to write. Sure, some things I was working on were under different NDAs and I was unable to write but that was not sufficient for an excuse and over time my bad conscience became louder and louder ;-)

Especially when we we released new Versions of SecureDomino or the FireNotes Mozilla Plugin I was involved in writing things down for the Web and could have easily posted some information here too - and I should have. But there were other things that I was working on or playing with : Eclipse Plugins for Notes and Domino Designer, writing articles, preparing conference sessions, working with new exiting stuff in XPages, at some point even participating in a podcast and last but certainly not least doing my normal job and having a private live ;-). Really exiting times and I promise to post stuff here more frequently in the future.

There is so much stuff that I could write about - I really have to pick some of all those interesting topics an post about it. Expect more to come ;-)


Das alljährliche Hussitten-Kirschfest steht mal wieder bevor. Für alle Naumburger ein muss - und für alle, die schon einmal da waren, ein absolutes Highlight. Und für die die es noch nicht kennen, eine absolute Empfehlung!
Das Hussitten-Kirschfest in Naumburg geht auf ein Schulfest zurück und wird seit vielen, vielen Jahren jedes Jahr um das letzte Wochenende im Juni gefeiert. Los geht's bereits Morgen mit dem Einzug der Stadtwache und der Ratsherren auf der Vogelwiese (man beachte, dass Googles Aufnahmen auch gerade zum Kirschfest gemacht wurden). Samstag ist dann der historische Umzug und Sonntag Peter Pauls Messe. Von Donnerstag bis Montag Abend ist natürlich reges Treiben in den Festzelten auf der Vogelwiese.

Und wer schon einmal üben möchte, der kann gerne ein bisschen Kirschfest-Karaoke betreiben:

some more @Functions for XPages (@URLEncode(), @URLDecode())

As mentioned earlier, a couple of @Functions are missing in XPages serverside JavaScript. When I was a bit confused by that before I am now in a state of simply doing it another way without even realizing an @Function is missing - probably a reason why some of them are not available. Another reason is how easy it sometimes is to achieve the same by incorporating native Java inside serverside JavaScript.

Since I just showed how to incorporate native Java inside JavaScript with XPages in my XPages session here at DNUG, I thought I should post the code for both sharing two other extensions to the already available @WebDbname() function and for showing how easy one can leverage native Java code inside his serverside JavaScript.

So this is the first example - @URLEncode() in JavaScript:

/** ****************************************************************************
* @URLEncode()
* provides closely the same functionality its @Formula pendant, that is it
* encodes an object to a URL encoded format
* @param encodeObject the Object to encode. The Objects toString() method is
*                 used to retrieve a String to encode!
* @param encSch optional encoding scheme to use
* @see java.net.URLEncoder
*         (http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLEncoder.html)
* @see http://java.sun.com/j2se/1.5.0/docs/api/java/lang/package-summary.html
* @returns URL encoded version of encodeObject or null in case of any error
* @author Michael Gollmick
* @version 1.0
* @date 20090509
* @depends java.net.URLEncoder
**************************************************************************** **/
function @URLEncode(encodeObject, encSch:String) {
        try {
                var encScheme = ((encSch) && (encSch !== null))?encSch:"UTF-8";
                return java.net.URLEncoder.encode(encodeObject.toString(),
        } catch (e) {
                print("ERROR in @URLEncode:" + e);
        return null;

To complete the encoding experience, we need the function to retranslate encodings - @URLDecode() in JavaScript:

/** ****************************************************************************
* @URLDecode()
* provides closely the same functionality its @Formula pendant, that is it
* Decodes a URL Encoded string to normal format
* @param strToDecode the String to decode
* @param encodeObject optional encoding scheme to use
* @see java.net.URLDecoder
*         (http://java.sun.com/j2se/1.4.2/docs/api/java/net/URLDecoder.html)
* @see http://java.sun.com/j2se/1.5.0/docs/api/java/lang/package-summary.html
* @returns decoded version of strToDecode or null in case of any error
* @author Michael Gollmick
* @version 1.0
* @date 20090509
* @depends java.net.URLDecoder
**************************************************************************** **/
function @URLDecode(strToDecode:String, encSch:String) {
        try {
                var encScheme = ((encSch) && (encSch !== null))?encSch:"UTF-8";
                return java.net.URLDecoder.decode(strToDecode, encScheme);
        } catch (e) {
                print("ERROR in @URLDecode:" + e);
        return null;

As you easily see - the magic is done in both cases in only one line, invoking a native static final Java method. So that would make it easy to use only that lines. Of course the whole functions do have some more functionality, so it is probably not the worst idea to use them ;-)

Big Apple in Naumburg

Just got an invitation to a exhibit opening on Friday. Unfortunately I cannot go. But I know it is going to be very good - and the exhibit will last some days. The city of Naumburg is showing some pictures of New York, my friend Andreas Klingebiel shot back in 2000, when he was there for an internship. That pictures were shown several times before, for instance in the City of Cologne and in Leipzigs main train station. Quite impressive!
Picture is © 2000 by Andreas Klingebiel and must not be redistributed!

If you visit Naumburg until September this year, you should probably have a look at these pictures in the city library:

Stadtbibliothek Naumburg, Jägerstr. 4, D-06618 Naumburg

The exhibit is free of charge.

Klasse Bilder

Vor einigen Tagen erhielt ich eine Mail eines aufmerksamen Lesers meines allerersten Web-Projekts. Er hatte, als er 1990 Naumburg nach einigen Jahren zum ersten mal wieder besuchte Bilder gemacht. Soweit nix besonderes, Bilder machen jährlich hunderttausende Touristen in Naumburg. Das Außergewöhnliche liegt in seinem Sinn für Feinheiten: nach einigen Jahren hat er dieselben Fotos am, gleichen Standort noch einmal geschossen. Das Ergebnis spricht für sich selbst: Naumburg vor 20 Jahren. Als Naumburger tut es gut zu sehen, wie wunderbar sich die Stadt entwickelt hat, wie die massiven anfangs öffentlichen, schnell aber privaten Investitionen Wirkung gezeigt haben. Wie Hausbesitzer es endlich schaffen konnten, Ihre Fassaden und zunehmend auch die Baumasse an sich in instand zu halten...