Java in Notes/Domino Explained: Can I cast a null pointer?


In short – yes you can. There is nothing that prevents you from compiling the following:

String s1 = (String)null;

I even think you’ll have to do it to make your code compile for one for the methods of lotus.domino-package. I can’t of the top of my head remember which method it is, but there is one method where the compiler will force you to cast a null to a String. You’ll also sometimes end up casting a null pointer when doing dynamic classloading.

I told you it would be a short post.

Interesting technote on maximum execution time of LotusScript agents

I was quite surprised the read the snippet from the cited technote below but after thinking about it, it makes sense. How would the AMgr know beforehand how long time the agent would run and hence how to keep the Terminate event inside the maximum execution time…

“By design, the Terminate event will execute after an agent has been halted for passing the time-out setting. The best coding practice would be to have only necessary clean-up operations within the Termination event. The main operations of the agent should reside in the Initialize event.”

Via the Lotus Support RSS feed: Terminate Event of a LotusScript Agent continues running after the Max Execution time (technote 1201324)

The VIEW article published

Just had to post a plug for my new article in THE VIEW called “Extend the power of LotusScript with DXL and OOP“… 🙂 If you have an electronic subscription the article is available now.

This article is much more technical than the first and explains in detail how to leverage DXL from LotusScript using XSLT and the built in XML classes as well as how to use pipelining to avoid writing intermediary results to the harddrive. Apart from the DXL stuff there’s also something on how to use design patterns in LotusScript to build dynamic decision making trees using the Chain of Command design pattern.

I hope you enjoy reading it and take something away from it. If you have questions or comments please let me know.

Change to LDAP Directory Assistance (in Domino 7)

Or at least I think the change was in Domino 7… I never noticed it before since we have been using a custom DSAPI authentication module to work around the shortcoming in previous Domino releases.

The change is that the @Username function now returns the distinguished name of the authenticated user separated with slashes (/) even though it is a LDAP name and hence really separated by commas. This is über nice since it means we can scrap the custom DSAPI module and move the application from a Domino 5.x server to a Domino 7 server (we are having big issues deploying the DSAPI filter on Domino 7).

Sweet!

(For the record – my custom DSAPI filter does more than convert LDAP names separated by commas to names separated by slashes. It also handles dynamic LDAP groups composed on the groupOfUrls objectClass. If you need something like that let me know.)

Got bitten by Skype

It appears that Skype, in its default setup, listens on port 80 and port 443 (HTTP and HTTPS) when loaded (alternative ports for incoming calls). This is bad when running a web server for testing or trying to use the web preview from Domino Desinger. So mental note to self – no Skype while working!! 🙂

Helping out on “Domino application hosting best practices?”

Anyone out there who can help Scott out?

“Is anyone out there willing to talk about running Domino as an applications hosting platform for other organizations but not using the xSP install? There are a few companies out there that sell Domino but there’s only so much I can figure out about how they manage the back end from digging around with a free account ID.”

ScottandMargo.net: Domino application hosting best practices?

THE VIEW article: Extend the power of LotusScript with DXL and OOP

The second part of my articles on LotusScript.doc titled “Extend the power of LotusScript with DXL and OOP” will be out in the May/June issue of THE VIEW. The article is a great deal more technical and explains in-depth how the application is built using object-oriented LotusScript, design patterns, DXL and XSLT.

The article will supposedly be posted online today (Friday) and should be available at a newsstand near you soon!! 🙂