« Back to home

JDK 8 JavaScript scripting experiment, with added Domino

Oracle’s new JDK 8.0 includes a new JavaScript engine called Nashorn, designed to support both embedded JavaScript in Java applications, and standalone command-line JavaScript. As well as accessing JavaScript from Java code, you can do the reverse, and access Java classes from JavaScript — just like in IBM Domino XPages. The new scripting features are now a standard part of the JRE. For now, the command to actually run a script is described by Oracle as “experimental and unsupported”, but I wasn’t going to let that put me off; I immediately wondered how easy it would be to write a command-line script which accessed Domino data, using only JavaScript.…

Read more »

Attack of the Heisenbug

This week I battled a bug which was exceptionally sneaky at hiding itself. Consider the following Domino Java code accessing a single-valued date-only field: Document doc; […fetch document…] Vector v = doc.getItemValueDateTimeArray("SomeDateField"); DateTime dt = (DateTime) v.get(0); Date jdt = dt.toJavaDate(); System.out.println(dt.toString() + " = " + jdt.toString()); What happens when you run the code? Well, the getItemValueDateTimeArray() call fetches the contents of the Notes item (field) from the document, and returns it as a Vector of Notes DateTime objects.…

Read more »

Of Domino and data pumps

When you have IBM Lotus Domino in your organization, sooner or later you come up with a requirement to move data between Domino and some other system — often a relational database. There are many ways to do this, and not much guidance is offered as to which to pursue, so here’s a summary of my own experience. LEI LEI is Lotus Enterprise Integrator. It’s basically a general purpose solution for pumping data between Domino and other systems — typically relational databases, but you can also use it to pump data between non-replicating Domino servers.…

Read more »