Sametime business card data cache

The Sametime client has a cache of the information it has fetched from the business card (aka blackbox) system on a per user basis. This is both the textual data and the image data. In case your Sametime client displays stale data you can do one of two things:

  1. Right-click the contact and select “Refresh Person Info”. This will make Sametime refetch the data from the Sametime server.
  2. Clear the cache from disk.

In some cases option 1 wont work although it’s far far the easiest. I have seen this when changing the person image format (e.g. from jpg til gif). In this case you may need to clear the cache from disk.

So where is this cache? Well if you open the “workspace.metadata.pluginscom.ibm.collaboration.realtime.people.implPersonCache” directory beneath your Notes data directory you’ll see a directory per Sametime community you’re connected to. In each of these directories you’ll find

  • an .index file containing a list of the known users
  • an XML file per user with person info
  • a picture, if any, of the user

If you want to purge the cache for a community you can close the Notes client, clear the contents of the .index file (you may be able to delete the file altogether but I haven’t tried) and delete the xml and image files. When you restart Notes and hover over a Sametime contact the client will refetch the business card data.

Easy.

Sametime blackboxes and CommonField tag – keep your eyes open!

I have written quite a couple of posts about Sametime blackboxes over time on how to write your own and how to configure multiple blackboxes to fetch business card data from multiple sources. I wrote some articles in THE VIEW on the matter and I wrote the backbox used on the Bleedyellow site to fetch business card from Lotus Connections.

One of the critical pieces in the Sametime blackbox puzzle is the <CommonField CommonFieldName=”fieldname”/> tag from the userinfoconfig.xml (the file used to configure the blackbox system). This tag is used to indicate to the blackbox subsystem which field from the primary blackbox should be used to identify the user being queried in subsequent blackboxes. Unfortunately I have seen over the last couple of implementations I have done that this tag cannot be relied upon anymore.

In the last two implementations I have done I’m seeing that the UID from the context being sent to the secondary (and tertiary) blackbox is the distinguished name (i.e. the LDAP DN or Notes DN) rather than the e-mail address is specified in userinfoconfig.xml. These implementations are primarily based on Domino 8.0.2 and Sametime 8.0.1. In these implementations I have had to write code to “re-lookup” the e-mail address in LDAP based on the DN.

I’m trying to get IBM to react to this fact but no luck so far. I’ll keep you posted…

Sametime blackbox – update needed for Lotus Connections 2.0

I wrote a number of articles in THE VIEW some time back on writing custom Sametime blackboxes (see the March/April and May/June 2008 issues). If you implemented the Sametime blackbox that read data from Lotus Connections (like it’s done on bleedyellow.com) and you have upgraded (or are planning to upgrade) to Lotus Connections 2.0 this post is for you.

The database schema for Lotus Connections 2.0 has changed slightly in comparison with Lotus Connections 1.0.x so if you’re using a custom Sametime blackbox to read data from Lotus Connections it needs to be changed. The only thing that needs to change is the SQL since the key column in the EMPINST.PHOTO table has been renamed from PROF_UID to PROF_KEY (hightlighted in the SQL below).

SELECT EMPL.PROF_UID UID, PROF_DISPLAY_NAME DSP_NAME, PROF_MAIL_LOWER EMAIL, PROF_MOBILE MOBILE, PROF_PAGER PAGER, PROF_TITLE TITLE, PROF_TIMEZONE TIMEZONE, PROF_TELEPHONE_NUMBER PHONE, PROF_BLOG_URL BLOG_URL, EMPL.PROF_DEPARTMENT_NUMBER DEPT_NO, DEPT.PROF_DEPARTMENT_TITLE DEPT_NAME, EMPL.PROF_ORGANIZATION_IDENTIFIER ORG_IDENT, ORG.PROF_ORGANIZATION_TITLE ORG_NAME, EMPL.PROF_ISO_COUNTRY_CODE CTRY_ISOCODE, CTRY.PROF_COUNTRY_DESC CTRY_NAME, P.PROF_IMAGE PHOTO_BYTES, P.PROF_FILE_TYPE PHOTO_MIMETYPE FROM EMPINST.EMPLOYEE EMPL LEFT OUTER JOIN EMPINST.PHOTO P ON EMPL.PROF_KEY=P.PROF_KEY LEFT OUTER JOIN EMPINST.DEPARTMENT DEPT ON EMPL.PROF_DEPARTMENT_NUMBER=DEPT.PROF_DEPARTMENT_CODE LEFT OUTER JOIN EMPINST.COUNTRY CTRY ON EMPL.PROF_ISO_COUNTRY_CODE=CTRY.PROF_ISO_COUNTRY_CODE LEFT OUTER JOIN EMPINST.ORGANIZATION ORG ON EMPL.PROF_ORGANIZATION_IDENTIFIER=ORG.PROF_ORGANIZATION_CODE WHERE EMPL.PROF_MAIL_LOWER=?

Part 2 of the blackbox article published

The second and final article in my series on Sametime blackboxes (Configuring the Sametime business card system, Part 2: Reach more data with custom blackboxes) has been published at the THE VIEW website and will be out in the May/June issue.

Where as the first article primarily focused on configuration and setup of the blackbox system the second article describes how to develop your own custom blackbox implementations. One of the blackboxes I describe is the one I developed for the bleedyellow.com Sametime server. This implementation retrieves business card data from Lotus Connections.

Custom Sametime blackbox for bleedyellow.com

Over the last few days I have been working with Chris Whisonant from LOTUS911 / bleedyellow.com to write a custom Sametime blackbox for bleedyellow.com. In case you don’t know, a blackbox in “Sametime speak”, is what you write if you would like to get business card info from systems other than Domino Directory or LDAP.

This blackbox uses the DB2 JDBC drivers to plug into the Lotus Connections Profiles database at bleedyellow.com to get business card data from there. This means that if you update your bleedyellow.com profile with a photo your co-bleeders will now be able to see it when they hover their mouse over your name in Sametime.

Besides the photo we also surfase the blog-link and the timezone instead of company name and department as you can see in the screenshot below.

During my work with this blackbox and previous work I have done with the UserInfo API for two upcoming articles in THE VIEW on the same subject I have learned a lot of stuff, both good and bad, about the API. The API gives you a lot of flexibility but there are also major shortcomings so expect some blogging on this in the future. For now simply rejoice! 🙂

Now I invite you to update your Lotus Connections profile and share any comments you have on the hovering with me or Chris.

P.S.: I know there is a Lotus Connections plug-in for Sametime that provides hover-functionality from the Solution Catalog but I really wanted a server-based solution.

More on Sametime blackboxes

I was at a customer site today and among other things I was asked to take a look on a Sametime business card issue they were having with a custom blackbox. The issue was that the picture was not showing up in Sametime. They did already have a PMR open with Lotus Support but they had been unable to solve the issue.

The customer is using the “custom” blackbox implementation (com.ibm.sametime.userinfo.userinfobb.UserInfoNotesCustomBB) provided by IBM Lotus as part of Sametime 7.5.1 where you can specify a database path, a view and some field names in the UserInfoConfig.xml and the rest is taken care of for you. While this is well and good it still didn’t work. The problem was trivial to solve but it was difficult to explain why it simply didn’t work.

The issue was that the attributes used to specify the database path and view name are case sensitive!! The customer had simply followed the XML convention of using lowercase attribute names which turned out to be wrong. When you use this implementation the database attribute *has* to be called “DbName” and the view attribute *has* to be called “View”. If you get the casing wrong it wont work!

New PMR coming up – change the implementation of the class to make the attribute names case insensitive. Or read the article in THE VIEW 2008 Technical Supplement to see how to easily write your own blackbox… 🙂

Sametime blackboxes (update)

Just a short update on my Sametime blackboxes post from earlier today.

As noted by Julian Robichaux and Urs Meli in comments I had a typo in the previously posted code as I had managed to insert the wrong looping code twice… 😦 The correct, correct looping should be:

public static void main(String[] args) {
   LinkedList l = new LinkedList();
   for (int i=0; i<10; i++) {
      l.addLast(new Simple(i));
   }
   while (l.size() > 0) {
      System.out.println("" + ((Simple)l.removeFirst()).getI());
   }
}