Skip to content

Instantly share code, notes, and snippets.

Created Mar 31, 2014
What would you like to do?
How to access an IBM Domino server from JDK 8 command-line JavaScript, using CORBA and DIIOP.
/*jshint indent:2 */
/*global Packages */
// Sample JavaScript CORBA/IIOP code for JDK 8 and Domino 9.0.2
// Run with jrunscript -cp DOMINO_JARS corbatest.js
// where DOMINO_JARS contains Domino.jar and NCSO.jar from your Domino server
// install.
* Opens a connection to a Domino server via CORBA/DIIOP, and returns a Domino
* Session object you can then use in the normal way. Try not to lose it, and
* please remember to recycle. ♻
var Domino = function (server, login, password) {
"use strict";
var NotesFactory = Packages.lotus.domino.NotesFactory,
openSession = function (server, login, password) {
var ior = NotesFactory.getIOR(server);
return NotesFactory.createSessionWithIOR(ior, login, password);
session = openSession(server, login, password);
return session;
// Insert your username and password here…
var tecdev = new Domino("", "", "password"),
db = tecdev.getDatabase("", "test.nsf"),
view = db.getView("SomeView"),
doc = view.getFirstDocument();
print(db.getTitle() + " opened, first document:");
print("Form = " + doc.getItemValueString("Form"));
print("Subject = " + doc.getItemValueString("Subject"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment