<< May 2007 | Home | July 2007 >>

Domingo 1.4

Version 1.4 of the Domingo library which wraps the standard Lotus Notes/Domino Java API has been released. Via developerWorks.

Tags : ,

RFC821 address functions in Notes - are they working properly?

I have been trying to use the built-in RFC821 address functions in Notes recently but has given up since they do not work correctly in my mind. A RFC821 - or an internet address - is in my mind composed of a local part (the part before the @-sign) and a period separated domain component (the part after the @-sign). A valid RFC821 address must contain both parts. Valid examples could be:

  • jdoe@example.com
  • john.doe@example.com
  • jdoe@sales.example.com
Notes/Domino has functions in @Formula, LotusScript and Java for working with and validating RFC821 addresses and none work as expected (probably because they all use the same C code). For example all functions will accept "jdoe@example" as a valid RFC821 address - an address which is my mind isn't valid at all. This fact is further aggravated by the fact that I would expect to use the functions to distinguish between Notes addresses and RFC821 addresses. When the functions "work" as they do I cannot do that since jdoe@example could just as well be a Notes shortname followed by a Domino domain.

Below is a test case for LotusScript (non-blank value should indicate a valid RFC821 address).

Dim nn As New NotesName("jdoe@example.com")
Print nn.Addr821
>> jdoe@example.com
Set nn = New NotesName("jdoe@example")
Print nn.Addr821
>> jdoe@example
The help states:
The RFC 821 address is a name followed by an at sign followed by an organization, for example, jbg@acme.us.com. In an RFC 822 address, it is the part enclosed in pointed brackets.
This property returns an empty string if the name does not contain an RFC 821 Internet address.

In my mind this is just plain wrong.

Luke - Lucene Index Toolbox

If you're using the Jakarta Lucene fulltext search library you need Luke as well. Available as Java Web Start for easy installation.

Building XPath expression from XML node

Ever do parsing of large XML/DXL documents? Does the parsing ever fail? If it does you know you need some way to log the offending element in a compact and standardized way. For situations like this (and numerous others) XPath is the way to go and with code like I'll show in this post you are good to go. Java code ahead!

Read more...

Tags : , , , ,

Free on-line XPath tool

If you occasionally need to do a XPath query against a XML document and don't want to shell out the money for a professional tool to cover that need you should take a look at the BIT-101 XPath Query Tool.

Tags : ,

Lotus Sametime vs. Microsoft Communicator

Anyone who knows about a positioning paper from IBM for Lotus Sametime vs. Microsoft Communicator? We have a customer looking into moving platform... :-( I'm looking for information which can help me talk intelligently to the customer about the technical capabilities of Microsoft Communicator using terms I, as knowledgeable about Sametime, would understand.

If there is a feature comparison as well it would be great.

Regex cheat sheet

Regex cheat sheet via Johan.

Tags :

Folder is larger than supported; cannot perform operation

Sometimes it's the small issues in Notes/Domino that are very bothersome. I have a customer that receive a lot of e-mail and I mean a lot - there are only 6 employees but they still receive thousands of e-mails a day. All e-mail is channeled into a single database as this is how they read e-mail and every employee needs to read every e-mail. The e-mails are preprocessed using a few mail rules and put into one of two views depending on these rules.

Recently they have started receiving the above error message when roaming around the office or to their home computer (the screenshot is from a user roaming to his home computer). I did a search on developerWorks and it appears to be a known issue. Unfortunately none of the workarounds will work for us. The situation is further worsened by the fact that the Notes mail client just isn't fast enough for this type of broker-type user that needs to scan a LOT of e-mail. I know that this probably isn't a core use-case so that's a problem we have to deal with.

Since the workarounds will not work we are planning to do the following:

  • Instead of using mail rules to maintain an inbox with all messages and 2 views with the e-mail as processed by the mail rules we will maintain three mail databases (one for the inbox and one for each of the views).
  • The above will mean we can remove the mail rules which should help the server.
  • Create a mail only mail database and remove all calendar code from the template to improve client performance.
  • Do away with the ($Inbox) folder and only have a single view in the database showing all documents. The view will be styled as a simplified ($Inbox).
  • Try to implement a very aggressive archiving schedule to keep the mail databases down to a minimum.

It's going to be interesting to see how it pans out.

RegexBuddy upgraded to v.3.0

Just received a complimentary update from my previous v. 2.3.2 of RegexBuddy to the new v. 3 since I bought it only a short while back. How I love the internet and the level of service provided by all the independent ISV's. RegexBuddy has quickly become a great and invaluable tool for me as I use regular expressions almost every day. The new version sports a lot of improvements but keeps the low startup time which is crucial for me. A very nice new feature is the history view and the updated look'n'feel. The possibility of setting the regex flavor you are using (e.g. java.util.regex) is very nice too.

MP3 Trimmer

MP3 Trimmer - unfortunately only for Mac.

Tags :

%Include in actions

I must admit that I have never been a big fan of using the built-in include files supplied with Notes e.g. lsconst.lss but recently I have started using them to make my code more readable. Using the include file you can write

Dim rc As Integer
rc = Msgbox("Should we continue deleting the contents of your harddrive?", MB_YESNO+MB_ICONQUESTION+MB_DEFBUTTON2, "Continue?")
If rc=IDNO Then
  Exit Sub
End If
which is much more readable than the same code without the constants but using magic numbers.
Dim rc As Integer
rc = Msgbox("Should we continue deleting the contents of your harddrive?", 4+32+256, "Continue?")
If rc=7 Then
  Exit Sub
End If

Today however I realized that you cannot use the include files in (form) actions since the compiler does not allow the use of the Public keyword. All constants in lsconst.lss is defined as Public so that's a no go. Copying lsconst.lss to something like friendly_lsconst.lss, removing the use of Public and the reference at the bottom to lsprcval.lss and including the copy instead solves the problem. This restriction isn't documented in Domino Designer help and severely limits the usability in my mind. Since the constants are inserted at compile time it shouldn't be a problem.

Below is a screenshot of the compile error from Domino Designer. I'm running Notes 7.0.2 on Windows XP Prof. SP2.

Avoiding use of ExceptionUtils

For a long time for error reporting I have been using Apache Commons Lang to convert a stacktrace to a string (Avoiding use of org.apache.commons.lang.exception.ExceptionUtils.getStackTrace(Throwable)) but for a project I was fixing up today the dependency was overkill since it was the only thing I used. A simple replacement is:

StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
t.printStackTrace(pw);
String stack_trace = sw.getBuffer().toString();
Commons Lang is still very much in my arsenal since it has utility methods to so many nice to have functions...

XML entities when doing XSL transformations using LotusScript

I stumbled over an interesting post on developerWorks on external XML entities and XSL transformations in LotusScript: XSLT transform-ignoring external entity reference in R7.0.2 - but worked well on R6.5.4. I was puzzled by the post and looked a bit into it and was unable to find any real LotusScript API support for working with XML entities when processing XML in LotusScript.

I find it funny that there doesn't appear to be any real API support for XML entities in LotusScript that I can see anyway. Hmmm - gotta go into Sherlock Holmes mode...

Patch for lost messages in Sametime 7.5.1 tabbed chat interface

As previously mentioned (Sametime 7.5.1 tabbed interface is loosing messages!) I upgraded to Sametime Connect 7.5.1 and began loosing chat messages when using the new tabbed chat interface. I was kindly informed by Hans-Peter Kuessner from Domblog.de of two IBM patches for the issue. I contacted Lotus Support and requested the hotfixes and promptly received them. I have provisioned the hotfix to my users using the automatisk provisioning built into Sametime 7.5. The automatic update of user Connect clients has worked like a charm and the patch has solved the issue. Nice!

Below is a screenshot of the dialog shown to users after the patch has been automatically installed and a screenshot of the "Manage plug-ins" dialog after the feature patch has been installed.

Only feature I could see the need for would be some way to see which users have installed the patch and who haven't. Of cause users do not have the option of not installing the patch but still it would be nice to know how many of the users have been updated. Some might be connecting from home where they might not have access to the update site. I haven't checked the log so strictly speaking I don't know if it's there but somehow I doubt it.

Charts

This kind of XML/SWF charts is cool and exactly the kind of stuff I have been looking for, for at project I'm currently working on. Via Tim Tripcony.

Tags : , ,

DIIOP_IOR_HOST

Today is slow on new topics so I thought I would share a nice (D)IIOP notes.ini related setting for the Domino server. When you run the Domino IIOP server behind a NAT'ed connection you will need to change the IP address that the server publishes through its diiop_ior.txt file. If you don't clients will try to connect to the un-NAT'ed IP address instead of the NAT'ed one (since that's the one Domino binds to).

The solution is to set the DIIOP_IOR_HOST notes.ini setting to the NAT'ed address and restart the DIIOP task. This will make the diiop_ior.txt contain the NAT'ed address.

Please note that the setting is called DIIOPIORHOST from Domino 7 and onwards but DIIOP_IOR_HOST is still supported as stated in the notes.ini documentation on developerWorks.

C API guru help needed!

Anyone who knows how to write code to see which LotusScript subs/functions are defined in a script library using the C API?

It's not illegal or anything!! :-)